Backup Strategy for Self-Hosted, Multi-Author Pressbooks Instance

Hi,

I’m new to the technical side of things and looking for advice on setting up a more granular backup strategy for our self-hosted Pressbooks instance at my institution.

We already perform regular full system and database backups, but those are more suited for disaster recovery than for restoring specific book content. What we need is a book-level backup solution that would allow us to easily and selectively roll back changes when content is accidentally modified or deleted.

We host active book projects, each with multiple authors and collaborators, so the risk of unintentional changes is real.

Here are my main questions:

  1. Is there a programmatic way to back up all books individually on a regular schedule (e.g., twice a week/once a day)? Can this be automated with scripts or cron jobs?
  2. Can we regularly export all books (Pressbooks XML format (or WXR?)) using the Pressbooks API or a CLI tool? Do I understand correctly that this XML will not contain media files (images, PDFs, etc.) as binary files, but rather references their URLs? If so, how could we backup those files as well?
  3. From a best practices perspective:
  • Should we ask authors to manually export (or clone) their own books as a safeguard before making substantial changes or edits?
  • Or should all backup/versioning be handled at the system admin level?
  1. Are there any plugins you’d recommend for version control, automated exports, or rollback capabilities?

Any tips or examples from your own workflows would be helpful. Thanks

Marie-Hélène Vézina
Libraries, Université de Montréal

1 Like

Marie-Helene,

I don’t have as robust of a backup strategy as you are contemplating.

One of the reasons I don’t worry so much is the robust version history that WordPress does by default. Every version of a chapter is logged, with the ability to compare past versions to the current version. This has saved me in the past, where I can see that someone accidentally deleted parts or pieces of a chapter, and I was able to go back into the version history and restore pieces. This makes me feel fairly comfortable that between WordPress backups, and my full site backups I’d be ok. In the event that someone deleted an entire chapter, and then didn’t notice or ask for help for over 30 days when the chapter was purged from the trash, I’d have to restore a backup to a new location and then pull the materials over.

Onto your wishlist.

There is a premium plugin called UpdraftPlus. UpdraftPlus has a free version and a paid version. When you pay for the premium version, it gives you access to a network wide control panel. You can automate weekly backups of your entire network, and importantly, with the pro version, you can restore individual sites without restoring the entire network.

I’m not sure how they count multisites… Is 1 Multisite a single site so you have to buy the $70/year personal license, or does each subsite count as one, so you have to buy the $195/year enterprise license. I honestly don’t know.

It may be worth looking into!

very usefull info @beckej ! Thank you.