Using UpdraftPlus to Backup WordPress Websites

UpdraftPlusUpdraft Plus Ratings 2015-11-22I currently use and recommend Updraft Plus for WordPress site backups (see Website Maintenance, Updates, Backups, Monitoring) in addition to Redundant storage using periodic cpanel backups and Updraft backup copies (see below)

UpdraftPlus is perhaps the most popular backup plugin in use, with capacities to restore and migrate websites from backup files.

The free version of UpdraftPlus stores a copy of the database, theme files, plugins, content, and directories, both on the server and on one other cloud-based platform, and it can alert the site admin of any problems in the backup process. Back-ups can be scheduled at set intervals.

Free cloud-based backup options include:

  • Copy.com, with 15 GB of storage – simple to set up, simple to connect
  • Dropbox.com, with 2 GB of free storage – also simple to set up and simple to connect
  • Google Drive, with 15 GB of free storage totaled for all Google services – requires connection with the Drive API – more complex

UpdraftPlus Premium allows backup redundancy, with backups stored on multiple platforms, including those mentioned above, as well as Amazon S3 and Updraft Vault.

  • Amazon S3, in a bucket for each website, and with a specific user with credentials for only that bucket. S3 storage is billed per KB and is very affordable, but also a little more difficult to set up. See below for more information on Amazon S3 integration.

Automatic updates can be set to occur every time plugins or the WordPress core are updated. See the Advanced Settings (expand) or the Dashboard > updates page.

The Backup Retention feature allows retaining backups of different ages at different frequencies. This feature is not immediately intuitive – see the links below.

  • Typically, 5 to 25 backups should suffice for most purposes. Here are some scenarios that illustrate retention.
  • Consider monthly backups for 2 years. The total number of backups is 24 (a rather large number). Select monthly, and retain 24 backups.
  • Consider only saving 1 monthly backup every 3-month period for 2 years. The total number of backups is 1 + 8 = 9. Add a retention rule, for backups older than 4 weeks, save 1 backup every 13-week period.UpdraftPlus 1-8
  • Consider daily backups for one week, then weekly backups for 1 month (4 weeks), then monthly backups for 3 months (13 weeks), then quarterly  backups for 2 years. The total number of backups is 7 + 4 + 3 + 8 = 22. Set backups to daily and retain 22 backups. Add retention rules,
    1. for backups older than 1 week, save a backup every 1-week period
    2. for older than 4 weeks, save 1 every 4-week period
    3. for older than 13 weeks, save 1 every 13-week periodUpdraftPlus 7-4-3
  • Backup Time and Scheduling – click the image in the left sidebar for the most illustrative description of this feature that I’ve found (this feature is bundled with the Premium version. Or see What is the “Add an additional retention rule…” option?, or More sophisticated backup retention.

To unlink accounts in UpdraftPlus, go to the Advanced Debugging tab and ‘wipe clean’.

To delete multiple backups at one time, use the Ctl key to select each row of backups (some browsers work better than others).

UpdraftPlus Integration with Amazon S3 Storage

A word about Amazon S3. Amazon S3 provides stable off-site storage.In the S3 console, create a bucket for the backups, and in the IAM console, create a user and enter the credentials in the UpdraftPlus settings. Then, create a user policy that gives the user access to a particular bucket – see the policy at the end of the post.

To prevent malicious attacks by unauthorized entry to the WordPress dashboard and deletion of the Amazon S3 backups, follow a procedure below:

  1. Level 1 Protection. Add password protection to the UpdraftPlus settings (first level of security), but not invincible;
  2. Level 2 Protection. Remove the two delete permissions in the IAM user policy. Specifically, remove

"s3:DeleteObject",
"s3:DeleteObjectVersion"

Note that Udraft will not be able to limit the number of saved backups by deleting old versions. Therefore, one must enable Versioning and Lifecycling.

First, access the S3 Bucket properties and Enable Versioning. Versioning keeps a version of all files (deletion is not possible).

The Enable Lifecycling, and add a rule that applies to the bucket (or a folder in the bucket), and then configure the rule. Files versions can be tagged for deep storage in Glacier (3-5 hour retrieval times). Lifecycle rules are described in the following documents (the rules are obtruse!)

Amazon S3 Lifecycle Management for Versioned Objects, by Amazon

What settings should I use for Amazon S3, and how should I configure my Amazon S3 account?, by UpdraftPlus

UpdraftPlus Setup Steps (technical reference only)

  1. Upload the premium UpdraftPlus plugin to website
  2. Go the Settings > UpdraftPlus > Addons tab, and log in to Updraft
  3. Go to settings and select backup options Dropbox and S3 > Save
  4. Authenticate Dropbox and add a Dropbox subfolder
  5. For Amazon, go to Amazon S3 dashboard and
    1. Create a bucket for the site
    2. Create a user, and add the security credentials to the Updraft settings. I do  not store the security credentials elsewhere, but can always recreate the user if necessary.
    3. Add the permissions for the user (as per above).
    4. Add the bucket to the settings and test the S3 Settings
  6. Go to Advanced Debugging to add password (if desired)
  7. Schedule desired backup frequency.
  8. Perform a manual backup and confirm in the Dropbox folder (/apps/Updraft/) and S3 bucket.
  9. Consider copying the Dropbox files to a BU location, and uploading cpanel and theme BUs to the Amazon S3 bucket

Reference Links

The policy for an IAM user which gives the user access to a specific Amazon S3 bucket (called ‘mybucket’ in the example) can be set using the following permissions for that bucket (from Updraft):
{
"Statement": [
{
"Effect": "Allow",
"Action": [
"s3:ListBucket",
"s3:GetBucketLocation",
"s3:ListBucketMultipartUploads"
],
"Resource": "arn:aws:s3:::mybucket",
"Condition": {}
},
{
"Effect": "Allow",
"Action": [
"s3:AbortMultipartUpload",
"s3:DeleteObject",
"s3:DeleteObjectVersion",
"s3:GetObject",
"s3:GetObjectAcl",
"s3:GetObjectVersion",
"s3:GetObjectVersionAcl",
"s3:PutObject",
"s3:PutObjectAcl",
"s3:PutObjectAclVersion"
],
"Resource": "arn:aws:s3:::mybucket/",
"Condition": {}
},
{
"Effect": "Allow",
"Action": "s3:ListAllMyBuckets",
"Resource": "
",
"Condition": {}
}
] }

0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply