I completed the install but when I run backup I get:
* warning: rename(/tmp/drupal-backup-db-hVyXzS,drupal-backup-db-20070319202041-443808657.tgz) [function.rename]: Permission denied in /var/www/vhosts/FOTHR.org/httpdocs/modules/backup/backup_lib.php on line 77.
* backup_database(): Renaming file '/tmp/drupal-backup-db-hVyXzS' to 'drupal-backup-db-20070319202041-443808657.tgz' failed
Is this a path problem? or a permission problem? or? I have Drupal installed in the root dir.
Comments
Comment #1
dmuth commentedHiya,
It appears to be a permission issue on your end. Here is the key part (with some bolding by me):
However, I think it sucks that you had to run an entire backup only to have the script say, "sorry, just kidding!" at the very end. So I "fixed" this bug by writing a little code that will check the permissions of the target directory BEFORE the backup is started. That way, if there are any issues, the script will not even permit you to make a backup and provide you with more useful information.
I just checked in the changes and tagged them as "DRUPAL-5--1-1". As soon as Drupal builds a new tarball from that, you should be able to download the updated version.
Thank you for bringing this to my attention.
-- Doug
Comment #2
THOUGHTOUT commentedWow, that was quick and what I figured the problem is. Without waiting for the update, what is the TARGET directory and the permission need to be set to?
Thanks again
Mike
Comment #3
dmuth commentedThe target directory is your webserver's document root. The permissions should be set so that whatever use the webserver is running as can write to it.
In most instances, a permission setting of 0777 will work, but at that implies, it also makes the directory world-writable, which may not be desirable if there are other users on that machine.
I'll reopen this bug, so I can add a feature where the user can specify what directory to write the backup to. That should eliminate additional issues like this in the future.
-- Doug
Comment #4
dmuth commentedOkay, I just committed a new version of this module (under CVS tag DRUPAL-5--1-2) which now has a "configuration" section and will allow you to specify the target directory where the backup is to be performed. Also, it will check the target directory and make sure it is writable before saving the configuation change OR beginning the backup. Enjoy!
-- Doug
Comment #5
BobLouis commentedHi, trying to set a backup configuration directory, i got the following message:
However, I set permissions for that directory on 777.
Any idea to solve the issue?
Comment #6
dmuth commentedBob,
Try removing the leading slash from "/backup" and try again.
Thanks,
-- Doug
Comment #7
BobLouis commentedThank you Doug: it works.
But now I have the following message:
Is it something disabled by my host? Or is it workable on a "drupal" side?
Comment #8
dmuth commentedYour webhost probably has "safe mode" enabled in PHP. Ask them not to do that. :-)
-- Doug
Comment #9
BobLouis commentedDoug, I asked them to disable Safe Mode.
What they did :
safe_mode = Off
safe_mode_gid = Off
sql.safe_mode = Off
Still have this error message:
Any idea of the cause?
Comment #10
BobLouis commentedNo solution so...? :)