BackupBuddy: Advanced Debugging
From IThemes Codex
Revision as of 17:49, February 10, 2011 by Dustin
Backups Time Out / Marked as Bad
- Backup file size is too large so it takes too long to finish & server kills it. Try reducing backup size, excluding directories, disabling compression to speed up zip file generation, or getting host to enable native zip compression if not already enabled.
- Backup file location permissions do not allow writing. Give write permissions to the directory /wp-content/uploads/.
Fallback to Compatibility Mode (not necessarily a 'problem')
- The command line command 'zip' is unavailable. Ask host to allow access to it. Not available on Windows without using the zip package we provide (Ask Dustin about this until he documents it!)
- exec() function is disabled in PHP. Ask host to remove this block or remove it from the block list in cPanel if available. (Ask Dustin about this until he documents it!)
- They are using Windows. -- ask Dustin.
FTP Transfers Fail
- Login credentials are wrong. Test them to be sure. This is surprisingly common. View the HTML source to obtain the hidden password.
- The path entered is incorrect or the directory has not been created. BackupBuddy requires the path to already exist.
- Some hosts block outgoing FTP connections, port 21 (standard FTP port), and/or do not have the FTP extension available for their PHP installation. This can easily be tested by entering settings for a known working FTP or by taking the FTP settings the user entered and trying them in an FTP client.
Scheduled Events Fail to Trigger
- The scheduled date is wrong and has not passed.
- Not enough visitors are visiting to trigger the schedule. Someone must visit any page on the WordPress site on or after the scheduled time for the event to occur. If no one visits during the time-frame then the event may be missed or occur at an unscheduled time.
- The backup is failing. Test manual backups.
Warning: mysql_query() [function.mysql-query]: Unable to save result set in /www/wp-content/plugins/backupbuddy/backupbuddy.php on line 1673
Warning: exec() has been disabled for security reasons in /www/wp-content/plugins/backupbuddy/lib/zip/zip.php on line 124
- exec() is disabled somewhere in PHP configuration. Ask the host to correct this or use cPanel to edit PHP settings to enable it if possible. See 'Fallback to Compatibility Mode' above.
Importing / Migrating with importbuddy.php
The source site is now redirecting to the destination site (or vice versa):
- This occurs if the new database settings were not entered during Step 4 of importbuddy.php. Because of this, both sites are now sharing the same database so one of them (usually source) is redirecting to the other (usually destination). importbuddy.php needs to be re-run inputting the source URL on Step 4 and using the source database settings. This will reconfigure the source database to use its proper URL. Next importbuddy.php needs to be run again inputting the destination URL on Step 4 with the NEW database settings for the new database. This way both sites will have their own database for their respective URLs.
- The .htaccess file was not configured properly or was not writable so importbuddy didn't update it.
- To fix log in to the admin dashboard and navigate to: Settings -> Permalinks and click 'Save Changes'.
- To manually fix, edit the .htaccess file in a text editor following the format on the .htaccess page.
You Have Problems at EVERY Step of the Restore
- So, you have watched the 45 minute video (http://pluginbuddy.com/get-a-backupbuddy-product-tour) and you get to Step 4 and realize that you had to use every alternate method and you just AREN'T feeling lucky and need to get the migration done. Below is a Step By Step to *every* alternate step if you know in advance that this won't just be a click and restore operation (likely due to your hosting configuration). Doing the restore this way literally took me 5 minutes to restore a site (with 150 articles and photos) and then 5 more minutes to figure fix the 500 internal error (which I've also included):
- Perform the backup as directed and download the backup.zip file and install.php file
- Upload the two files above to the new empty directory (in my case a new site)
- In the new installation (in the cPanel) create an empty database and a user. Give the new user 'all permissions' for that database and write it down
- While in your cPanel (in the 'File Manager'), manually unzip the backup zip file
- Navigate to http://yourdomain.com/installbuddy.com and follow directions BUT in Step 1 in 'Advanced Troubleshooting Options' choose 'Skip Zip File Extraction' and continue until your database set up (Step 4 or 5)
- In the setting of the database, fill in the database name, username & password that you created already and test the connection
- Finish install
- But wait… the installation says 'successful' but your site looks weird and you get an error message when you try to login at /wp-admin… luckily two other persons reported that in this forum and I found this EXTREMELY helpful thread: http://ithemes.com/forum/index.php?/topic/5454-500-internal-server-error-after-successful-migration/
- Amend your .htaccess file according to the link in the point above.
ERROR #9003 / #59233894: NOTE: Did you refresh after finishing the import? If so, [...]
- Please see BackupBuddy Error Code #9003
500 Server Errors:
- .htaccess (click for details) file is causing URLs to be redirected improperly or is malformed.
- PHP is not functioning or enabled for the site. Check with basic phpinfo().
- A 404 error is occurring but the server is not set up correctly to return a 404. Do sanity check with .htm file.
The backup zip file is not found:
- The zip file has been renamed to a non-BackupBuddy format.
- The zip file permissions are wrong. Ex: Not readable.
- The zip file is not in the same directory as importbuddy.php.
- The zip file has not finished uploading or was interrupted in transit. If BackupBuddy was used to send it try manually uploading.
- SQL to update URL in posts manually:
update wp_posts set post_content = replace(post_content, 'http://OLD_URL', 'http://NEW_URL');
- Command line zip test to check if exec is enabled and zip can create a file. Download: Media:Zip_test.zip