Skip to content

Commit

Permalink
whoops
Browse files Browse the repository at this point in the history
  • Loading branch information
keithhubner committed May 2, 2024
1 parent dcd6368 commit bec2da9
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions backup_script.sh
Expand Up @@ -36,13 +36,9 @@ function create_directorys() {
echo "Log file: $LOGFILE"
}

function create_log_file() {
echo "Creating log file..."
LOGFILE="$APP_DIR/logs/backup-$TIMESTAMP.log"
echo "Log file: $LOGFILE"
}

function run_backup() {
BACKUP_FILE="$APP_DIR/backups/$DB_NAME-$TIMESTAMP.sql"
echo "Backup file: $BACKUP_FILE"
echo "[$LOG_TIMESTAMP] Starting backup..."
echo "Running mysqldump..."
mariadb-dump -h "$DB_HOST" -u "$DB_USER" -p"$DB_PASSWORD" "$DB_NAME" > $BACKUP_FILE
Expand Down Expand Up @@ -82,7 +78,6 @@ function cleanup() {

function main() {
create_directorys
create_log_file
run_backup
run_s3_backup
cleanup
Expand Down

0 comments on commit bec2da9

Please sign in to comment.