backup problem

gleble - June 7, 2008 - 11:06

I am trying to bacup my drupal installation using the backup module and I get the following error

warning: rename(/tmp/drupal-backup-db-TxkGaL,drupal-backup-db-20080607120218-433839221.sql.gz) [function.rename]: Permission denied in /opt/lampp/htdocs/drupal-5.7/modules/backup/functions.inc.php on line 82.
Does anyone know how to get round this?

problem changed

gleble - June 7, 2008 - 17:14

Still trying to backup but now I get

Database backed up successfully.

backup_files(): Command 'tar cfz /tmp/backup-htdocs-kX4ZUz drupal-5.7/MAINTAINERS.txt drupal-5.7/tmp drupal-5.7/profiles drupal-5.7/CHANGELOG.txt drupal-5.7/backup drupal-5.7/sites drupal-5.7/scripts drupal-5.7/LICENSE.txt drupal-5.7/xmlrpc.php drupal-5.7/install.php drupal-5.7/misc drupal-5.7/robots.txt drupal-5.7/INSTALL.pgsql.txt drupal-5.7/.htaccess drupal-5.7/index.php drupal-5.7/update.php drupal-5.7/UPGRADE.txt drupal-5.7/INSTALL.mysql.txt drupal-5.7/INSTALL.txt drupal-5.7/cron.php drupal-5.7/themes drupal-5.7/modules drupal-5.7/includes drupal-5.7/drupal-backup-db-20080607180836-490337689.sql.gz ' returned value: -1

The bit shown as code is red.
It says it's backed up but I can' t find it.
Greatly confused

Appears to have not worked

gajillion - June 7, 2008 - 18:30

The -1 return value means that your 'tar' command (the archiving utility on your server) failed. If it succeeded, your file will be in the /tmp directory named "backup-htdocs-kX4ZUz". I'm assuming the backup command was supposed to have moved that somewhere and renamed it.

now this

gleble - June 8, 2008 - 09:55

If I try backup again it gives this

backup_database(): Command 'mysqldump -u root -h localhost -p******* drupal |gzip >/tmp/drupal-backup-db-PDWxtS ' returned value: -1

I know the -1 means it failed
Why?

Support Request

winston - June 9, 2008 - 15:38

Maybe you want to put this in a support request on that module rather than the general forum?

I recall trying that module also and never could get it to work. I ended up just writing my own scripts. I have one script on my server which does daily backup, and another on my "backup" machine that copies the backup files over using SCP.

This page - http://drupal.org/node/59369 - has an example. I stole a bit from that, but tweaked it a bit for my own preferences.

Had to take some time to learn Bash, how to setup up ssh and scp so my backup machine didn't require interactive login, learn how tar options work better, etc. But I didn't mind as for Backup I really wanted to make sure I understood how it worked.

Regards,

- Peter

Try it by yourself

gajillion - June 24, 2008 - 14:47

Do you have shell access to your account? If so, try those commands by yourself and see if they work or not. If not, take it up with your provider and figure out why. The script is working fine - it's the OS commands that are failing for you.

 
 

Drupal is a registered trademark of Dries Buytaert.