Created
April 15, 2018 13:38
-
-
Save 0xKayvan/98ef2d294daa12ca7a9c20a04313e996 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/sh | |
DIR=`date +%Y-%m-%d-%H-%M-%S` | |
DEST=/root/db_backups/$DIR | |
mkdir $DEST | |
mongodump -o $DEST | |
scp -r /root/db_backups/$DIR 7030backup:/root/mongodb_backups/$DIR |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment