Backup Magento database, schema and files to s3 using Duplicity
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

This is a bash script for backing up Magento installations. It attempts to pull your database credentials out of local.xml and automate as much as possible.

What's backed up

  • Database
  • Database schema (for keeping track of table changes in git)
  • Website files and assets


  • Bucket with Amazon s3
  • xmllint --xpath (some older versions lack this option)
  • Duplicity


chmod 755
crontab -e
0 4 * * * /path/to/

Restoring files

duplicity --file-to-restore s3+http://bucketname/www ~/restore/location