Skip to content

Loading…

Backup Path Failure #50

Closed
tebriel opened this Issue · 19 comments

3 participants

@tebriel

Running WP 3.3 on IIS 7 with BackupWordpress 1.5.1
Pretty sure this happened right after the upgrade from 1.5.0 to 1.5.1, filenames now look like:

C/\HostingSpaces\trooporg\troop714.org\wwwroot\wp-content\themes\zbench\readme.txt
Files are not in folders, all backups are included in the backup too (presumably because the filename is confused).
Everything is in the root of the .zip file.
Example here: Example Image

Happy to provide any more information. About to delete plugin and reinstall to see if that helps, if not, will revert to 1.5.0 pending any debug info needed.

@tebriel

Deleting and reinstalling did not fix the issue, next going to try to pull a previous version, no tags apparent, so I'll just have to guess where the 1.5.0 checkpoint was. Checking out ea2acf8f1faa5758fbb0b92b85079c1ff99b1ae7

@tebriel

No-go there or at e29ff76c2d4aada0fba616a7abcdd6ff7a0ff1e1 either. Possibly a WP 3.3 issue?

@willmot
Human Made member

I must have broken IIS compatibility, thanks for the bug report.

@willmot
Human Made member

Fixed in master

@willmot willmot closed this
@tebriel

This creates a proper zip file, however the zip file contains: wp-content/backups and in this folder is a backup of the site. The backup of the site that is in wp-content/backups does not contain another backup in backups. So we have a .zip file that contains the site, plus a backup of the site. The backup of the site contained within does contain the site, but does not contain yet another backup of the site.

->tebriel@Chriss-iMac:~/Troop714 $ pwd
/Users/tebriel/Troop714
->tebriel@Chriss-iMac:~/Troop714 $ ls -lh | grep .zip
-rw-r--r-- 1 tebriel staff 121M Dec 30 12:25 troop-714-marietta-ga.backup.2011-12-30-12-24-36.zip

```->tebriel@Chriss-iMac:~/Troop714/wp-content/backups $ pwd
/Users/tebriel/Troop714/wp-content/backups
->tebriel@Chriss-iMac:~/Troop714/wp-content/backups $ ls -lh
total 83104
-rw-r--r--@ 1 tebriel staff 41M Dec 30 2011 troop-714-marietta-ga.backup.2011-12-30-12-24-36.zip

@willmot
Human Made member

Is this with the current master branch from github? or the development version from the plugins directory?

@tebriel

I did a pull from hm-backup and from BackUpWordPress, was that not correct?
I'm at 04162ad70e4621838148b2c14915606e8dbf56d4 (Bump) for BackUpWordPress and
16c7b4c8532efd4fafe1f35724c62a1c3c328b36 (No need to return false after $this->markTestSkipped
) for hm-backup
I see that 97e496c5538e2aab88bbbb362a4283530efe755a (Test archive_method, mysqldump_method and errors in unit tests.) is now the latest, let me know what SHA's I should try.
Thanks.

[Edit] Also, I only show a Master branch for hm-backup, so that's what i'm using.

@willmot
Human Made member

Could you do a git pull from /wp-content/backupwordpress/ not hm-backup, then do

git submodule update --init

That will get you the latest and greatest.

I have it passing all tests on Windows, so assuming issue is on your end.

@tebriel

Created a new clone, just to be sure I had everything, added the submodule, zipped, installed, now got this error. Am I doing something totally crazily wrong?

BackUpWordPress detected that your last backup failed.

php: 2:shell_exec(): Unable to execute 'hash mysqldump 2>&1':C:\HostingSpaces\trooporg\troop714.org\wwwroot\wp-content\plugins\BackUpWordPress\hm-backup\hm-backup.php:710

php: 2:shell_exec(): Unable to execute 'hash zip 2>&1':C:\HostingSpaces\trooporg\troop714.org\wwwroot\wp-content\plugins\BackUpWordPress\hm-backup\hm-backup.php:737

php: 2:shell_exec(): Unable to execute '"mysqldump" --no-create-db --hex-blob -u "troopwpuser" -p"To9r2gH93 /dev/null':C:\HostingSpaces\trooporg\troop714.org\wwwroot\wp-content\plugins\BackUpWordPress\hm-backup\hm-backup.php:306

php: 2:shell_exec(): Unable to execute 'cd "C:/HostingSpaces/trooporg/troop714.org/wwwroot" && "zip" -rq "C:/HostingSpaces/trooporg/troop714.org/wwwroot/wp-content/backups/troop-714-marietta-ga.backup.2012-01-02-22-26-26.zip" ./ -x "wp-content/backups" -x "wp-content/backups" 2>&1':C:\HostingSpaces\trooporg\troop714.org\wwwroot\wp-content\plugins\BackUpWordPress\hm-backup\hm-backup.php:404

php: 2:shell_exec(): Unable to execute 'cd "C:/HostingSpaces/trooporg/troop714.org/wwwroot/wp-content/backups" && "zip" -uq "C:/HostingSpaces/trooporg/troop714.org/wwwroot/wp-content/backups/troop-714-marietta-ga.backup.2012-01-02-22-26-26.zip" "database_TroopWordpress.sql" 2>&1':C:\HostingSpaces\trooporg\troop714.org\wwwroot\wp-content\plugins\BackUpWordPress\hm-backup\hm-backup.php:412

zip: The backup file was not created

@willmot
Human Made member

Was the backup file created?

Looks like your server has issues with shell_exec

@willmot willmot reopened this
@tebriel

Is this a change in the way that BackUpWordPress performs the backup? 1.5.0 worked fine. I guess it's possible that my host has changed the php settings and removed the ability to use shell-exec. I'll open a ticket with them to find out.

Yes, the backup file was created, could see it and the dump as it was working, then was gone when the error appeared.

@willmot
Human Made member

Either that, or the old version was falling back to using either PHP ZipArchive or PclZip instead of the shell zip command.

It's something I'll need to fix in BackUpWordPress as it should detect the shell_exec error and fallback

@willmot
Human Made member

You can add

define( 'HMBKP_ZIP_PATH', false );

To your wp-config.php to force BackUpWordPress to stop using zip, that should fix the issue.

@tebriel

Added the define, the zip file was created, I watched it grow, but then the backup still failed. The following errors are confusing as well, as I can see a database*.sql file created while it's running, and this message appears during the 'Creating Zip Archive' instead of 'dumping database'

BackUpWordPress detected that your last backup failed.

php: 2:shell_exec(): Unable to execute 'hash mysqldump 2>&1':C:\HostingSpaces\trooporg\troop714.org\wwwroot\wp-content\plugins\BackUpWordPress\hm-backup\hm-backup.php:710

php: 2:shell_exec(): Unable to execute 'hash zip 2>&1':C:\HostingSpaces\trooporg\troop714.org\wwwroot\wp-content\plugins\BackUpWordPress\hm-backup\hm-backup.php:737

php: 2:shell_exec(): Unable to execute '"mysqldump" --no-create-db --hex-blob -u "troopwpuser" -p"PASSWORD /dev/null':C:\HostingSpaces\trooporg\troop714.org\wwwroot\wp-content\plugins\BackUpWordPress\hm-backup\hm-backup.php:306

@chriscallahan

Sorry... posted a similar issue separately. Appears as though mine may be related to the same problem. I am not able to get at my WP dashboard so I am unclear on my version numbers. Looks like I have BackupWordPress 1.6.2 and WordPress 3.3.1. My issue started just following an upgrade to WP 3.3.1.

I have also attempted the define()... above without any luck.

@tebriel

Okay, I'm now running WP 3.3.1 and the BUWP 1.6.2 update, and I can create valid backups, and they're good. The link to download is invalid, but via FTP I can pull it. I'll open a new issue for that, as it seems to be separate. The backups are now properly excluding the backups folder, so they don't grow exponentially for every new backup. define( 'HMBKP_ZIP_PATH', false ); is still necessary, but this is probably a change from my hosting provider. Thank you for fixing that, I really appreciate all your work on this.

@willmot
Human Made member

define( 'HMBKP_ZIP_PATH', false ); should no longer be required.

@willmot willmot closed this
@tebriel

1.6.3 still has this issue:
zip: The backup file was not created when define( 'HMBKP_ZIP_PATH', false ); is not present.

[Edit]
Not accurate. 1.6.3 does not have the issue, however BackupWP shows zip: The backup file was not created even though the backup is present in the list and valid (after downloading, verified it was good).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.