Not long after I first moved this blog to WordPress, I installed the UpdraftPlus plugin for site backups. I’ve been using the free version for the last couple of years, and it works fine. I have it configured to simply back up to local storage on my web host, and I hadn’t really thought about it much since I set it up. But of course backing up files to the same place that’s hosting them isn’t a great system. It’ll protect me against some possible issues, but it won’t be much help if something happens with my web host and I lose access to my account, or if someone breaks in to my account and deletes or scrambles all my files.
UpdraftPlus supports copying its backup files to DropBox, Google Drive, or several other possible offsite destinations. I don’t know why I’d never set this up, but I decided that it was past time I did that, so I started messing around. I found that the DropBox support was easy to set up, but just didn’t work for me. It would partially copy the backup to DropBox, then it would get stuck and never finish. This has got to be some kind of configuration issue on my host; Updraft is a pretty mature plugin and it gets updated frequently, so if there was some general issue with Updraft’s DropBox support, they would have fixed it.
I didn’t want to spend a lot of time trying to figure out the DropBox issue, so I thought I’d just try Google Drive instead. The Google Drive support requires getting an API key from Google. Updraft’s documentation has a good write-up on how to do that, but Google has changed their interface for doing that, so the write-up didn’t quite match the interface. I probably could have stumbled my way through it, but I decided to punt on that too, since there was a good chance that whatever issue was causing the DropBox backup to be so slow would affect Google Drive too.
So I went looking for another alternative. Updraft supports several other services, including OneDrive, which would have been my preferred alternative anyway. But OneDrive support isn’t included in the free version, and I didn’t want to pay for it, only to find out that it had the same problem as DropBox.
In the end, I decided to continue letting Updraft back up only to local storage, and then copy the backups to my Mac with a script that I could run locally. After flailing around a bit with a few options, I settled on using rsync. I’ve always connected to my web host with SSH, and rsync uses SSH to connect, so that worked fine.
One other related thing that I had never gotten around to setting up is key-based auth for SSH. I’d simply been connecting to my host with my user name and password. And, embarrassingly, I’d actually had a pretty simple password on my account until recently. I set a more complex password recently, so getting the public/private key auth working was something I really needed to do too. Well, it turns out that wasn’t nearly as complicated as I (for some reason) thought it would be. I just had to generate a key on my Mac, and then copy it into an authorized_keys file on my host.
I have Updraft configured to send me an email every time it finishes a backup. (I do weekly backups.) So now, every time I get that email, I just need to run a shell script that runs rsync and copies the backup down to my Mac. Easy enough. A fully-automated solution would be better, and maybe someday I’ll talk myself into paying for UpdraftVault or VaultPress, but I should be fine for now.