######################################################### # # # BUGGER # # Remote Backup Protocols # # # # Document Date: 15 June 2011 # # # ######################################################### Contents --------- - Backup File - Remote Backup - Backup Password - Requesting Backup - Security Notes - Upcoming Configuration Options Backup File ------------ BUGGER supports on-the-fly generation of a MySQL database backup. When a request is placed the database is backed up to a human readable SQL file. Within the config there is also an option to Zip the resulting file to minimise bandwidth requirements when emailing/downloading the backup file. BUGGER currently supports two download methods - Remote - Manual Remote Backup -------------- This document refers to the mechanism for requesting a database backup without logging into BUGGER. A seperate mechanism for manually downloading a backup is available to Admins under Settings. Remote backup is useful for automated backups, or even as a primitive means of syncing a fallback database server Requesting a remote backup is reasonably simple, there are a number of options to set in the config file, but this only needs to be done once. - Set Backup filename prefix - Set whether you want the backup file emailed - Set where to email the backup file - Set whether to Zip the backup file Backup Password ---------------- Before a backup can be requested you need to set the backup retrieval password. To do so, log into BUGGER as an Admin Settings -> Backup Password Set your password Note: Make a note of the password as it's not possible to view it at a later date. Requesting Backup ------------------ To request the backup you simply need to formulate a HTTP request against the file backup.php. Note: It is _Strongly_ recommended that you make all connections over a SSL (https) connection as each request will need to include your backup password. The options you need to supply are; Pass - Your backup password Download - Do you want to download the backup file? So a basic example would be https://myserver.com/BUGGER/backup.php?Pass=Mypass&Download=Y This would automatically authenticate and begin downloading the backup file. If you have enabled emailing of backups, setting Download to N will trigger the email routine without prompting to download the resulting backup file. Security Notes --------------- For security reasons the backup password is salted and hashed before being entered into the database. It's therefore not possible to view the previously set password, although it can be reset. You _must_ not use the same password for backup and a username, this presents a serious security risk! Be aware that a compromise of the backup password will allow an attacker to download a complete copy of your database including user details. Guard it carefully!! Upcoming Configuration Options ------------------------------- Site admins will be provided with a 'kill' switch so that remote backup functionality can be disabled in the site config. This will not prevent manual downloads by an authenticated admin, but will prevent downloads using the remote method. It will also be possible to set whether to Zip the backup file when formulating the request. The config option will instead become the default behaviour. A master override will be provided so that Admins can force backups to (not) be zipped. ######################################################### # # # Document End # # # #########################################################