From 79bfb8784f700b6f112cc76a62892b84a25df139 Mon Sep 17 00:00:00 2001 From: mattf Date: Tue, 6 Oct 2015 17:42:23 +0000 Subject: [PATCH] Added archive_path flag to ADMIN_backup.pl, issue #896 git-svn-id: svn://192.168.202.10@2394 3d104415-ff17-0410-8863-d5cf3c621b8a --- agc_2-X/trunk/bin/ADMIN_backup.pl | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/agc_2-X/trunk/bin/ADMIN_backup.pl b/agc_2-X/trunk/bin/ADMIN_backup.pl index e12c8e7b..4e4d8a54 100644 --- a/agc_2-X/trunk/bin/ADMIN_backup.pl +++ b/agc_2-X/trunk/bin/ADMIN_backup.pl @@ -20,6 +20,7 @@ # 141103-1505 - Added option to export without leads, logs, servers or phones # 141124-2309 - Fixed Fhour variable bug # 150418-1801 - Added --db_raw_files_copy flag, issue #839 +# 151006-1337 - Added archive_path flag, issue #896 # $secT = time(); @@ -65,6 +66,7 @@ if (length($ARGV[0])>1) print " [--debug] = debug\n"; print " [--test] = test\n"; print " [--db_raw_files_copy] = if set the backup won't be a mysql dump. It will tar the /var/lib/mysql folder. WARNING, THIS OPTION WILL STOP THE MYSQL SERVER!\n"; + print " [--archive_path=/PATH/FROM/ROOT] = absolute path to store the resulting backup\n"; exit; } else @@ -142,6 +144,14 @@ if (length($ARGV[0])>1) if ($args =~ /--db_raw_files_copy/i) { $db_raw_files_copy = 1; + print "\n----- DB raw files copy -----\n\n"; + } + if ($args =~ /--archive_path=/i) + { + @data_in = split(/--archive_path=/,$args); + $ARCHIVEpath = $data_in[1]; + $ARCHIVEpath =~ s/ .*$//gi; + print "\n----- Archive path set to $ARCHIVEpath -----\n\n"; } } }