Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
executable file 22 lines (16 sloc) 556 Bytes
MONGODUMP_PATH="/usr/bin/mongodump --username admin --password zqdnGPqX"
TIMESTAMP=`date +%F-%H%M`
# Create backup
# Add timestamp to backup
mv dump mongodb-$TIMESTAMP
tar cf mongodb-$TIMESTAMP.tar mongodb-$TIMESTAMP
# Upload to S3
s3cmd put mongodb-$TIMESTAMP.tar s3://$S3_BUCKET_NAME/$S3_BUCKET_PATH/mongodb-$TIMESTAMP.tar
# Delete everything when we're finished
rm -R -f mongodb-$TIMESTAMP
rm mongodb-$TIMESTAMP.tar
#clear old logs off S3