From f7ed9ac02bc55e1d76b9c59b316e645aaf7284de Mon Sep 17 00:00:00 2001 From: emkael Date: Sun, 23 Oct 2022 13:29:58 +0200 Subject: S3 backup script for butler DBs --- dumps/.backup | 3 +++ dumps/backup-dbs.sh | 6 ++++++ dumps/backup/.gitignore | 1 + 3 files changed, 10 insertions(+) create mode 100644 dumps/.backup create mode 100755 dumps/backup-dbs.sh create mode 100644 dumps/backup/.gitignore (limited to 'dumps') diff --git a/dumps/.backup b/dumps/.backup new file mode 100644 index 0000000..268874a --- /dev/null +++ b/dumps/.backup @@ -0,0 +1,3 @@ +dmp202223_b0 +dmp202223_b1 +dmp202223_b2 diff --git a/dumps/backup-dbs.sh b/dumps/backup-dbs.sh new file mode 100755 index 0000000..29e6367 --- /dev/null +++ b/dumps/backup-dbs.sh @@ -0,0 +1,6 @@ +#!/bin/bash +cd $(dirname $0) +grep -v '^#' .backup | while read DB +do + mysqldump --column-statistics=0 ${LIGA_MYSQL_CONNECTION_OPTS} $DB > backup/$DB.sql +done diff --git a/dumps/backup/.gitignore b/dumps/backup/.gitignore new file mode 100644 index 0000000..d1b811b --- /dev/null +++ b/dumps/backup/.gitignore @@ -0,0 +1 @@ +*.sql -- cgit v1.2.3