Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

db2bak.pl error with changelogdb #1135

Closed
389-ds-bot opened this issue Sep 12, 2020 · 7 comments
Closed

db2bak.pl error with changelogdb #1135

389-ds-bot opened this issue Sep 12, 2020 · 7 comments
Labels
closed: fixed Migration flag - Issue
Milestone

Comments

@389-ds-bot
Copy link

Cloned from Pagure issue: https://pagure.io/389-ds-base/issue/47804


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.

@389-ds-bot 389-ds-bot added the closed: fixed Migration flag - Issue label Sep 12, 2020
@389-ds-bot 389-ds-bot added this to the 1.2.11.30 milestone Sep 12, 2020
@389-ds-bot
Copy link
Author

Comment from nhosoi (@nhosoi) at 2014-05-16 08:02:33

git patch file (master)
0001-Ticket-47804-db2bak.pl-error-with-changelogdb.patch

@389-ds-bot
Copy link
Author

Comment from nhosoi (@nhosoi) at 2014-05-16 08:03:46

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.

@389-ds-bot
Copy link
Author

Comment from rmeggins (@richm) at 2014-05-16 17:20:43

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

@389-ds-bot
Copy link
Author

Comment from nhosoi (@nhosoi) at 2014-05-16 22:29:09

Replying to [comment:3 richm]:

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.

@389-ds-bot
Copy link
Author

Comment from nhosoi (@nhosoi) at 2014-05-17 02:13:25

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

@389-ds-bot
Copy link
Author

Comment from nhosoi (@nhosoi) at 2014-05-17 02:16:08

Ticket has been cloned to Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1098653

@389-ds-bot
Copy link
Author

Comment from nhosoi (@nhosoi) at 2017-02-11 22:57:45

Metadata Update from @nhosoi:

  • Issue assigned to nhosoi
  • Issue set to the milestone: 1.2.11.30

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed: fixed Migration flag - Issue
Projects
None yet
Development

No branches or pull requests

1 participant