From ad4633d88c40a547a7cca86cea2a26940189cc53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oscar=20Meg=C3=ADa=20L=C3=B3pez?= Date: Sun, 16 Sep 2018 21:32:36 +0200 Subject: [PATCH 1/3] Added option OVERRIDE_BACKUP_DIRECTORIES in config file because was in README.md, but didn't work --- cya | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/cya b/cya index af1329b..cba6951 100755 --- a/cya +++ b/cya @@ -120,6 +120,13 @@ then CONFIG_ARRAY[${CONFIG_DATA[0]}]="$CONFIG_DATA_VALUE" done + # Override BACKUP DIRECTORIES + if [[ CONFIG_ARRAY[OVERRIDE_BACKUP_DIRECTORIES] ]] + then + IFS=' ' read -a DATA <<< "${CONFIG_ARRAY[OVERRIDE_BACKUP_DIRECTORIES]}" + BACKUP_DIRECTORIES=("${DATA[@]}") + fi + # Update BACKUP DIRECTORIES if [[ CONFIG_ARRAY[BACKUP_DIRECTORIES] ]] then From 8c608dfb0a3bd11eb2f3b632139387373ef41cc0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oscar=20Meg=C3=ADa=20L=C3=B3pez?= Date: Mon, 17 Sep 2018 06:38:25 +0200 Subject: [PATCH 2/3] Updated VERSION and changelog file --- changelog | 3 +++ cya | 2 +- version | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/changelog b/changelog index e697974..4920cc5 100644 --- a/changelog +++ b/changelog @@ -1,3 +1,6 @@ +2.5 - 17 September 2018 +* Fixed Override BACKUP DIRECTORIES option that didn't work + 2.4 - 14 August 2018 * Exclude directories from mydata command diff --git a/cya b/cya index cba6951..85ac48a 100755 --- a/cya +++ b/cya @@ -20,7 +20,7 @@ HEADER ###################################################################### # Version number -VERSION="2.4" +VERSION="2.5" # Title variable TITLE="Cover Your Ass(ets)" diff --git a/version b/version index 6b4950e..95e3ba8 100644 --- a/version +++ b/version @@ -1 +1 @@ -2.4 +2.5 From 00460d1c62ef35722a93bcf7236463a34d0c32c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oscar=20Meg=C3=ADa=20L=C3=B3pez?= Date: Mon, 17 Sep 2018 09:26:36 +0200 Subject: [PATCH 3/3] Add feature to allow subdirectories in BACKUP_DIRECTORIES option For instance, if BACKUP_DIRECTORIES="/usr/local/bin/" only will backup this subdirectory. --- changelog | 3 +++ cya | 3 ++- version | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/changelog b/changelog index 4920cc5..c41bd6c 100644 --- a/changelog +++ b/changelog @@ -1,3 +1,6 @@ +2.6 - 17 September 2018 +* Add feature to allow subdirectories in BACKUP_DIRECTORIES option + 2.5 - 17 September 2018 * Fixed Override BACKUP DIRECTORIES option that didn't work diff --git a/cya b/cya index 85ac48a..940b62f 100755 --- a/cya +++ b/cya @@ -20,7 +20,7 @@ HEADER ###################################################################### # Version number -VERSION="2.5" +VERSION="2.6" # Title variable TITLE="Cover Your Ass(ets)" @@ -442,6 +442,7 @@ RSYNC_BACKUP_GO() { # Run directory backup echo -n "Backing up ${BACKUP_DIRECTORY} ... " + SUDO_RUN "mkdir -p $RESTORE_DIR/$BACKUP_NAME${BACKUP_DIRECTORY}" SUDO_RUN "rsync -a --delete-excluded $EXCLUDE_DIRS$BASE_DIR${BACKUP_DIRECTORY} $RESTORE_DIR/$BACKUP_NAME${BACKUP_DIRECTORY}" echo " complete" BACKUP_STATE="on" diff --git a/version b/version index 95e3ba8..5154b3f 100644 --- a/version +++ b/version @@ -1 +1 @@ -2.5 +2.6