Created
May 11, 2021 15:39
-
-
Save zerefdev/0a51a4a77efa5b3417059b2309045917 to your computer and use it in GitHub Desktop.
Revisions
-
zerefdev created this gist
May 11, 2021 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,11 @@ #!/bin/sh BACKUP_NAME=mongo_backup_`date +"%d-%m-%Y"`.gz DB=db_name USER=db_user PASS=db_password echo "Dumping MongoDB $DB database to compressed archive" mongodump --db $DB --username=$USER --password=$PASS --archive=$HOME/backups/$BACKUP_NAME --gzip echo "Backup complete!"