Because Amazon S3 provides very cheap storage, it is a great option to use as a backup destination. It has the same advantage as an FTP directory of being off-site, but also includes redundancy, and can be cheaper than paying for a dedicated backup server. This video shows how to create an Amazon S3 account, create a bucket for your backups, and make a backup to your S3 account.
Amazon S3 Bucket
Amazon S3 has some very cheap storage rates. You can find out specifics on their pricing page, but if you are thinking about getting a server just to store backups, Amazon S3 will very likely save you money. You can even try it out for FREE for a year.
In order for Drupal to communicate with Amazon S3, we need to install the "Amazon S3 PHP Class" library. To get the link to the library:
- Go to the "Destinations" tab (admin/config/system/backup_migrate/destination)
- Click Add Destination
- Click "Amazon S3 Bucket"
Here, you'll see a notice that tells you to download the library, and includes a link to the library page.
- Click the link (http://undesigned.org.za/2007/10/22/amazon-s3-php-class)
- Click "Download latest development version (This will download a tar.gz file of the library.)
- Unzip the file
- Rename the new folder to "s3-php5-curl"
- Move that folder to "sites/all/libraries" (If the libraries folder does not exist, create it)
Now, if we refresh the page, the notice is gone, which means we're good to go.
Now, to setup an Amazon S3 bucket for your backups, you need to sign in at: http://aws.amazon.com/console/ (If you don't already have an account, click "Sign Up" to do so.)
Once you're signed in, you can create a bucket for your backups
- Click "S3"
- Click "Create Bucket"
- Bucket Name: BAMS3BackupsBucket
Okay, now we can setup the destination on our site.
- Desitnation name: BAM S3 Backups Bucket
- S3 Bucket: BAMS3BackupsBucket
- Subdirectory: [none] (If you were so inclined, you could create multiple S3 destinations, and create subdirectories for Daily, Weekly etc. But, I'll just keep it simple for now.)
- Access Key ID: [your key ID here]
- Secret Access Key: [your key here]
- (Save destination)
To get your Access Key ID and Secret Access Key:
- Log into your S3 account
- Click your name in the top right of the menu bar
- Click "Security Credentials"
- Click "Access Credentials"
- Copy your key
- If you don't have a key, click "Create a new Access Key
- Click "Show" under "Secret Access Key
Now we can try it out.
- Click the "Backup" tab. (admin/config/system/backup_migrate)
- Backup to "BAM S3 Backups Bucket"
- (Backup now)
Login to your S3 account, choose the backups bucket, and you'll see the backup that we just created!
You can go to the "Destinations" tab on your site (admin/config/system/backup_migrate/destination) and click "list files" next to "BAM S3 Backups Bucket" to view the backups saved to that location.