2022-11-04 20:22:07

This commit is contained in:
2022-11-04 20:22:07 -04:00
parent 1377286da2
commit 43802ad996

View File

@@ -1,18 +1,44 @@
#!/bin/bash
#--- --- --- --- --- --- --- --- --- --- --- --- --- --- ---#
## script was written with daily, dated, backups from holland backup #
## mysqldump per table in directories with date/time like
## /backups/daily/20221104_65127/backup_data/database-name.sql.gz
##
### path to archive directory. e.g., /home/backupusr/backups/daily/
ARCHPATH='/path/to/backup/daily/'
### sudirectory from date. e.g., /backup_data/
SUBDIR='backup_data'
### databases to skip. e.g., mysql
SKIPDBS=('mysql')
### restore only changed databases or restore all
FULLRESTORE=false
### database to use for master log position
SETPOSDB=db_for_master_log_position
### config file for mysql credentials
CFG='~/.my.cnf'
### dry-run will show actions for testing
DRY_RUN=false
### noprompt for skipping user input
NOPROMPT=false
### do not start will not restart replication when complete
DONOTSTART=false
CMD=''
### values for configuring replication master
MASTER_HOST=''
MASTER_USER=''
MASTER_PASSWORD=''
#--- --- --- --- --- --- ---#
# #
#--- --- --- --- --- --- --- --- --- --- --- --- --- --- ---#
while [[ $# -gt 0 ]]; do
case $1 in
@@ -66,7 +92,7 @@ while [[ $# -gt 0 ]]; do
shift 2
;;
-h|--help)
echo -e "\n\n\t ______________________________ MySQL restoration script options ____________________________________\n"
echo -e "\n\n\t _____________________________/‾‾‾ MySQL restoration script options ‾‾‾\____________________________________\n"
echo -e "\t | arg | | type | default |\n"
echo -e "\t ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾"
echo -e "\t -h| --help display this menu [ flag ]"