Adding an additional option to koha-dump and koha-run-backups to exclude the logs in /var/log/koha/site from the completed backup.
Created attachment 163157 [details] [review] Bug 36325: Add option to koha-run-backups/koha-dump, to exclude logs Written patch to add flag to both koha-dump and koha-run-backups. Test plan: 1. do a sudo koha-dump and sudo koha-run-backups and check the contents of the .tar.gz backup in /var/spool/koha/instance/ and verify logs are in there 2. apply this patch 3. this time do sudo koha-dump --exclude-logs and sudo koha-run-backups --exclude-logs and check the contents of the .tar.gz backup in /var/spool/koha/instance and verify nothing from /var/log/koha is in there. Current status: ASSIGNED
Created attachment 163158 [details] [review] Bug 36325: Add option to koha-run-backups/koha-dump, to exclude logs Written patch to add flag to both koha-dump and koha-run-backups. Test plan: 1. do a sudo koha-dump and sudo koha-run-backups and check the contents of the .tar.gz backup in /var/spool/koha/instance/ and verify logs are in there 2. apply this patch 3. this time do sudo koha-dump --exclude-logs and sudo koha-run-backups --exclude-logs and check the contents of the .tar.gz backup in /var/spool/koha/instance and verify nothing from /var/log/koha is in there.
Created attachment 163754 [details] [review] Bug 36325: Add option to koha-run-backups/koha-dump, to exclude logs Written patch to add flag to both koha-dump and koha-run-backups. Test plan: 1. do a sudo koha-dump and sudo koha-run-backups and check the contents of the .tar.gz backup in /var/spool/koha/instance/ and verify logs are in there 2. apply this patch 3. this time do sudo koha-dump --exclude-logs and sudo koha-run-backups --exclude-logs and check the contents of the .tar.gz backup in /var/spool/koha/instance and verify nothing from /var/log/koha is in there. Signed-off-by: David Nind <david@davidnind.com>
Testing notes (using koha-testing-docker): 1. To extract the files to check for the logs (note: name of file will be different): sudo tar -zxvf /var/spool/koha/kohadev/kohadev-2024-03-23.tar.gz 2. After applying the patch, run a reset_all (so that the new option for the commands are picked up).
Created attachment 163760 [details] [review] Bug 36325: Add --exclude-logs option to koha-run-backups
Created attachment 166583 [details] [review] Bug 36325: Add option to koha-run-backups/koha-dump, to exclude logs Written patch to add flag to both koha-dump and koha-run-backups. Test plan: 1. do a sudo koha-dump and sudo koha-run-backups and check the contents of the .tar.gz backup in /var/spool/koha/instance/ and verify logs are in there 2. apply this patch 3. this time do sudo koha-dump --exclude-logs and sudo koha-run-backups --exclude-logs and check the contents of the .tar.gz backup in /var/spool/koha/instance and verify nothing from /var/log/koha is in there. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 166584 [details] [review] Bug 36325: Add --exclude-logs option to koha-run-backups Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Pushed for 24.05! Well done everyone, thank you!
+ if [ "$exclude_logs" = "yes" ]; then + tar -czf "$metadump" -C / $excludes \ ... + else tar -czf "$metadump" -C / $excludes \ Is the folding correct ?