jbritten / wordpress-s3-backup

Ruby Rake script to backup your WordPress blog database and site to Amazon S3

wordpress-s3-backup / README
100644 34 lines (25 sloc) 1.615 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
Backup your WordPress database and site to Amazon S3
 
Author: Justin Britten [justin at compulsivoco dot com]
Copyright: 2009 Compulsivo, Inc.
License: MIT License (http://www.opensource.org/licenses/mit-license.php)
 
USAGE
 
  $ rake -f wordpress.rake -T
    rake wordpress:backup # Backup both the WordPress database and site
    rake wordpress:backup:db # Backup the WordPress database to S3
    rake wordpress:backup:site # Backup the WordPress site to S3
    rake wordpress:manage:list # List all your backups
    rake wordpress:manage:cleanup # Remove all but the last 10 most recent backups
                                       # (optionally specify KEEP=5 to keep the last 5)
    rake wordpress:retrieve # Retrieve the latest WordPress database and site backup from S3
                                       # (optionally specify VERSION=file_name)
    rake wordpress:retrieve:db # Retrieve the latest WordPress database backup from S3
                                       # (optionally specify VERSION=file_name)
    rake wordpress:retrieve:site # Retrieve the latest WordPress site backup from S3
                                       # (optionally specify VERSION=file_name)
 
PREREQUISITES
 
   1. You'll need to install the aws-s3 gem.
       $ sudo gem install aws-s3
 
   2. Specify your database credentials, site path, and Amazon S3 access keys by editing the Rake script.
 
AUTOMATION
 
   Put this in your crontab to run nightly backups at 3am:
     0 3 * * * rake -f /PATH/TO/wordpress.rake wordpress:backup