Did I miss out any step for backing up ghost?

I want to back up my ghost blog.

These are the steps I took. Please check if I missed out any step.

  • Go to Settings->Lab, export all contents.
  • Download current redirects
  • Download current routes.yaml
  • Make a copy of images folder inside content folder

Is that all? Did I miss out anything else?

Thank you.

The content export doesn’t include all Ghost data as it’s designed to help you move content. You’ll want to take a full SQL dump/backup of your database. Other than that, you can back up the entire content folder since that’s where all user-specific data is :slight_smile:

For the database, Is it sufficient to backup the database with Filezilla eg backing up the mysql folder, or do you have to do it from the ghost console?

You’d probably want to use something like mysqldump which comes with MySQL / MariaDB

I exported the content and made a backup copy of the entire content folder.

Do I still need to back up the ghost database? Does the database contain data not covered by the above?

Yes:

I have already made a backup of the entire content folder. May I ask what else is not covered by the database?

That’s the best answer I can give you since that’s all I know :slight_smile: The guidance that the Ghost team has provided across different threads is if you’re looking to move your content around, you can use the content importer/exporter (which does not include members as far as I’m aware), and if you’re looking to take a backup, you need to make a backup of your database

1 Like

Thanks for the info, but if all the files in the MYSQL folder are backed up via SFTP, that should be ok in theory? Is there anything else it could miss by doing this?

Docs are your friend ;-) If you’re just copying files without doing any of the other setup then it’s possible you may miss data.

https://dev.mysql.com/doc/mysql-backup-excerpt/5.7/en/backup-methods.html

1 Like

Thanks, I will have to study that. Since I’m looking for the simplest method possible. I guess a complete server backup is the quickest way. There is a script here I found:

but I haven’t had the time to get it set up yet to see if I can make it work…

If you just copy the files for the database on the filesystem you might lose data or get a not consistent state for the backup later.

During that copy process you or your app (ghost) could take an action like a scheduled post or anything else which writes to the database (also automatic scripts/processes in the background without user interaction).
This action will not be recognised by the copy process when the copy process already started and the change is happening in the middle and might break your backup file or make it not consistent.

You have to 2 options:

  1. Use sql dump to to create a consistent backup

  2. Shutdown the ghost service and then the mysql service and make a file copy backup. The shutdown should be graceful and not forced.
    Then you can get a consistent backup from a file copy.

In all other cases there is no guarantee for a consistent backup. This applies to all applications using databases.

One exception: you application offers you a full backup feature itself.

A lot of people will tell you that a file based backup is still fine while the service is running.
But it is just luck. You just might not have enough users using your app and therefore have a higher probability to get the lucky state.

That is at least my experience with application using databases.

1 Like