Bug 14565 - koha-run-backups does not backup an instance called demo
Summary: koha-run-backups does not backup an instance called demo
Status: Pushed to oldstable
Alias: None
Product: Koha
Classification: Unclassified
Component: Command-line Utilities (show other bugs)
Version: Main
Hardware: All All
: P5 - low minor
Assignee: Tomás Cohen Arazi (tcohen)
QA Contact: Marcel de Rooy
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-07-19 15:39 UTC by Mirko Tietgen
Modified: 2024-12-02 10:11 UTC (History)
9 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
This removes a hard-coded exclusion for backups of instances named "demo".
Version(s) released in:
24.11.00,24.05.06,23.11.11
Circulation function:


Attachments
Bug 14565: Allow koha-run-backups to backup an instance called `demo` (1.36 KB, patch)
2024-05-28 11:23 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review
Bug 14565: Allow koha-run-backups to backup an instance called `demo` (1.40 KB, patch)
2024-05-29 06:28 UTC, David Nind
Details | Diff | Splinter Review
Bug 14565: Allow koha-run-backups to backup an instance called `demo` (1.50 KB, patch)
2024-06-28 07:18 UTC, Marcel de Rooy
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Mirko Tietgen 2015-07-19 15:39:05 UTC
It's not expected to have one arbitrary instance name not backed up by koha-run-backups. If you want to exclude instances, the feature proposed in Bug 14384 should be used instead.
Comment 1 Liz Rea 2015-07-19 22:02:53 UTC
I don't think the feature in bug 14384 works that way - that feature is meant to koha-disable an instance while the backup is running, not disable the backup from being taken.

I don't see a problem with excluding instances named demo from the backups, but it should be better documented, for sure.

Liz
Comment 2 Robin Sheat 2015-07-20 01:16:22 UTC
Yeah, a fix for this could be just putting a mention in the man page. Otherwise it is a little surprising.
Comment 3 Mirko Tietgen 2015-07-20 06:32:09 UTC
(In reply to Liz Rea from comment #1)
> I don't think the feature in bug 14384 works that way - that feature is
> meant to koha-disable an instance while the backup is running, not disable
> the backup from being taken.

Oops, my bad. You are right, of course.

 
> I don't see a problem with excluding instances named demo from the backups,
> but it should be better documented, for sure.

I think it is strange to have that hardcoded. How about koha-backup-enable/disable, similar to koha-email-enable/disable (but enabled by default)?
Comment 4 Robin Sheat 2015-07-20 22:31:10 UTC
(In reply to Mirko Tietgen from comment #3)
> I think it is strange to have that hardcoded. How about
> koha-backup-enable/disable, similar to koha-email-enable/disable (but
> enabled by default)?

This probably is the best option.

I'd kinda like to make a single tool at some point, I don't know what called. koha-settings maybe. So you can do koha-settings email enable. I'm starting to get annoyed by the proliferation of scripts having to reimplement the same things over and over.

That's just by-the-by though.
Comment 5 Liz Rea 2015-07-20 22:57:11 UTC
+1 koha-settings

koha-settings --email --disable instance would be lovely.
Comment 6 David Cook 2022-12-06 02:42:46 UTC
This one is still valid and is so weird
Comment 7 Tomás Cohen Arazi (tcohen) 2024-05-28 02:02:33 UTC
So you cannot have an instance called demo and have it backed up? This is so weird :-D

Happy to decide if feature or weirdness on a thumb fight round. Best of 5.
Comment 8 Tomás Cohen Arazi (tcohen) 2024-05-28 11:23:40 UTC
Created attachment 167218 [details] [review]
Bug 14565: Allow koha-run-backups to backup an instance called `demo`

We all have a `demo` instance somewhere. It is so weird that the default
script for backing up Koha has a hardcoded exclusion for instances
called like that. This patch fixes that.

To test:
1. Add a demo instance:
   $ ktd --shell
  k$ sudo koha-create --create-db demo
2. Run:
  k$ sudo debian/scripts/koha-run-backups
3. Check the backups:
  k$ ls -l /var/spool/koha/demo/
=> FAIL: No backup for the demo instance
3. Apply this patch
4. Repeat 2
=> SUCCESS: Backup made!
5. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 9 David Nind 2024-05-29 06:28:36 UTC
Created attachment 167235 [details] [review]
Bug 14565: Allow koha-run-backups to backup an instance called `demo`

We all have a `demo` instance somewhere. It is so weird that the default
script for backing up Koha has a hardcoded exclusion for instances
called like that. This patch fixes that.

To test:
1. Add a demo instance:
   $ ktd --shell
  k$ sudo koha-create --create-db demo
2. Run:
  k$ sudo debian/scripts/koha-run-backups
3. Check the backups:
  k$ ls -l /var/spool/koha/demo/
=> FAIL: No backup for the demo instance
3. Apply this patch
4. Repeat 2
=> SUCCESS: Backup made!
5. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Nind <david@davidnind.com>
Comment 10 Marcel de Rooy 2024-06-28 07:18:34 UTC
Created attachment 168224 [details] [review]
Bug 14565: Allow koha-run-backups to backup an instance called `demo`

We all have a `demo` instance somewhere. It is so weird that the default
script for backing up Koha has a hardcoded exclusion for instances
called like that. This patch fixes that.

To test:
1. Add a demo instance:
   $ ktd --shell
  k$ sudo koha-create --create-db demo
2. Run:
  k$ sudo debian/scripts/koha-run-backups
3. Check the backups:
  k$ ls -l /var/spool/koha/demo/
=> FAIL: No backup for the demo instance
3. Apply this patch
4. Repeat 2
=> SUCCESS: Backup made!
5. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 11 Katrin Fischer 2024-06-28 11:29:15 UTC
Please add a note about this change for the release notes.
Comment 12 Katrin Fischer 2024-06-28 11:50:06 UTC
Pushed for 24.11!

Well done everyone, thank you!
Comment 13 Lucas Gass (lukeg) 2024-11-18 16:51:32 UTC
Backported to 24.05.x for upcoming 24.05.06
Comment 14 Fridolin Somers 2024-12-02 10:11:26 UTC
Pushed to 23.11.x for 23.11.11