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.
Created attachment 29320 [details] [review] patch with working fix
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.
Setting this to failed QA based on Robin's comment.
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).
Still a problem on 18.05.
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.
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
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.
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..