From 7aa6c8ecaf3b15e7c4f58ce345f205b7aef2b423 Mon Sep 17 00:00:00 2001 From: David Steele Date: Thu, 3 Apr 2014 18:17:40 -0400 Subject: [PATCH] v0.17: Warn when archive directories cannot be deleted * If an archive directory which should be empty could not be deleted backrest was throwing an error. There's a good fix for that coming, but for the time being it has been changed to a warning so processing can continue. This was impacting backups as sometimes the final archive file would not get pushed if the first archive file had been in a different directory (plus some bad luck). --- README.md | 4 ++++ pg_backrest_backup.pm | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 35453c9de..93e19ca90 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,10 @@ Simple Postgres Backup and Restore ## release notes +### v0.17: Warn when archive directories cannot be deleted + +* If an archive directory which should be empty could not be deleted backrest was throwing an error. There's a good fix for that coming, but for the time being it has been changed to a warning so processing can continue. This was impacting backups as sometimes the final archive file would not get pushed if the first archive file had been in a different directory (plus some bad luck). + ### v0.16: RequestTTY=yes for SSH sessions * Added RequestTTY=yes to ssh sesssions. Hoping this will prevent random lockups. diff --git a/pg_backrest_backup.pm b/pg_backrest_backup.pm index 5aab47ca8..3366eddfa 100644 --- a/pg_backrest_backup.pm +++ b/pg_backrest_backup.pm @@ -360,7 +360,7 @@ sub archive_pull if ($strPath lt $strPathMax) { &log(DEBUG, "removing local archive path ${strPath}"); - rmdir($strArchivePath . "/" . $strPath) or confess &log(ERROR, "unable to remove archive path ${strPath}, is it empty?"); + rmdir($strArchivePath . "/" . $strPath) or &log(WARN, "unable to remove archive path ${strPath}, is it empty?"); } # If the dir is not empty check if the files are in the manifest