To backup your Grape instance you can use the backup script in the folder /data/grape/data/setup/current/extra.

It supports both taking “hot” backups (default, no downtime) and “cold” backups (instance gets shut down, backed up, started again).

The backups get stored in subfolders of the folder /data/grape/data/backup/.

Example output of a hot backup run:

grape@server:~$ /data/grape/data/setup/current/extra/ 
Running hot backup
Backing up media (in background)
Taking elasticsearch snapshot
Backing up /data/grape
tar: Removing leading `/' from member names
Backing up redis
Background saving started
Backing up postgresql
Waiting for backgroud jobs to finish...

Example output of a cold backup run:

grape@server:~$ /data/grape/data/setup/current/extra/ --cold
Running cold backup
Warning, this will stop and start the Grape instance
Press Ctrl-c within the next 10 seconds if this is not what you want
Creating compressed tar
tar: Removing leading `/' from member names

Pros and cons

Cold backup

  • Pro

    • Everything in one file, easier to restore in one go

  • Con

    • Downtime

    • Bigger backup size

Hot backup

  • Pro

    • No downtime

    • Elasticsearch backup is incremental, therefore saving space

  • Con

    • Elasticsearch snapshot dir has to be backed up separately (ideally mounted from a SAN/NAS)