Additional ghost-cli commands & documentation for backup & restore


I think the ghost update command is very useful, but I would see a few extras to it, namely:

  • ghost backup: compresses files (content, themes, images, etc.) to sitename.tgz, exports database to sitename.sql
  • ghost restore: restores a Ghost site from backup (could be two different commands: restoredb, restorefiles)

And I would add basic documentation for the above processes, with or withouth the cli update, though I know it is a bit outside the scope for the Ghost team, but I think it would be useful info for the community.

  • how to backup your Ghost blog (+ automated via a cron job)
  • how to restore your Ghost blog from backup

I wrote this because I was looking for some scripts for the above processes and I found a couple of python ones that seemed a bit over complicated for me (but could be used as a starting point if someone wants to contribute with these commands).

I can contribute with just simple crontab commands that would just run the above commands (i.e. tar cvfz sitename.tgz /var/www/ghost and mysqldump -u user -p mysqlserver sitename > sitename.sql) but I feel it should offer a bit more options than this. :slight_smile:

What do you all think?