Back up and restore databaseΒΆ
Using the decapod-admin
tool, you can back up and restore MongoDB, the
main storage system used by Decapod. The archive format created by this tool
is a native MongoDB archive that is compressed by default.
The output of decapod-admin db backup and
decapod-admin db restore is similar to the output of
mongodump --archive --gzip and
mongorestore --archive --gzip. The decapod-admin
tool uses
/etc/decapod/config.yaml
to read Decapod MongoDB settings and correctly
constructs the command line taking the SSL settings into account.
To get a list of available commands and options, run
decapod-admin db --help.
To back up the database:
$ decapod-admin db backup > backupfile
To restore the database:
$ decapod-admin db restore < backupfile
If you do not require compression, use the -r
flag. In such case,
mongodump
and mongorestore
will not use the --gzip
flag.