Skip to content

Instantly share code, notes, and snippets.

@ngstigator
Created August 15, 2017 21:17
Show Gist options
  • Save ngstigator/032b3810da98729a4fc04ca2aeebabc6 to your computer and use it in GitHub Desktop.
Save ngstigator/032b3810da98729a4fc04ca2aeebabc6 to your computer and use it in GitHub Desktop.
#!/bin/bash
BACKUP_DIR=/home/web/db
DB_FILE=$(ls $BACKUP_DIR -tp |grep -v /$ | head -1)
s3cmd put $BACKUP_DIR/$DB_FILE s3://{BUCKET_NAME}/db/$DB_FILE 2>&1
#echo $DB_FILE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment