mirror of
https://github.com/luzifer-docker/pvc-rsync.git
synced 2025-01-04 10:06:06 +00:00
Document backups to be deleted
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
200a4d1ec3
commit
e9548a010e
1 changed files with 1 additions and 0 deletions
|
@ -18,6 +18,7 @@ function cleanup_old_backups() {
|
|||
info "Starting cleanup of backups..."
|
||||
|
||||
for backup in $(ssh "${REMOTE_HOST}" -- ls "${BASE_DIR}" | grep -v "${LATEST_LINK}" | sort | head --lines=-${KEEP_LAST_N}); do
|
||||
info "Removing backup ${backup}..."
|
||||
ssh "${REMOTE_HOST}" -- rm -rf "${BASE_DIR}/${backup}" || {
|
||||
error "Failed to delete backup ${backup}"
|
||||
return 1
|
||||
|
|
Loading…
Reference in a new issue