[Koha-bugs] [Bug 36435] Prevent warnings from interrupting koha-run-backups when deleting old backup files
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36435 --- Comment #16 from Andreas Jonsson --- If the sql-file is deleted but not the tar.gz-file, it is due to bug 36425 (because the tar.gz file will be newer than the sql.gz file, and you are hitting time interval between n x 24 hours after the sql dump but before n x 24 hours after the tar.gz file is created.) -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org 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/
[Koha-bugs] [Bug 36435] Prevent warnings from interrupting koha-run-backups when deleting old backup files
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36435 Danyon Sewell changed: What|Removed |Added Status|Signed Off |Failed QA --- Comment #15 from Danyon Sewell --- After applying the patch to one of our more active clients that gets a lot of traffic it seems this doesn't seem to fix the issue. It did remove the oldest DB backup but not the .tar.gz file due to the same reasons as before `tar: var/log/koha//plack.log: file changed as we read it` -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org 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/
[Koha-bugs] [Bug 36435] Prevent warnings from interrupting koha-run-backups when deleting old backup files
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36435 --- Comment #14 from David Nind --- I've signed off both patches, despite not being able to replicate the issue. (Not able to successfully interrupt backup by reloading the OPAC home or running a search at the same time) Backups are still run successfully with the updated changes and older backups are deleted. Feel free to change back to needs sign off if that is not sufficient, or more rigorous testing is required. -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org 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/
[Koha-bugs] [Bug 36435] Prevent warnings from interrupting koha-run-backups when deleting old backup files
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36435 David Nind changed: What|Removed |Added Attachment #165937|0 |1 is obsolete|| --- Comment #13 from David Nind --- Created attachment 165944 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=165944=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 -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org 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/
[Koha-bugs] [Bug 36435] Prevent warnings from interrupting koha-run-backups when deleting old backup files
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36435 David Nind changed: What|Removed |Added Attachment #165936|0 |1 is obsolete|| --- Comment #12 from David Nind --- Created attachment 165943 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=165943=edit Bug 36435: [alternative] Catch harmless errors in koha-dump tar has exit status 1 if any file has changed while being read, which is likely to happen as the logfiles are included. this patch will catch these harmless errors so that koha-dump will still return a success code. 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 -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org 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/
[Koha-bugs] [Bug 36435] Prevent warnings from interrupting koha-run-backups when deleting old backup files
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36435 David Nind changed: What|Removed |Added Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org 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/
[Koha-bugs] [Bug 36435] Prevent warnings from interrupting koha-run-backups when deleting old backup files
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36435 --- Comment #11 from Aleisha Amohia --- (In reply to David Nind from comment #8) > I'm getting a sha1/fake ancestor error when trying to apply the pacth 8-(... > > git bz apply 36435 > > Bug 36435 - Prevent warnings from interrupting koha-run-backups when > deleting old backup files > > 164491 - Bug 36435: Always delete old backup files > > Apply? [(y)es, (n)o, (i)nteractive] y > Applying: Bug 36435: Always delete old backup files > .git/rebase-apply/patch:23: trailing whitespace. > > error: sha1 information is lacking or useless > (debian/scripts/koha-run-backups). > error: could not build fake ancestor > Patch failed at 0001 Bug 36435: Always delete old backup files > > Testing notes (using KTD): > > 1. I used the script in bug 30627#c9 to create the backups with different > dates. > > 2. I couldn't replicate the issue, as the backup with the sample data in KTD > runs too fast! Is there a way to slow down the backup? I've attached Andreas' suggestion as an alternative patch, and fixed Danyon's patch. I think from memory the only way we were able to write to the logs fast enough was by accessing the OPAC so the opac-access.log or opac-access-ssl.log was written to! -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org 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/
[Koha-bugs] [Bug 36435] Prevent warnings from interrupting koha-run-backups when deleting old backup files
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36435 Aleisha Amohia changed: What|Removed |Added Attachment #164491|0 |1 is obsolete|| --- Comment #10 from Aleisha Amohia --- Created attachment 165937 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=165937=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 -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org 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/
[Koha-bugs] [Bug 36435] Prevent warnings from interrupting koha-run-backups when deleting old backup files
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36435 --- Comment #9 from Aleisha Amohia --- Created attachment 165936 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=165936=edit Bug 36435: [alternative] Catch harmless errors in koha-dump tar has exit status 1 if any file has changed while being read, which is likely to happen as the logfiles are included. this patch will catch these harmless errors so that koha-dump will still return a success code. 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 -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org 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/
[Koha-bugs] [Bug 36435] Prevent warnings from interrupting koha-run-backups when deleting old backup files
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36435 Aleisha Amohia changed: What|Removed |Added Status|Patch doesn't apply |Needs Signoff -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org 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/
[Koha-bugs] [Bug 36435] Prevent warnings from interrupting koha-run-backups when deleting old backup files
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36435 Aleisha Amohia changed: What|Removed |Added Keywords||rel_24_05_candidate -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org 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/
[Koha-bugs] [Bug 36435] Prevent warnings from interrupting koha-run-backups when deleting old backup files
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36435 David Nind changed: What|Removed |Added Status|Needs Signoff |Patch doesn't apply CC||da...@davidnind.com --- Comment #8 from David Nind --- I'm getting a sha1/fake ancestor error when trying to apply the pacth 8-(... git bz apply 36435 Bug 36435 - Prevent warnings from interrupting koha-run-backups when deleting old backup files 164491 - Bug 36435: Always delete old backup files Apply? [(y)es, (n)o, (i)nteractive] y Applying: Bug 36435: Always delete old backup files .git/rebase-apply/patch:23: trailing whitespace. error: sha1 information is lacking or useless (debian/scripts/koha-run-backups). error: could not build fake ancestor Patch failed at 0001 Bug 36435: Always delete old backup files Testing notes (using KTD): 1. I used the script in bug 30627#c9 to create the backups with different dates. 2. I couldn't replicate the issue, as the backup with the sample data in KTD runs too fast! Is there a way to slow down the backup? -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org 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/
[Koha-bugs] [Bug 36435] Prevent warnings from interrupting koha-run-backups when deleting old backup files
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36435 Andreas Jonsson changed: What|Removed |Added CC||andreas.jons...@kreablo.se --- Comment #7 from Andreas Jonsson --- I think is more important that old backups are not deleted unless a new backup have been created and that we should instead catch errors that are harmless. diff --git a/debian/scripts/koha-dump b/debian/scripts/koha-dump index 29f02bc45a..85ffc7e4d4 100755 --- a/debian/scripts/koha-dump +++ b/debian/scripts/koha-dump @@ -124,6 +124,10 @@ dump_instance() output="$output to $metadump" [ "$quiet" = "no" ] && echo "$output" +# tar has exit status 1 if any file has changed while being read, +# which is likely to happen as the logfiles are included. +set +e + tar -czf "$metadump" -C / $excludes \ "etc/koha/sites/$name" \ "etc/apache2/sites-available/$instancefile" \ @@ -133,6 +137,12 @@ dump_instance() $uploaded_files_dir \ $uploaded_temp_files_dir +if [ "$?" != "1" -a "$?" != "0" ]; then +exit $? +fi + +set -e + chown "root:$name-koha" "$metadump" chmod g+r "$metadump" -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org 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/
[Koha-bugs] [Bug 36435] Prevent warnings from interrupting koha-run-backups when deleting old backup files
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36435 Fridolin Somers changed: What|Removed |Added CC||fridolin.som...@biblibre.co ||m Severity|normal |major --- Comment #6 from Fridolin Somers --- Rise importance to major since it can break the server -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org 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/
[Koha-bugs] [Bug 36435] Prevent warnings from interrupting koha-run-backups when deleting old backup files
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36435 Danyon Sewell changed: What|Removed |Added CC||danyonsew...@catalyst.net.n ||z Assignee|alei...@catalyst.net.nz |danyonsew...@catalyst.net.n ||z --- Comment #5 from Danyon Sewell --- Have written patch to break the conditional that koha-dump was inside so that the deletion of old logs will still happen. As Aleisha pointed out this has essentially changed the behavior back to how it was prior to the enhancement being written. 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. -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org 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/
[Koha-bugs] [Bug 36435] Prevent warnings from interrupting koha-run-backups when deleting old backup files
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36435 Danyon Sewell changed: What|Removed |Added Attachment #164240|0 |1 is obsolete|| --- Comment #4 from Danyon Sewell --- Created attachment 164491 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=164491=edit Bug 36435: Always delete old backup files -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org 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/
[Koha-bugs] [Bug 36435] Prevent warnings from interrupting koha-run-backups when deleting old backup files
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36435 Aleisha Amohia changed: What|Removed |Added Attachment #163970|0 |1 is obsolete|| --- Comment #3 from Aleisha Amohia --- Created attachment 164240 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=164240=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 moves the step to delete old backup files outside of the koha-dump condition. This returns the script to the behaviour before it was changed in Bug 30627. Sponsored-by: Catalyst IT -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org 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/
[Koha-bugs] [Bug 36435] Prevent warnings from interrupting koha-run-backups when deleting old backup files
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36435 Aleisha Amohia changed: What|Removed |Added Status|ASSIGNED|Needs Signoff -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org 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/
[Koha-bugs] [Bug 36435] Prevent warnings from interrupting koha-run-backups when deleting old backup files
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36435 --- Comment #2 from Aleisha Amohia --- This fix did not work unfortunately, will propose an alternative -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org 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/
[Koha-bugs] [Bug 36435] Prevent warnings from interrupting koha-run-backups when deleting old backup files
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36435 --- Comment #1 from Aleisha Amohia --- Created attachment 163970 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=163970=edit Bug 36435: Specify to not show warnings if file changed while koha-dump running This patch adds a switch to the tar --create command called by koha-dump to prevent 'file changed' warnings, which stop koha-dump from returning a success status, which interrupts koha-run-backups before it can delete old backup files. Sponsored-by: Catalyst IT -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org 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/
[Koha-bugs] [Bug 36435] Prevent warnings from interrupting koha-run-backups when deleting old backup files
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36435 Aleisha Amohia changed: What|Removed |Added Depends on||30627 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30627 [Bug 30627] koha-run-backups delete the backup files after finished its job without caring days option -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org 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/
[Koha-bugs] [Bug 36435] Prevent warnings from interrupting koha-run-backups when deleting old backup files
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36435 Aleisha Amohia changed: What|Removed |Added Status|NEW |ASSIGNED Change sponsored?|--- |Sponsored Assignee|koha-b...@lists.koha-commun |alei...@catalyst.net.nz |ity.org | -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org 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/