Hey, you self hosters out there. What/how are you guys backing up your ghost installs?
I know we can download the JSON file, but I would love for a way to automate the export of the /content directory, as well as the JSON file on a schedule. Perhaps send to object storage (s3?) somehow.
I’m looking at this now. The plan I’m considering is using Ansible to configure Autorestic to back up to BackBlaze B2.
I’m already familiar with Ansible. If you aren’t, you might want to skip that layer.
Ansible+autorestic allows me to manage all the configuration details including the installation details in a YAML file.
I plan to define the of the server with Ansible, so I’ll have all the configuration details in one place.
I’m not sure if I’ll even bother to run mysqldump or just instead backup the underlying the file system.
Even if the filesystem isn’t completely “clean” when a snapshot is taken, MySQL should still be able to recover and boot. Whether to use mysqldump or not is a detail I may look into more!
Actually, I will add one layer to my system, which is 1Password for secret storage. Ansible playbooks can be easily written to pull secrets from a password manager.
So the Ansible playbooks can be reasonable stored in git as a backup and rollback option without the secrets being embedded there.
A few days ago, Diolinux, a blog here in Brazil, had problems with Digital Ocean backups and Snapshots. The files were all corrupted. And he reports that Digital Ocean support didn’t solve his problem.
I’ve been using CloudPanel.
It makes daily backups in a cloud of my choice (OneDrive) and dumps the database.
Snapshots of the machine are made with Oracle.
When I needed to, I was able to restore the services in both cases.
It depends on your hosting. Digital Ocean does it (it’s an additional service that comes with a price) and I heard Pikapods will do it in a few months too.
use the software that are designed for website backup. There are many option available in free and paid trial like, automatic backup, Schedule backup and cloud storage integration.
Ghost has no plugins, so there aren’t really software to back it up. If you do self hosting, it must be integrated in your hosting. Digital Ocean has it, while others not.
I’m considering extending it to add this Ansible Role for the Restic backup tool along with BackBlaze B2 backups.
The idea is simply by defining a new Ghost blog in my Ansible config, per-site backups with Restic would automatically be set up for it. So, rather than restoring a snapshot of the whole filesystem, I would be able to restore just the files or MySQL database for a single Ghost instance.
But since I’m using Ansible, I would only have to define the backup scheme once for it be available to all my Ghost installs.