File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed
share/github-backup-utils Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -17,9 +17,20 @@ prune_snapshot() {
1717 # ignore any directory that is included in inc_full_backup or inc_snapshot_data
1818 # the files should be filtered out earlier, but this is a safeguard to make sure.
1919 # inc_previous_* and prune_inc_previous are ignored by default
20- if grep -q " $prune_dir " " $GHE_DATA_DIR /inc_full_backup" || grep " $prune_dir " " $GHE_DATA_DIR /inc_snapshot_data" ; then
21- continue
20+ if [ -f " $GHE_DATA_DIR /inc_full_backup" ]; then
21+ if grep -q " $prune_dir " " $GHE_DATA_DIR " /inc_full_backup; then
22+ log_info " Skipping incremental backup directory: $prune_dir " 1>&3
23+ continue
24+ fi
25+ fi
26+
27+ if [ -f " $GHE_DATA_DIR /inc_snapshot_data" ]; then
28+ if grep -q " $prune_dir " " $GHE_DATA_DIR " /inc_snapshot_data; then
29+ log_info " Skipping incremental backup directory: $prune_dir " 1>&3
30+ continue
31+ fi
2232 fi
33+
2334 # skip if the directory is not a directory or blank
2435 if [ ! -d " $prune_dir " ] || [ -z " $prune_dir " ]; then
2536 log_info " Skipping blank or non-directory: $prune_dir " 1>&3
You can’t perform that action at this time.
0 commit comments