We are backing up our database daily with db2bak.pl, and have started to notice the following messages:
[13/May/2014:03:59:08 -0600] - Backend instance "changelogdb" does not exist; Instance path /var/lib/dirsrv/slapd-cora/changelogdb could be invalid. [13/May/2014:03:59:08 -0600] - Backup: error in copying directory (/var/lib/dirsrv/slapd-cora/changelogdb -> /var/lib/dirsrv/slapd-cora/bak/cora-2014_05_13_03_59_08/.repl_changelog_backup): err=-1 # ls -l /var/lib/dirsrv/slapd-cora/changelogdb total 2796 -rw-------. 1 dirsrv dirsrv 2859008 May 14 13:22 dab99282-1dd111b2-84f8fd5b-e7890000_4e7cb85b000000010000.db4 -rw-rw-r--. 1 dirsrv dirsrv 0 May 12 14:30 dab99282-1dd111b2-84f8fd5b-e7890000.sema -rw-------. 1 dirsrv dirsrv 30 Dec 9 2012 DBVERSION
389-ds-base-1.2.11.29-1.el6.x86_64
Noriko reproduced with master as well.
git patch file (master) 0001-Ticket-47804-db2bak.pl-error-with-changelogdb.patch
Bug description: Backup utility db2bak[.pl] copies not just backend db files but also changelog db files, which is not associated with the backend instance, but the backup code blindly expected it.
Fix description: If the copying directory is a changelog db dir, skip retrieving the backend instance info and just copy the files underneath.
in dblayer_copy_directory, is it possible that a NULL inst could be referenced?
Replying to [comment:3 rmeggins]:
I believe we are safe on that. 1) if is_changelog and not the path is not a fullpath, it returns there without going further. 2) if not is_changelog and inst is NULL, it returns there. 3) if not a fullpath and inst is NULL, dblayer_get_full_inst_dir returns NULL and dblayer_copy_directory returns there. 4) dblayer_copy_file_resetlsns called from dblayer_copy_directory calls dblayer_copy_file_keybykey, in which NULL inst is checked before referenced.
Reviewed by Rich (Thank you!!)
Pushed to master: 1118cc9..819cbfd master -> master commit 819cbfd
Pushed to 389-ds-base-1.3.2: e9f86da..072b9fe 389-ds-base-1.3.2 -> 389-ds-base-1.3.2 commit 072b9fe
Pushed to 389-ds-base-1.3.1: ff4c7a7..04ecdb0 389-ds-base-1.3.1 -> 389-ds-base-1.3.1 commit 04ecdb08d45795646becb3535c477c006f5f7c6b
Pushed to 389-ds-base-1.2.11: bd0fe25..a6c24c5 389-ds-base-1.2.11 -> 389-ds-base-1.2.11 commit a6c24c5
Ticket has been cloned to Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1098653
Metadata Update from @nhosoi: - Issue assigned to nhosoi - Issue set to the milestone: 1.2.11.30
389-ds-base is moving from Pagure to Github. This means that new issues and pull requests will be accepted only in 389-ds-base's github repository.
This issue has been cloned to Github and is available here: - https://github.com/389ds/389-ds-base/issues/1135
If you want to receive further updates on the issue, please navigate to the github issue and click on subscribe button.
subscribe
Thank you for understanding. We apologize for all inconvenience.
Metadata Update from @spichugi: - Issue close_status updated to: wontfix (was: Fixed)
Login to comment on this ticket.