You are a blogger, and have abundant contents in your blog, you need to backup your contents. So, if the hosting or server contains your blog messed up, you have your backup. I use Ghost blog because it’s simple, easy, lightweight, SEO friendly. I have use Ghost framework for my blogging platform. I have tried from WordPress or other blogging platform, Ghost satisfied me.
There’s two different ways to back up your ghost blog. One is through the admin interface and the other is to use the command line to just back up all the files. To use the admin interface what you can do is you can go to your ghost blog admin page.
Backup via Labs
We only need to put a slash ghost to access admin page. Just like you would to write a post or anything, go to Labs and hit the export button. This is going to export a JSON file that has all of your post data in it, all your tags, all your content everything like that. Now you can take this and import it into any other Ghost blog you want and you’ll have everything back except for the images, because this is just a text file. It doesn’t actually store any of the images with the export tool.
Backup via CLI
There’s currently no way to grab the images from the admin interface. That’s going to come in time but at this point right now there isn’t a way to do that. The way to do that is to use SSH to backup your Ghost blog. Some services don’t have SSH access like Ghost (Pro) or any other shared hosting services.I’m sure if you ask them they’ll gladly give it to you. But if you have a VPS or cloud server like UpCloud, Digital Ocean or something like that you can go ahead and SSH in your Ghost blog and make a full backup.
So, SSH to where your Ghost blog lives. We are not going to deep in details about how to use SSH, it is already covers by others. After you success to login to your VPS, go to your Ghost blog folder. Usually default installation of Ghost blog at
/var/www. So, point to your site public folder. Below command change to your domain.
The first thing you want to do is you want stop Ghost service because you don’t want it running when you’re making a database copy because it could corrupt something.
As you can see, there are several folder and files. You just need to copy
content folder to somewhere safe. Now that Ghost service already stop running, we’re just going to sudo copy everything or compress this folder. Keep the compressed file.
You need to do it regularly from this guide to backup you Ghost post. To recover your blog, just replace the
content folder and import your JSON file in the Labs.
Originally posted 2019-01-23 17:55:00.