Created
October 8, 2018 20:23
-
-
Save KielRodriguez/4a59358555d3cb27838bef85fb975288 to your computer and use it in GitHub Desktop.
This file contains 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 characters
#!/bin/bash | |
# Create mongodb backupd | |
DATABASE_NAME=$1 | |
CURRENT_DATE=`date '+%d%m%Y'` | |
FULL_NAME="$DATABASE_NAME.${CURRENT_DATE}.gz" | |
echo $FULL_NAME | |
mongodump --archive=$FULL_NAME --gzip --db $DATABASE_NAME --output "/tmp/mongodump_${FULL_NAME}.log" & |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment