A fork of the phpBackupS3 by Ian. This program will backup file paths and MySQL databases to Amazon's S3 cloud storage service.
- Easy to use
- Backups MySQL database and files
- Written in PHP (Yes, this is a feature)
- Removes old backups according to a grandfather-father-son based schedule
- Rename backup.php.example to backup.php.
- Edit the configuration settings in the backup.php.
- Upload all files to your server.
- Setup a cron job to run the backups for you!
For example, add a "backup" cron to your cron.daily:
#!/bin/sh
php -q /home/douglas/backuphp/backup.php
exit 0
This set of scripts ships with three files:
- backup.php--This is an example of how to call the backup functions
- functions.php--All the backup functions are in here
- vendor/
- s3.php--This is the library to access Amazon S3
A unique feature of this script is the way it will store (and eventually delete) old backups to conserve space, and yet maintain significant backup history. In this method you will have the following full backups:
- Everyday for the past two weeks (14 backups)
- Every saturday for the past 2 months (8 or 9 backups)
- First day of the month going back forever
This allows you to keep a very detailed history of your files during the most recent time, but progressively remove backups as time goes on to save space. This feature can be turned off if you want to store all your backups, all the time.
To disable this feature, comment out the following line from functions.php:
deleteBackups($BACKUP_BUCKET);