File: support-DOMONTHLY-and-OPTIONS-configurations.patch

package info (click to toggle)
automysqlbackup 2.6%2Bdebian.4-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, sid, trixie
  • size: 228 kB
  • sloc: sh: 1,373; makefile: 46
file content (56 lines) | stat: -rw-r--r-- 1,866 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
Description: Support DOMONTHLY=xx and a new OPTIONS="xx" configurations
Author: Stephan Bodmer <sbodmer@lsi-media.ch>
Bug-Debian: https://bugs.debian.org/812578
Forwarded: no
Last-Update: 2020-07-27

--- automysqlbackup-2.6+debian.4.orig/automysqlbackup
+++ automysqlbackup-2.6+debian.4/automysqlbackup
@@ -76,6 +76,10 @@ SEPDIR=yes
 # Which day do you want weekly backups? (1 to 7 where 1 is Monday)
 DOWEEKLY=6
 
+# Which day of the month to execute the monthly backup (00 = no monthly backup)
+# Two digit required
+DOMONTHLY=01
+
 # Choose Compression type. (gzip or bzip2)
 COMP=gzip
 
@@ -103,6 +107,9 @@ SOCKET=
 # Backup of stored procedures and routines
 ROUTINES=yes
 
+# Mysqldump additional option (like "--single-transaction")
+OPTIONS=""
+
 fi
 
 #=====================================================================
@@ -430,7 +437,7 @@ dbdump () {
 	if [ "$1" = "information_schema" ] ; then
 		NEWOPT="--skip-opt ${OPT}"
 	else
-		NEWOPT="--opt $OPT"
+		NEWOPT="--opt $OPT $OPTIONS"
 	fi
 
 	if [ "$COMPDIRECT" = "yes" ] && ( [ "$COMP" = "gzip" ] || [ "$COMP" = "bzip2" ] ); then
@@ -551,7 +558,7 @@ if [ "$SEPDIR" = "yes" ]; then
 echo Backup Start Time `date`
 echo ======================================================================
 	# Monthly Full Backup of all Databases
-	if [ "$DOM" = "01" ]; then
+	if [ "$DOM" = "$DOMONTHLY" ]; then
 		for MDB in $MDBNAMES
 		do
  
@@ -621,7 +628,7 @@ else # One backup file for all DBs
 echo Backup Start `date`
 echo ======================================================================
 	# Monthly Full Backup of all Databases
-	if [ "$DOM" = "01" ]; then
+	if [ "$DOM" = "$DOMONTHLY" ]; then
 		echo Monthly full Backup of \( $MDBNAMES \)...
 			dbdump "$MDBNAMES" "$BACKUPDIR/monthly/$DATE.$M.all-databases.sql"
 			BACKUPFILES="$BACKUPFILES $BACKUPDIR/monthly/$DATE.$M.all-databases.sql$SUFFIX"