Running Virtuozzo VPS and Plesk Control Panel 8.2 based on CentOS 4.1 Linux Kernal 2.6.9

The is_executable function ALWAYS fails in this environment, thus even if tar, mysqldump, gzip are in $PATH and executable from PHP scripts, which I can call from shell_exec from my own PHP script...
http://kb.swsoft.com/article_94_821_en.html

I remarked these 3 programs to remove the check in backup.module

Then I added my backup folder to the open_basedir PHP variable and chmod 777 the backup folder.
http://kb.swsoft.com/en/432

The backup function proceeds to build the tarball in /tmp but...

The rename function fails from copying the tarball from /tmp to my backup folder.
* warning: rename(/tmp/drupal-backup-db-XXXXXX,drupal-backup-db-XXXXXXXXX.sql.gz): Permission denied in /var/www/vhosts/XXXXX/httpdocs/sites/all/modules/backup/functions.inc.php on line 82.

* backup_database(): Renaming file '/tmp/drupal-backup-db-XXXXXX' to 'drupal-backup-db-XXXXXXXX.sql.gz' failed

Any ideas?

Joe

Comments

jrabeemer’s picture

Version: 5.x-3.0 » 5.x-4.x-dev

Follow up.....

I upgraded to 5.x-4.x-dev, then remarked out the 3 program checks... The program check still fails here.

Then chmod the httpdocs root to 770, now the copy from /tmp to my backup folder works!

What a pain...

jrabeemer’s picture

Title: Backup Fails on CentOS/Virtuosso/Plesk VPS environment » Backup Fails on CentOS/Virtuozzo/Plesk VPS environment

Not only is the link wrong from the confirmation screen, I can't download it since the backup folder is above webroot! It shouldn't give me a link!

/var/www/vhosts/XXXXXX/backup/drupal-backup-XXXXX.tar.gz

Also, the event log has a record of the backup file location! Can I turn that off somehow?

jrabeemer’s picture

When I have "Backup from Parent Directory?" checked..

The tarball is made and copied but I get this error...
Database backed up successfully.
* warning: chdir(): No such file or directory (errno 2) in /var/www/vhosts/XXXXXX/httpdocs/sites/all/modules/backup/functions.inc.php on line 345.
* backup_files(): Unable to chdir() back into directory ''