1 min read

备份ghost博客站点数据并恢复

备份ghost博客站点数据并恢复
How to backup your self-hosted Ghost install - Ghost Developers
Find out how tobackup your self-hosted Ghost install using Ghost CLI, or by performing a manual backup.

一、备份

1、登录 Ghost Admin,导航到“实验室”视图,然后单击“导出”以下载所有内容。这将是一个 .json 文件

2、单击“下载当前重定向”以获取重定向文件。

3、下载当前路由.yaml以获取文件 routes.yaml 。

4、导航到“设计设置”页,然后导航到“主题”部分以下载活动主题以及要存储的任何其他主题。这将是一个 .zip 文件。

5、压缩内容文件

zip -r content-files.zip images/ files/ media/

6、从 Ghost Admin 的“成员”仪表板将所有成员导出到一个 CSV 文件中。

二、恢复

1、复制图像、文件和媒体

2、导入之前导出的 ghost.json 备份。

3、导入routes.yaml 和 redirects.yaml

4、在 Ghost Admin 的“设计设置”页面中上传主题

5、导入成员

刷新页面,可以看到恢复完成。