[Koha-devel] Should we back up /usr/share/koha on a daily basis as well?

dcook at prosentient.com.au dcook at prosentient.com.au
Sun Nov 15 23:39:01 CET 2020


If someone is using Koha Debian packages, they really should not "make local changes to the Koha codebase, or edit the Intranet/OPAC XSLTs, or adjust the Template Toolkit files" in the deployed /usr/share/koha directory. I don't think that a software professional would do that, as the changes would be overwritten when they upgrade Koha and it's virtually unmaintainable from an operations perspective. 

All changes to existing files should be done in a developer's Git repository, committed, built, and then deployed. Changes should be version controlled and easily distributable. With Intranet/OPAC XSLTs, I typically write and maintain my XSLTs in my Git repository and package a custom Koha, but you could copy the original files from /usr/share/koha and then put them somewhere else that they're backed up like a "etc" or "var/lib" Koha directory. It's less easy to maintain in the long-term but it makes for easy local changes (and it would be preserved through backup/restore).

In my opinion, you should only backup content that is unique and otherwise unavailable. Many files in Koha's "etc" and "var/lib" directories are generated and instance-specific, so it makes sense to back them up. They are then easily restored to a new instance that has the same Koha Debian package installed, which you'd have available in an Apt repository or other software artifact store. 

In summary, I don't think that we should backup /usr/share/koha as it's unnecessary. If people are losing changes because they didn't have a backup of /usr/share/koha, I'd suggest that they get professional assistance managing servers, rather than creating backups of /usr/share/koha. 

But that's just my two cents. I'm open to alternate perspectives. 

David Cook
Software Engineer
Prosentient Systems
72/330 Wattle St
Ultimo, NSW 2007
Australia

Office: 02 9212 0899
Online: 02 8005 0595

-----Original Message-----
From: Koha-devel <koha-devel-bounces at lists.koha-community.org> On Behalf Of Andreas Roussos
Sent: Saturday, 14 November 2020 1:23 AM
To: koha-devel at lists.koha-community.org
Subject: [Koha-devel] Should we back up /usr/share/koha on a daily basis as well?

Dear Developers,

In a standard package installation, the backup tarballs taken by the `koha-common` daily cron job (which calls `koha-run-backups`, which in turn calls `koha-dump` for each Koha instance) do not include the default base directory (i.e. /usr/share/koha).

Indeed, including the entire /usr/share/koha tree in every instance's backup tarball (for multi-tenant setups) would be superfluous (not to mention space-consuming).

However, I think that some provision should be made so that a backup of the /usr/share/koha tree is taken on a daily basis. This could be kept at the top-level /var/spool/koha/ directory with a filename like common-YYYY-MM-DD.tar.gz or shared-YYYY-MM-DD.tar.gz. It should even be possible to pass the base directory path as an argument, in case it has been changed from the default.

My reasoning behind this is that people often make local changes to the Koha codebase, or edit the Intranet/OPAC XSLTs, or adjust the Template Toolkit files to account for their needs. So it would be in the users'
best interest to have Koha take regular backups of these files as well.

Thoughts?

Kind regards,
Andreas
_______________________________________________
Koha-devel mailing list
Koha-devel at lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel
website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/




More information about the Koha-devel mailing list