From f6f69201b4d05e8758d027e3a53c8d90442b4e36 Mon Sep 17 00:00:00 2001 From: Michael Stanclift Date: Thu, 4 Feb 2021 10:47:40 -0600 Subject: [PATCH] 3.2.6 (#141) * Adds backup cleanup back to process * Add backup cleanup to compare script when no changes are detected. * Trek reference * Redundant * 3.2.6 * 3.2.6 Co-authored-by: Michael Stanclift --- CHANGELOG.md | 4 ++++ VERSION | 2 +- gravity-sync.sh | 2 +- includes/gs-backup.sh | 2 +- includes/gs-compare.sh | 2 ++ includes/gs-hashing.sh | 1 + includes/gs-pull.sh | 1 + includes/gs-push.sh | 3 ++- includes/gs-smart.sh | 1 + 9 files changed, 14 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3c339cc..2c1f4a4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -47,6 +47,10 @@ The `./gravity-sync.sh restore` process completely revamped: - Correct error where Docker based installs would fail to restart if Docker exec commands required sudo privileges. - Correct error where setup script would prompt twice for Local/Remote DNSMASQ directories when using Docker. +#### 3.2.6 + +- Adds old backup removal tasks into push/pull/sync/compare functions. + ## 3.1 ### The Container Release diff --git a/VERSION b/VERSION index 448ada3..c4a602d 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -3.2.5 \ No newline at end of file +3.2.6 \ No newline at end of file diff --git a/gravity-sync.sh b/gravity-sync.sh index e3cbc08..1c7980f 100755 --- a/gravity-sync.sh +++ b/gravity-sync.sh @@ -3,7 +3,7 @@ SCRIPT_START=$SECONDS # GRAVITY SYNC BY VMSTAN ##################### PROGRAM='Gravity Sync' -VERSION='3.2.5' +VERSION='3.2.6' # For documentation or downloading updates visit https://github.com/vmstan/gravity-sync # Requires Pi-Hole 5.x or higher already be installed, for help visit https://pi-hole.net diff --git a/includes/gs-backup.sh b/includes/gs-backup.sh index ffc75bf..1bc7c77 100644 --- a/includes/gs-backup.sh +++ b/includes/gs-backup.sh @@ -100,7 +100,7 @@ function backup_remote_cname { } function backup_cleanup { - MESSAGE="Cleaning Up Old Backups" + MESSAGE="Scrubbing ${BACKUP_RETAIN} Redundant Antimatter Containment Pods" echo_stat find ${LOCAL_FOLDR}/${BACKUP_FOLD}/$(date +%Y)*.backup -mtime +${BACKUP_RETAIN} -type f -delete diff --git a/includes/gs-compare.sh b/includes/gs-compare.sh index 2635534..bb3b17e 100644 --- a/includes/gs-compare.sh +++ b/includes/gs-compare.sh @@ -23,5 +23,7 @@ function task_compare { previous_md5 md5_compare + backup_cleanup + exit_withchange } \ No newline at end of file diff --git a/includes/gs-hashing.sh b/includes/gs-hashing.sh index 6d21d9e..af5cedd 100644 --- a/includes/gs-hashing.sh +++ b/includes/gs-hashing.sh @@ -125,6 +125,7 @@ function md5_compare { else MESSAGE="No Replication Required" echo_info + backup_cleanup exit_nochange fi } diff --git a/includes/gs-pull.sh b/includes/gs-pull.sh index 642b49d..d5a9c96 100644 --- a/includes/gs-pull.sh +++ b/includes/gs-pull.sh @@ -219,6 +219,7 @@ function pull_gs { pull_gs_cname pull_gs_reload md5_recheck + backup_cleanup logs_export exit_withchange diff --git a/includes/gs-push.sh b/includes/gs-push.sh index 18d5e01..e4dbc4f 100644 --- a/includes/gs-push.sh +++ b/includes/gs-push.sh @@ -165,8 +165,9 @@ function push_gs { push_gs_cust push_gs_cname push_gs_reload - md5_recheck + backup_cleanup + logs_export exit_withchange } \ No newline at end of file diff --git a/includes/gs-smart.sh b/includes/gs-smart.sh index f8b7aa2..aa3fe9a 100644 --- a/includes/gs-smart.sh +++ b/includes/gs-smart.sh @@ -212,6 +212,7 @@ function smart_gs { fi md5_recheck + backup_cleanup logs_export exit_withchange