Taking MOngodb Backup

https://github.com/xpressabhi/mup-data-backup

Backup

Take backup of running app data from docker then copy to local folder out of docker.
docker exec -it mongodb mongodump --archive=/root/mongodump.gz --gzip
docker cp mongodb:/root/mongodump.gz mongodump_$(date +%Y-%m-%d_%H-%M-%S).gz

Copy backup to server

Move data to another server/local machine or a backup location
scp /path/to/dumpfile root@serverip:/path/to/backup

Comments

Popular posts from this blog

Setting up Orthanc server on Ubuntu 16

How to install COMODO SSL Certificates for NGINX

HTML