Backups are boring until the day they aren’t
Imagine this. Your website earns money every day. You wake up and it’s gone. Hacked, a server crash, a dead hard drive. Then what?
Everyone knows backups are important. In Poznań I talked about the part people skip: actually having a plan.
What to back up
Two things: your files, meaning the whole document root, and your database. One without the other is useless.
Where to keep it
Not only on the same server. If the server dies, so does the backup. Keep copies off-site: a cloud bucket like Amazon S3, plus somewhere you control.
How to do it
Manual backups with FTP and a database export work for one site. For anything more, automate. With WP-CLI, a short shell script exports the database, zips the site with a date in the filename, and syncs it to S3. A loop runs it for every site on the server. A cron job runs the whole thing every night at 3am.
Test the restore
A backup you have never restored is a hope, not a backup. Try a restore on a staging server every few months.
I put my scripts on GitHub after the talk. The tools have changed since, but the questions haven’t: what, where, how, and does the restore actually work?


