Member-only story

Back Up Your Ghost Blog with Google Drive

Knox Lively
5 min readMar 24, 2020

--

Introduction

I recently set up a new blog using the Ghost blogging platform on a self-hosted AWS EC2 instance. With many thanks to my years of experience as a DevOps Engineer, I was able to set up a snapshot policy to fully back up the drive of the instance each night. However, this isn’t a free option, and I’d like a more modular way to back up just the blog itself and its corresponding configurations. This way I could easily export my blog to another hosting platform if I were to choose to do so.

I began to search around for the cheapest (ideally free) options available. There were a few criteria that had to be met for this solution.

  1. Utility, app or a script to execute the backup.
  2. A location to store the backup.
  3. Some kind of versioning system that allowed me to pick and choose which backup to restore.

Working backward I decided it was easiest, and free, to use the cloud storage provider I already use every day, Google Drive. This solution would knock out two of my criteria, a location to store the backup, as well as a handy versioning system already built into the application. That leaves with one last requirement, the actual utility that will perform the backup. Enter ghost-backup.

How ghost-backup works

  1. Schedules a daily task to perform the backup.
  2. Automatically outputs the backup archives in your Google Drive.
  3. Ability to get a notification (via Telegram) about the status of your most recent backup.

Setup

Setup is quite simple and only involves two commands. The only prerequisite is that you must have Python 3 installed and configured. Follow this tutorial if you need help doing so.

Clone the repo

git clone https://github.com/gonzolively/ghost-backup && cd ghost-backup

Run the setup script

python3 setup.py

After running this script you’ll be taken through an interactive setup process, albeit crude and command-line based. In addition to backing up your blog posts, you can also back up the images and…

--

--

Knox Lively
Knox Lively

Written by Knox Lively

Author 📚 | Developer 👨🏻‍💻 | Curious as a 🐈 knoxlively.com

No responses yet