Skip to content

spodsoft/HomeLab

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

89 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Test #/bin/bash

DATE=$(date +%H-%M-%S) BACKUP=db-$DATE.sql

DB_HOST=$1 DB_PASSWORD=$2 DB_NAME=$3 AWS_SECRET=$4 BUCKET_NAME=$5

mysqldump -u root -h $DB_HOST -p$DB_PASSWORD $DB_NAME > /tmp/$BACKUP &&
export AWS_ACCESS_KEY_ID=AKIAJRWZWY3CPV3F3JPQ &&
export AWS_SECRET_ACCESS_KEY=$AWS_SECRET &&
echo "Uploading your $BACKUP backup" &&
aws s3 cp /tmp/db-$DATE.sql s3://$BUCKET_NAME/$BACKUP

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published