#47804 db2bak.pl error with changelogdb
Closed: wontfix None Opened 8 years ago by orion.

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


Noriko reproduced with master as well.

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

in dblayer_copy_directory, is it possible that a NULL inst could be referenced?

Replying to [comment:3 rmeggins]:

in dblayer_copy_directory, is it possible that a NULL inst could be referenced?

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

Metadata Update from @nhosoi:
- Issue assigned to nhosoi
- Issue set to the milestone:

5 years ago

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.

Thank you for understanding. We apologize for all inconvenience.

Metadata Update from @spichugi:
- Issue close_status updated to: wontfix (was: Fixed)

2 years ago

Login to comment on this ticket.