This script runs and creates daily (stored for 7 days), weekly (stored for 28 days) and monthly (stored for 365 days) of a local webroot and complete database backup of MySQL, PostgreSQL, MongoDB and SQLite. Each is tared and gzipped and placed in a directory of your choosing and then optionally synched with an Amazon S3 Bucket for off-site storage.
-
Manual
- In your local directory type:
wget http://github.com/jtyost2/S3_Backup/zipball/master
- Unzip that download.
- In your local directory type:
-
Git Clone
- In your local directory type:
git clone git://github.com/jtyost2/S3_Backup.git S3_Backup
- In your local directory type:
- Command Line S3 Client: http://s3tools.org/s3cmd
- Optional AmazonS3 Bucket: http://aws.amazon.com/s3/
There is a batch of configuration settings needed to get this running. These are in the config.sh.default
shell script and none of the them need to be in quotes (as far as I have tested). Copy and rename the config.sh.default
to config.sh
and set the values to your particular setup. Copy and rename the tar_exclude.txt.default
to tar_exclude.txt
and add any paths/files to be excluded from the tar backup to this file.
- S3Cmd needs to be configured first before use
- Recommend use case for running this is via a cron job, ensure the user the cron is running under has access to run the script and the correct permissions for access.
Please use GitHub Issues for listing any known defects or issues
When working on this script, please fork and issue a PR for any new development.
Please use GitHub Isuses for listing any known defects or issues.
Justin Yost 2015