File tree Expand file tree Collapse file tree 5 files changed +22
-37
lines changed Expand file tree Collapse file tree 5 files changed +22
-37
lines changed Original file line number Diff line number Diff line change 8383
8484echo " " >> $BACKUPLIST
8585
86- echo " " >> $LOGFILE
87- echo " Executing prebackup scripts" >> $LOGFILE
88- bash ./scripts/backup_restore/pre_backup_complete.sh >> $LOGFILE 2>&1
86+ echo " Stopping stack to get consistent database backups" >> $LOGFILE
87+ docker-compose stop >> $LOGFILE
88+
89+ if [ -f " ./pre_backup.sh" ]; then
90+ echo " " >> $LOGFILE
91+ echo " ./pre_backup.sh file found, executing:" >> $LOGFILE
92+ bash ./pre_backup.sh >> $LOGFILE 2>&1
93+ fi
8994
9095echo " ./services/" >> $BACKUPLIST
9196echo " ./volumes/" >> $BACKUPLIST
121126echo " Backup Size (bytes): $( stat --printf=" %s" $TMPBACKUPFILE ) " >> $LOGFILE
122127echo " " >> $LOGFILE
123128
124- echo " Executing postbackup scripts" >> $LOGFILE
125- bash ./scripts/backup_restore/post_backup_complete.sh >> $LOGFILE 2>&1
126- echo " " >> $LOGFILE
129+ if [ -f " ./post_backup.sh" ]; then
130+ echo " ./post_backup.sh file found, executing:" >> $LOGFILE
131+ bash ./post_backup.sh 2>&1 >> $LOGFILE
132+ echo " " > $LOGFILE
133+ fi
134+
135+ echo " Starting stack back up" >> $LOGFILE
136+ docker-compose start
127137
128138echo " Finished At: $( date +" %Y-%m-%dT%H-%M-%S" ) " >> $LOGFILE
129139echo " " >> $LOGFILE
Load Diff This file was deleted.
Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -77,9 +77,12 @@ sudo tar -zxvf \
7777
7878echo " " >> $LOGFILE
7979
80- echo " Executing post restore scripts" >> $LOGFILE
81- bash ./scripts/backup_restore/post_restore_complete.sh >> $LOGFILE 2>&1
82- echo " " > $LOGFILE
80+
81+ if [ -f " ./post_restore.sh" ]; then
82+ echo " ./post_restore.sh file found, executing:" >> $LOGFILE
83+ bash ./post_restore.sh 2>&1 >> $LOGFILE
84+ echo " " > $LOGFILE
85+ fi
8386
8487echo " Finished At: $( date +" %Y-%m-%dT%H-%M-%S" ) " >> $LOGFILE
8588echo " " >> $LOGFILE
You can’t perform that action at this time.
0 commit comments