Ghost’s out of the box import/export backup mechanism works well, but doesn’t backup images.

I wanted a simple command line I could call to backup my blog and move the backup file out of the server’s file system. Also, I didn’t want to stop Ghost’s node process to create the backup.

By default, Ghost uses sqlite as a database, which provides an easy way to perform online backups.

Below is a Gist of a small Bash script I put together to login to the blog’s server, perform the online backup of the database, gzip that together with the image folder and then copy over to the local machine.