Backup server: skip self-pruning repos in remote-prune
backup_server_remote_skip lists apps whose client prunes the repository itself; remote-prune without arguments leaves them alone (an explicit app list still works). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
b09d1af493
commit
2a19c705be
2 files changed
+9
-1
No files matched your search
@@ -7,6 +7,8 @@ LOCALREPOLOCATION="{{ backup_location }}/{{ backup_app }}";
|
||||
APPLIST="{{ server_clients | json_query('*.app') | join(' ') }}";
|
||||
# repos that are only pruned remotely, not mirrored locally
|
||||
LOCALAPPLIST="{{ server_clients | json_query('*.app') | difference(backup_server_local_skip) | join(' ') }}";
|
||||
# repos pruned by their own client (e.g. a NAS borg plugin), skipped by remote-prune without arguments
|
||||
REMOTEPRUNEAPPLIST="{{ server_clients | json_query('*.app') | difference(backup_server_remote_skip) | join(' ') }}";
|
||||
MIRRORFOLDER="{{ backup_server_mirror | default(backup_remotes_folder) }}";
|
||||
|
||||
declare -A BORG_CLIENT_MAP
|
||||
@@ -246,7 +248,11 @@ local_delete () {
|
||||
;;
|
||||
|
||||
"remote-prune")
|
||||
USERLIST=$(validate_apps_or_default "$2");
|
||||
if [[ -z "$2" ]]; then
|
||||
USERLIST=$REMOTEPRUNEAPPLIST;
|
||||
else
|
||||
USERLIST=$(validate_apps_or_default "$2");
|
||||
fi
|
||||
remote_prune "$USERLIST";
|
||||
;;
|
||||
|
||||
|
||||
Reference in new issue
Block a user