Backup server code/files and databases to Amazon S3
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Backup Script

Software License Latest Version

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
    • Unzip that download.
  • Git Clone

    • In your local directory type: git clone git:// S3_Backup


Prerequisite Tools

  1. Command Line S3 Client:
  2. Optional AmazonS3 Bucket:


There is a batch of configuration settings needed to get this running. These are in the shell script and none of the them need to be in quotes (as far as I have tested). Copy and rename the to 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.

Possible Issues When Using

  1. S3Cmd needs to be configured first before use
  2. 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.


Reporting Issues

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.

Reporting Issues

Please use GitHub Isuses for listing any known defects or issues.




Justin Yost 2015