Learn how to backup your self-hosted Ghost install
ghost backup
command.
If you need to perform a manual backup of your data, the following guide walks you through all of the steps.
.json
file, with a name likemy-site.ghost.2020-09-30-14-15-49.json
.
redirects.yaml
orredirects.json
depending on your Ghost version. If you’re using custom routes, clickDownload current routes.yamlto get yourroutes.yaml
file.
.zip
file.
cd
to thecontent
directory: cd /var/www/ghost/content
Then,zip
theimages
and other file storage directories with their contents zip -r content-files.zip images/ files/ media/
Then, to move the zip files from your server onto your local machine. scp user@123.456.789.123:/var/www/ghost/content/content-files.zip ~/Desktop/content-files.zip
sudo chown -R ghost:ghost content
Once this is complete, restart Ghost: ghost restart
ghost.json
backup which you exported earlier.
routes.yaml
and redirects.yaml
files that you previously downloaded for your backup data.