Bug 31098 - The options to "export database" and "export settings" are not available
Summary: The options to "export database" and "export settings" are not available
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Staff interface (show other bugs)
Version: 22.05
Hardware: All Linux
: P5 - low normal (vote)
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-07-04 16:49 UTC by victor
Modified: 2022-09-19 20:20 UTC (History)
4 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description victor 2022-07-04 16:49:54 UTC
I enabled in instance-conf.xml

<backup_db_via_tools>1</backup_db_via_tools>
<backup_conf_via_tools>1</backup_conf_via_tools>

In Tools --> Export Data
The option tohe option of "export database" and "export settings" are not available.

Here's the information that appears:
"Note: This generated file will be very large, and will be generated daily."
"Unfortunately, there are no backups available."
Comment 1 David Cook 2022-07-04 23:16:35 UTC
I suspect that this will be a setup problem rather than a bug.

I'd suggest you look at https://koha-community.org/support/ for some options on getting support with your issue.
Comment 2 David Nind 2022-07-05 00:08:52 UTC
Hi victor.

You've set things up to enable backups, but the actual backups need creating using koha-run-backups

Example: koha-run-backups --days 2 --output /var/spool/koha

Then the database and configuration backups will appear on the tabs to export the database and configuration.

I'd imagine this could be setup as a cronjob.

This is not documented in the manual, so I've added a documentation bug to do this: bug 31099

See also bug 14564 - there was some discussion there about allowing it or not, or removing the option.

I'm not sure whether there needs to be a note or information on how to set this up, either:
- in the koha-conf.xml file, or
- on the export database and export configuration page.

It definitely should be covered in the manual to help avoid confusion!
Comment 3 victor 2022-07-06 16:37:15 UTC
is already defined in 

nano etc/cron.daily/koha-common 

koha-run-backups --days 2 --output /var/spool/koha

however it is not generating backup

koha-dump instance
Comment 4 victor 2022-07-06 16:48:01 UTC
Would I need to set permission for /var/spool/koha ?
Comment 5 David Nind 2022-07-06 20:36:27 UTC
(In reply to victor from comment #4)
> Would I need to set permission for /var/spool/koha ?

I think you are correct.

From bug 14564 comment 16 , then it set the permissions as root:kohadev-koha ownership and 640 permission.

This is so that the files can be read by the webserver for your Koha instance - kohadev-koha should be changed to whatever your instance name/file ownership persmissions should be - check the files under the koha to see what that should be.

Not sure whether this is a regression, or it is something that needs to be set manually).

I'm not the greatest at linux file permissions, so I might be worng!
Comment 6 David Nind 2022-07-06 20:45:17 UTC
A way to test could be to either:

1. run the command in the cron job manually to generate the backups and see if the files appear in the directory, or

2. create a file in the backup directory and see if you can see it in the staff interface, or

If the files are in the directory, but you can't see them in the staff interface then it will be a permission problem.

If the command doesn't generate the files, then check the logs for any errors (I'm not sure which logs to check..).
Comment 7 victor 2022-07-07 13:19:00 UTC
Not generating backup with $koha-dump

I remember that I performed the update from version 21.11 to 22.05.02