Hi,
I've unfortunately not encrypted my earliest backups and after doing so I realized that the GUI doesn't offer a way to bulk-select backups.
After searching the forum for a while I found workpush's script that bulk deletes unverified backups, so 99% of the credit goes to him.
This script deletes all unencrypted backups in a datastore:
I've unfortunately not encrypted my earliest backups and after doing so I realized that the GUI doesn't offer a way to bulk-select backups.
After searching the forum for a while I found workpush's script that bulk deletes unverified backups, so 99% of the credit goes to him.
This script deletes all unencrypted backups in a datastore:
Bash:
#!/bin/bash
REPO="YourRepo"
# List failed snapshots in the given backup group and delete them
proxmox-backup-client snapshot list \
--repository "$REPO" --output-format json |
jq -r '
.[]|select(any(.files[]; ."crypt-mode"=="none"?))
| .["backup-type"] + "/" + .["backup-id"] + "/" + ( .["backup-time"] | strftime("%Y-%m-%dT%H:%M:%SZ") )
'|
while IFS= read -r SNAPSHOT; do
echo "Deleting snapshot: $SNAPSHOT"
proxmox-backup-client snapshot forget "$SNAPSHOT" --repository "$REPO"
done