You have a backup, don’t you?


Published on

Presentation slides from WordCamp Toronto 2012 talk.

Could you recover your WordPress website if it was lost due to a hardware failure, hacked, or corrupted during an update or plugin install? Having good backups can make the difference between a 10 minute recovery and complete site rebuild that may take a week. This presentation will cover the basics of backups, and several techniques of creating and restoring backups including: using cPanel, WordPress plugins, and services like VaultPress.

Published in: Technology
1 Like
  • Be the first to comment

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

You have a backup, don’t you?

  1. 1. “You have a backup, don’t you?”Rick Radko WordCamp September 29th, 2012
  2. 2. A little bit about meRick Radko – R-Cubed Design Forge  Software, web and app designer/developer.  Creating custom web sites since 1996.  Artistic and creative engineer.  Co-organizer of: The Ottawa WordPress Group.  If you have questions or need help, contact me at: are posted at: © 2012 Rick Radko, 1
  3. 3. You have a backup, don’t you?“You caught a virusfrom your computerand we had to eraseyour brain. I hopeyou had a back-upcopy!”© 2012 Rick Radko, 2
  4. 4. Backups – Why bother?Your WordPress content is electronic data, if it’sdamaged or deleted, you could loose your entirewebsite.If you lost your website, how long would it take youto rebuild? a) Hours? b) Days? c) Weeks? d) Minutes – because I have reliable backup.© 2012 Rick Radko, 3
  5. 5. Reconstructing a site without a backupEven small sites take significant effort to rebuild:  Reinstalling WordPress.  Reinstalling & setting up plugins.  Setting up a theme (customizations?).  Recovering content.  Google search may have cached copies of sites.  Rebuilding the pages from recovered content:  A lot of cut and paste and editing work.  Re-uploading images.Rebuilds cost: $$ and lost uptime.© 2012 Rick Radko, 4
  6. 6. Things that can will go wrongHardware failures:  Hosts don’t guarantee backups.Accidental deletions & damage:  Who makes mistakes? Everybody!A short WordCamp presentation by one of themakers of Backup Buddy and his experience withthese 2 issues.  a-wordpress-backup/© 2012 Rick Radko, 5
  7. 7. More things that can will go wrongHacking/Malware/Virus:  Can completely trash a site.  May have all your files deleted.  Could have every single file altered. (about 3000 files in an empty WordPress install)Updates:  Bugs  Incompatibility  Update fails to complete© 2012 Rick Radko, 6
  8. 8. What to back up?To completely back up a WordPress website, thereare 2 things that need to be backed up as a pair:  Database  All of your site content.  WordPress, plugin and theme settings and config.  Files  WordPress files  Plugin files  Theme files  Most important: UPLOADS!!! (images & other media)© 2012 Rick Radko, 7
  9. 9. Database only backupsTo restore a site, you generally need backups ofyour files and database taken at the same time.However, if don’t do any file or media uploads(embeds are ok), only your database is changingand you can:  Back up your database regularly.  Typically a small backup compared to files.  Back up your files when they change  After updates for example.  Typically a much larger backup.© 2012 Rick Radko, 8
  10. 10. When to back up?How often you back up depends on how often yoursite gets changed/updated.Consider:  The amount of data being added regularly.  Your posting frequency.  Comment frequency.  Significant change.  How critical your site is.Whether you back up daily, weekly or monthlydepends on how much you are willing to loose…© 2012 Rick Radko, 9
  11. 11. Making sure it happensRegular backups, daily, weekly or monthly, shouldbe automated, or they will not happen regularly.  Face it, it’s not a fun task!A manual system that is easy to use should beavailable to compliment the regular backups forwhen there is significant change on the site.  Major site revision.  An unusual amount of new content.  Big event, or happening?  New product launch.© 2012 Rick Radko, 10
  12. 12. Where to backupOff of your server!  Default for most backup plugins is to save the backup on your server.  A file on your server, does not protect you against most of the issues mentioned at the start.  A file on your server could be a security issue.Other points:  Off site, especially if your server is onsite.  Keeping 2 or 3 separate copies is recommended.  Backup history – a period of older copies.© 2012 Rick Radko, 11
  13. 13. Getting it off the serverA while ago backup systems could email you abackup, but backups are generally too big now:  A complete backup of an empty WordPress install is about 5 Meg.  Too big for most emails.  Gmail will take up to 25 Meg attachments, (if your system will send it) but a lot of backups are even bigger than that.© 2012 Rick Radko, 12
  14. 14. FTP it off the serverFTP is an option, but you need a place to FTP to:  A common idea is to use another hosting account somewhere.  Most shared hosting does not allow data storage on their servers (read the fine print in your TOS).  Some hosting services offer storage, expensive unless you have volume. (large corporation)© 2012 Rick Radko, 13
  15. 15. Send it to the cloudMany plugins will let you store your backups onone of the many cloud services.  Amazon S3  Dropbox  Google Drive  +MoreThis is a reasonable option for most sites.  Cloud storage fees are quite low.  Off site.  Need to be aware of privacy issues.© 2012 Rick Radko, 14
  16. 16. Backup compromisesUltimately the decision of what, when and whereto backup your site will involve assessments ofrisk and possibly compromises.For example:  A large site may choose to do nightly database backups and weekly file backups to reduce the amount of data being stored.  They will risk the effort of recovering any images that were uploaded during the week.© 2012 Rick Radko, 15
  17. 17. How to back upLets look at some tools/methods to do backups.I’ve grouped them into 4 rough categories:  Manual backups:  Hosting control panel – cPanel.  Archive, SQL dump FTP.  Backup plugins  Backup services - New  Site managers – Really new© 2012 Rick Radko, 16
  18. 18. Manual backupsHosting control panel  Most hosting control panels offer a backup option.  Usually not automated.  May not be very granular. (entire account only)  You likely will also be able to backup by:  Compressing (zip/archive) your files into an archive.  Dumping (exporting ) your MySQL database. (phpMyAdmin, and other tools)  FTPing the files off the server.© 2012 Rick Radko, 17
  19. 19. Manual backups continuedThe archive and SQL dump - pros:  Very granular – any site/part of a site you want.  Very reliable, .zip + sql dump is very portable, no other tools needed to restore.  Unzip the files, import the sql, done!  Including the date, 2012-09-29 for example, in the names of both files, helps keep backups together.  Do need other scripts for site migration.© 2012 Rick Radko, 18
  20. 20. Manual backups continued againThe archive and SQL dump - cons:  Several steps involved in backups and restores.  Need to know a bit about databases to do imports/exports.  Some GUI tools phpMyAdmin.  Need to know how to archive/un-archive (compress, .zip, gzip etc.)  Need to be comfortable with file systems on the server – often Linux.  No automated backups.© 2012 Rick Radko, 19
  21. 21. Backup pluginsThere are a lot of choices in plugins for backup.  Many are free. (  Some are paid.While it was not the case as little as a year ago:  Most of the plugins now available offer automated backup options.  Most now allow you to backup your choice of your files, your database or both.© 2012 Rick Radko, 20
  22. 22. Plugin featuresKey backup features:  Automated/scheduled backups.  A must if you want reliable backups.  Manual backups (on demand) using the same settings as your automated backups.  A recommended feature.  File/directory exclusions.  You may have some files you don’t want backed up.  Allows backing up database only, files only or both.  Flexibility in your backup strategy© 2012 Rick Radko, 21
  23. 23. More plugin featuresTypical backup locations:  Backups to cloud  Dropbox  Amazon  Rackspace  Google Drive  FTP to other servers/computers  Email© 2012 Rick Radko, 22
  24. 24. Even more plugin featuresRestore features:  No install restores.  Don’t need WordPress installed.  May use an install script.  Malware scans.  Database optimization/repair.Site migration:  Important only if you want to move your site to a new domain.  To/from multisite.© 2012 Rick Radko, 23
  25. 25. Multisite issuesIf you have multisite enabled, consider whether thebackup plugin can:  Backup sites individually?  Backup a sub-network?  Restore sites individually?  Restore a sub-network?  Migrate a single multisite site to/from a single site install?© 2012 Rick Radko, 24
  26. 26. Some plugins (no order, or recommendation given)WordPress Backup to Dropbox  Time Machine     - $ © 2012 Rick Radko, 25
  27. 27. Automated backups and cronFrom Wikipedia: cron: The time-based job scheduler in Unix-like computer operating systems. Cron enables users to schedule jobs (commands or shell scripts) to run periodically at certain times or dates.Unix/Linux Cron:  Set using Unix/Linux commands. (cPanel)  Runs at set time, or on regular intervals based on the server clock.  Reliable.© 2012 Rick Radko, 26
  28. 28. WordPress cron – a subtle pointWordPress cron:  Triggered by visits to your site, NOT a clock!  Every time someone visits your site, WordPress cron checks to see if there were things scheduled to run between the last visit and the current time.  If you set a WordPress cron job for 1am, it may not happen until the first visitor at 6am.  Most backup plugins use WordPress cron to automate backups.  Most sites have enough traffic that this will not cause major issues. (but your backups may not be exactly on time)© 2012 Rick Radko, 27
  29. 29. Backup servicesThe only backup service I knew of until about amonth ago was VaultPress – from the people whomake WordPress. Now there are many.When considering a service:  Most of the same features as for plugins need to be considered.  One item that stands out is:  Where are they storing your files?  Secure – encrypted?© 2012 Rick Radko, 28
  30. 30. More on backup servicesUnlike plugins:  Most of the services cost.  But they include storage.  Threat and malware scanners are common in the services.  Some offer incremental backups.  Only backup what has changed instead of the whole site.  Most don’t store files on your server.© 2012 Rick Radko, 29
  31. 31. A few services (no order, or recommendation given)VaultPress  From the people who make WordPress  Starts at $15/month   Basic plan free  Regular plans start at $15/month   Starts at $9/month © 2012 Rick Radko, 30
  32. 32. Site managersManage multiple WordPress sites from one centraladmin panel.  Offer a bunch of features for managing sites:  Remote updates  Add plugins themes  Bulk postings  Site analysis  Backups <- included them for this option© 2012 Rick Radko, 31
  33. 33. Two site managers (no order, or recommendation given)InfiniteWP  Download core software - free  Add-on options for many features - $  Backups to cloud   Online service – limited account – free  Full account - $  Backups to cloud © 2012 Rick Radko, 32
  34. 34. Test your backup flow!Test your backups!  Backups only work if you can restore!  Back up a test site and try restoring it.  Make sure that automated back-ups are actually running.  Periodically check that you can restore your backups.Try new backup plugins on a test site, not your livesites.© 2012 Rick Radko, 33
  35. 35. Other linksSome information about doing database backupsin control panels: © 2012 Rick Radko, 34
  36. 36. One final note on backupsBackup is often not spelled correctly, a bit ofGoogling reveals that:The verb form is back up in two words, whereasthe noun is backup.  Did you back up the hard drive?  Where did you put the backup?© 2012 Rick Radko, 35
  37. 37. ContactRick Radko  email:  twitter: @r3designforgeSlides at: © 2012 Rick Radko, 36