Back up and restore DecapodΒΆ

The decapod-admin tool allows you to manually create a backup of Decapod and its configuration and restore it.

Decapod stores its state in MongoDB. Restoring the database backups restores all the Decapod data except the internal container state, such as the data from ceph-monitoring that is refreshed every 10 minutes by default. However, you can collect such data explicitly using the docker-compose exec controller decapod-collect-data command.

To perform a backup:

$ docker-compose exec -T admin decapod-admin db backup > db_backup

To restore Decapod:

$ docker exec -i $(docker-compose ps -q admin) admin decapod-admin restore < db_backup


Using docker-compose exec to perform the restore is currently not possible due to a docker-compose bug.

Alternatively, use the and scripts in the ./scripts directory:

  1. Run the scripts:

    $ ./scripts/ /var/backup/decapod_db
    $ ./scripts/ /var/backup/decapod_db
  2. Add the backup to Cron:

    0 */6 * * * /home/user/decapod_scripts/ -p decapod -f \
    /home/user/decapod_runtime/docker-compose.yml /var/backups/decapod/\
    decapod_$(date --iso-8601) > /var/log/cron.log 2>&1