https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36435

David Nind <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #165937|0                           |1
        is obsolete|                            |

--- Comment #13 from David Nind <[email protected]> ---
Created attachment 165944
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=165944&action=edit
Bug 36435: Always delete old backup files

Recently this step was moved inside the condition so would only run if
koha-dump returned a success status.

If a log file is being written to while koha-dump runs tar, tar returns a
warning and a non-zero exit status. When this happens, koha-dump still
completes but the success status condition is not true, so the old backups
files are not deleted.

There is no nice way to ignore the non-zero exit status from tar, and large
libraries receive enough traffic for the tar 'file changed as we read it'
warning to cause enough problems that old backup files begin to fill up the
disk.

This patch removes the koha-dump conditional. This returns the script to the
behaviour before it was changed in Bug 30627.

Test plan:
1. Create a number of backups and edit their modify time to being older than 2
days
2. run the koha-run-backups script and try and write to one of the files it
includes while it's being backed up (you'll trigger a warning from tar saying
the file changed as it was being read)
3. verify that the older backups are not being cleaned up and deleted despite
new backups being made.
4. Apply this patch
5. Complete steps 1-2 again and then go and look to see if the older backups
are being deleted.

Sponsored-by: Catalyst IT
Signed-off-by: David Nind <[email protected]>

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to