Skip to content

Instantly share code, notes, and snippets.

@imgeraldalinio
Created May 13, 2020 17:55
Show Gist options
  • Save imgeraldalinio/a0c25ff903523bb0d4f3f906e3751169 to your computer and use it in GitHub Desktop.
Save imgeraldalinio/a0c25ff903523bb0d4f3f906e3751169 to your computer and use it in GitHub Desktop.
#!/bin/bash
DBNAME=whatever
BACKUP=/home/ubuntu/s3_uploads
# Backup date
date=$(date +'%Y%m%d%H%M%S');
# Start exec backup..
mysqldump --defaults-extra-file=/home/ubuntu/.config.cnf $DBNAME > $BACKUP/mysqldump_$date.sql
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment