Bug 10532 - koha-run-backups option --output doesn't work
Summary: koha-run-backups option --output doesn't work
Status: Failed QA
Alias: None
Product: Koha
Classification: Unclassified
Component: Packaging (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Reed Wade
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-07-03 06:36 UTC by Pongtawat
Modified: 2023-11-28 08:39 UTC (History)
10 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
patch with working fix (3.64 KB, patch)
2014-06-27 06:35 UTC, Reed Wade
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Pongtawat 2013-07-03 06:36:39 UTC
Although koha-run-backups has an option --output for specifying location of the backup, the option doesn't work. Simply because koha-run-backups call koha-dump which always dump to backupdir in Koha config file. 

So either koha-run-backups should move the backup set to the specified output or we should also made koha-dump support --output option.
Comment 1 Reed Wade 2014-06-27 06:35:18 UTC
Created attachment 29320 [details] [review]
patch with working fix
Comment 2 Robin Sheat 2014-11-10 03:04:40 UTC
This looks useful, my only concern is that if the provided backup dir doesn't exist, it should probably fail hard rather than falling back to the one in the config.
Comment 3 Mirko Tietgen 2015-03-03 07:19:32 UTC
Setting this to failed QA based on Robin's comment.
Comment 4 EricGAC 2016-03-15 18:10:53 UTC
If --output does not work, it should be removed from the documentation or replaced on how to change it manually. I had to work on this for a few days before finding that the path is just simply hardcoded in the koha_config.xml. 

After changing the directory, it works as it should and is now properly creating the tarballs in the directory I want it to be in so it can be uploaded to google drive (after changing the file perms to read only for the main user which was also changed in koha-dump to 0113).
Comment 5 Magnus Enger 2019-03-18 19:39:52 UTC
Still a problem on 18.05.
Comment 6 Bohdan 2020-01-13 17:22:59 UTC
Still a problem on 19.05 and 19.11.
Output option does not create directories named as instances in the backup folder. The following error occurs
ls: cannot access /path: No such file or directory 

And even after these folders are created, script still ignores everything and simply creates files inside /var/spool/koha.
Comment 7 Magnus Enger 2020-02-04 19:04:09 UTC
What it is the right approach here?

1. Create the directory indicated by --output if it does not exist

2. Check if the directory indicated by --output exists, and exit if it does not
Comment 8 Liz Rea 2020-05-19 19:46:55 UTC
I've seen this too, still a problem in 19.11 and took way more time than I'd have liked to sort it out.
Comment 9 Thomas Klausner 2023-11-28 08:39:34 UTC
We also stumbled upon this problem recently.

I think the best solution would be to pass --output from koha-run-backups on to koha-dump, plus some code to check if the dir exists.

And IMO it would make more sense to write those scripts in Perl than in bash. It's much easier/shorter in Perl, and we can be confident that Perl is installed, because ... Koha..