I am trying to backup my current cms ghost site on self hosted site.
The ghost cms has following folders:
a) content (this has themes folder, but the “themes” folder in this is a symlink to “source” theme.
b) current (has a symlink that goes to : versions/5.83.0
c) system
d) versions: has folders 5.82.12 and 5.83.0
Apart from database which of the above folders should I backup regularly?
As I see from the forum most of them suggested to have backup of “content” folder. Will that suffice? Please guide .
The content folder contains all uploads, themes, etc.
versions is just a collection of the installed Ghost versions. In case of a complete crash, you can simply re-install that with the ghost-cli, in my eyes, no need to back that up.
Thanks for reply. But when taking the the backup of content folder it does not contain my active theme “source” (it appears as symlink) . All other themes are there in content. This is how it looks in themes folder.: Upload and share screenshots and images - print screen online | Snipboard.io . So how do I take theme backup from content folder?
Source is Ghost’s default theme, it comes as part of Ghost when you install it. That’s why it’s a symlink. You don’t need to back it up as it’ll be there when you create a new install
Oh I see, in that case I would grab a copy of the theme you’ve edited which should reside in ghost/core/content/themes/source. I’d then rename it to “Source - Custom” or something similar and use the theme upload options in your new installation so you can work on it without it getting overwritten when Ghost is updated.
ok when I go to /content/themes/source (source is a symlink) it takes me to “/versions/5.83.0/content/themes/source” , so I have to backup the files at location “5.83.0/content/themes/source” correct?
But from a more general and sustainable perspective, the proper way to do the theme edits is to copy the folder to the directory David mentioned. This way, it will be included in the normal content folder and you have a clear separation between stuff you have done and stuff that comes directly from Ghost.
If it’s a self-hosted version wouldn’t it be easier to backup entire system?
Restoring in case you are discribing will be painful.
What if entire server is died? You’ll need to configure everything from the scratch and later put the backuped data back to the needed folders.
I ask this because if you are using any type of virtualization or conteinerization you can backup everything in a one shot. If you are not, you should consider of moving to containers.
In order to simplify your approach I would recommend to maybe build a bash script to copy and move all the files and then use a crontab to do it automatically and regularly. Automated restore script is always good idea