Gentle Reminder
It is a good idea to
routinely check your backup files generated by this addon to verify that they are being created correctly. Some shared hosting providers throttle long running PHP processes, or ones that use a lot of CPU resources, and as a result, the backups don't finish. This is especially true on the file system backups when compressing the files, and sometimes the CPU increase from gzip will cause a host to kill execution of the script.
Some things you can do to verify your backups are complete are:
Enable the addon's debug file and make sure that when the database backup cron runs, or the code backup cron runs, that there is a START and END for the backups in the file. For the database backups, these lines should read "START Database Backup" and "END Database backup". Also, look for any ERROR literals that might indicate a problem with the backup process itself.
Your backup database filename should end in "sql.gz", and if you uncompressit with a tool like WinRAR (or
gunzip [filename].sql.gz), and view the contents, there shouldn't be an errors at the bottom of it, and will probably include the text "-- Dump completed on xxxx-xx-xx xx:xx:xx" to indicate the time the mysqldump finished. These files can be quite large, even when compressed, so you may have a limited number of applications that can reliably read these uncompressed SQL files.
The code backup filename should end in "code.tar.gz" and contain the entire contents of your XenForo base directory, which is hard to completely verify, but maybe somebody has a *nix way of running an rsync or diff to find any differences. Uncompressing the code backup file with
tar -zxvf [filename].code.tar.gz will result in one directory, with a tree structure under that leading to your backuped up XenForo files. This directory will be quite large, the same size as your XenForo base directory, so make sure you have the space before doing this.
Restoring from a backup file:
To restore from a code backup file, the best way to do that is to make a backup of any existing XenForo code base you have, uncompress the code backup file (instructions above), and copy the uncompressed backup file directory to the correct location on your hosting account. You may have to reset permissions on the writable XenForo directories if those permissions were changed, but I don't think that is normally the case.
To restore from a database backup file, DROP statements already exist in the SQL export file, so you should be able to run this command referencing your [filename].sql.gz file, which will load the contents of that file directly into your database.
Code:
mysql -h[host] -u[uname] -p[pass] [db_to_restore] < [filename].sql.gz
Where [host] is the MySQL server name (sometimes 'localhost'), [uname] is the database user, [pass] is the database password, and [db_to_restore] is the database name.