delete_fix

This commit is contained in:
Milan Meduna 2019-03-31 00:07:53 +01:00
parent 910d987009
commit 7227951f19

View file

@ -52,7 +52,7 @@ if [ $backup_server_delete_old_snaps = "y" ]; then
for dataset in $source_datasets;
do
dataset_clean=$(echo $dataset | grep -o '[^/]*$')
snaps_to_delete=$(echo "$backups_server_zfs_snapshots" | grep "$backup_server_dataset"/"$dataset_clean"@ | grep -E "....-..-.._........--"$zfsnap_days_keep_snaps"d" | head -n -"$zfsnap_days_keep_snaps" | cut -d" " -f1)
snaps_to_delete=$(echo "$backups_server_zfs_snapshots" | grep "$backup_server_dataset"/"$dataset_clean"@ | grep -E "....-..-.._........--"$zfsnap_days_keep_snaps"d" | head -n -"$backup_server_number_keep_snaps" | cut -d" " -f1)
for snap in $snaps_to_delete
do