#630 The backend name provided to bak2db is not validated
Closed: Fixed None Opened 7 years ago by rcritten.

I'm not entirely sure what is actually being restored here but it sure is doing a whole lot of work.

I have two backends in the GREYOAK-COM instance, userRoot and ipaca. I wanted to see what would happen if I gave it a bad backend name.

My initial thought was that the ipaca database was being restored by reading this output. To test this I made a backup, issued a cert, then restored it. The certificate was still there, leading me to believe the restoration didn't do anything at all.

In this test I'm requesting that the backend notfound be restored.

Doing this online seems to do basically the same thing.

389-ds-base-1.3.0.0-1.fc18.x86_64

/var/lib/dirsrv/scripts-GREYOAK-COM/bak2db /tmp/tmpVRNYXkipa/ipa/GREYOAK-COM -n notfound
[19/Mar/2013:14:09:57 -0400] - /etc/dirsrv/slapd-GREYOAK-COM/dse.ldif: nsslapd-maxdescriptors: nsslapd-maxdescriptors: invalid value "8192", maximum file descriptors must range from 1 to 4096 (the current process limit).  Server will use a setting of 4096.
[19/Mar/2013:14:09:57 -0400] - Config Warning: - nsslapd-maxdescriptors: invalid value "8192", maximum file descriptors must range from 1 to 4096 (the current process limit).  Server will use a setting of 4096.
[19/Mar/2013:14:09:57 -0400] - dblayer_delete_database: skipping instance userRoot
[19/Mar/2013:14:09:57 -0400] - dblayer_delete_database: skipping instance ipaca
[19/Mar/2013:14:09:57 -0400] - Moving file /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/DBVERSION
[19/Mar/2013:14:09:57 -0400] - Copying /tmp/tmpVRNYXkipa/ipa/GREYOAK-COM/DBVERSION to /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/DBVERSION
[19/Mar/2013:14:09:57 -0400] - Moving file /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/ipaca
[19/Mar/2013:14:09:57 -0400] - Moving file /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/ipaca/requesttype.db
[19/Mar/2013:14:09:57 -0400] - Copying /tmp/tmpVRNYXkipa/ipa/GREYOAK-COM/ipaca/requesttype.db to /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/ipaca/requesttype.db
[19/Mar/2013:14:09:57 -0400] - Moving file /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/ipaca/notafter.db
[19/Mar/2013:14:09:57 -0400] - Copying /tmp/tmpVRNYXkipa/ipa/GREYOAK-COM/ipaca/notafter.db to /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/ipaca/notafter.db
[19/Mar/2013:14:09:57 -0400] - Moving file /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/ipaca/parentid.db
[19/Mar/2013:14:09:57 -0400] - Copying /tmp/tmpVRNYXkipa/ipa/GREYOAK-COM/ipaca/parentid.db to /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/ipaca/parentid.db
[19/Mar/2013:14:09:57 -0400] - Moving file /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/ipaca/vlv#cacompletepkitomcatindex.db
[19/Mar/2013:14:09:57 -0400] - Copying /tmp/tmpVRNYXkipa/ipa/GREYOAK-COM/ipaca/vlv#cacompletepkitomcatindex.db to /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/ipaca/vlv#cacompletepkitomcatindex.db
[19/Mar/2013:14:09:57 -0400] - Moving file /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/ipaca/DBVERSION
[19/Mar/2013:14:09:57 -0400] - Copying /tmp/tmpVRNYXkipa/ipa/GREYOAK-COM/ipaca/DBVERSION to /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/ipaca/DBVERSION
[19/Mar/2013:14:09:57 -0400] - Moving file /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/ipaca/vlv#capendingenrollmentpkitomcatindex.db
[19/Mar/2013:14:09:57 -0400] - Copying /tmp/tmpVRNYXkipa/ipa/GREYOAK-COM/ipaca/vlv#capendingenrollmentpkitomcatindex.db to /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/ipaca/vlv#capendingenrollmentpkitomcatindex.db
[19/Mar/2013:14:09:57 -0400] - Moving file /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/ipaca/vlv#caallpkitomcatindex.db
[19/Mar/2013:14:09:57 -0400] - Copying /tmp/tmpVRNYXkipa/ipa/GREYOAK-COM/ipaca/vlv#caallpkitomcatindex.db to /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/ipaca/vlv#caallpkitomcatindex.db
[19/Mar/2013:14:09:57 -0400] - Moving file /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/ipaca/aci.db
[19/Mar/2013:14:09:57 -0400] - Copying /tmp/tmpVRNYXkipa/ipa/GREYOAK-COM/ipaca/aci.db to /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/ipaca/aci.db
[19/Mar/2013:14:09:57 -0400] - Moving file /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/ipaca/vlv#cacompleteenrollmentpkitomcatindex.db
[19/Mar/2013:14:09:57 -0400] - Copying /tmp/tmpVRNYXkipa/ipa/GREYOAK-COM/ipaca/vlv#cacompleteenrollmentpkitomcatindex.db to /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/ipaca/vlv#cacompleteenrollmentpkitomcatindex.db
[19/Mar/2013:14:09:57 -0400] - Moving file /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/ipaca/requeststate.db
[19/Mar/2013:14:09:57 -0400] - Copying /tmp/tmpVRNYXkipa/ipa/GREYOAK-COM/ipaca/requeststate.db to /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/ipaca/requeststate.db
[19/Mar/2013:14:09:57 -0400] - Moving file /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/ipaca/vlv#allvalidcertspkitomcatindex.db
[19/Mar/2013:14:09:57 -0400] - Copying /tmp/tmpVRNYXkipa/ipa/GREYOAK-COM/ipaca/vlv#allvalidcertspkitomcatindex.db to /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/ipaca/vlv#allvalidcertspkitomcatindex.db
[19/Mar/2013:14:09:57 -0400] - Moving file /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/ipaca/id2entry.db
[19/Mar/2013:14:09:57 -0400] - Copying /tmp/tmpVRNYXkipa/ipa/GREYOAK-COM/ipaca/id2entry.db to /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/ipaca/id2entry.db
[19/Mar/2013:14:09:57 -0400] - Moving file /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/ipaca/numsubordinates.db
[19/Mar/2013:14:09:57 -0400] - Copying /tmp/tmpVRNYXkipa/ipa/GREYOAK-COM/ipaca/numsubordinates.db to /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/ipaca/numsubordinates.db
[19/Mar/2013:14:09:57 -0400] - Moving file /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/ipaca/ancestorid.db
[19/Mar/2013:14:09:57 -0400] - Copying /tmp/tmpVRNYXkipa/ipa/GREYOAK-COM/ipaca/ancestorid.db to /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/ipaca/ancestorid.db
[19/Mar/2013:14:09:57 -0400] - Moving file /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/ipaca/nsuniqueid.db
[19/Mar/2013:14:09:57 -0400] - Copying /tmp/tmpVRNYXkipa/ipa/GREYOAK-COM/ipaca/nsuniqueid.db to /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/ipaca/nsuniqueid.db
[19/Mar/2013:14:09:57 -0400] - Moving file /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/ipaca/vlv#allvalidorrevokedcertspkitomcatindex.db
[19/Mar/2013:14:09:57 -0400] - Copying /tmp/tmpVRNYXkipa/ipa/GREYOAK-COM/ipaca/vlv#allvalidorrevokedcertspkitomcatindex.db to /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/ipaca/vlv#allvalidorrevokedcertspkitomcatindex.db
[19/Mar/2013:14:09:57 -0400] - Moving file /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/ipaca/vlv#allcertspkitomcatindex.db
[19/Mar/2013:14:09:57 -0400] - Copying /tmp/tmpVRNYXkipa/ipa/GREYOAK-COM/ipaca/vlv#allcertspkitomcatindex.db to /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/ipaca/vlv#allcertspkitomcatindex.db
[19/Mar/2013:14:09:57 -0400] - Moving file /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/ipaca/vlv#allnonrevokedcertspkitomcatindex.db
[19/Mar/2013:14:09:57 -0400] - Copying /tmp/tmpVRNYXkipa/ipa/GREYOAK-COM/ipaca/vlv#allnonrevokedcertspkitomcatindex.db to /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/ipaca/vlv#allnonrevokedcertspkitomcatindex.db
[19/Mar/2013:14:09:57 -0400] - Moving file /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/ipaca/serialno.db
[19/Mar/2013:14:09:57 -0400] - Copying /tmp/tmpVRNYXkipa/ipa/GREYOAK-COM/ipaca/serialno.db to /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/ipaca/serialno.db
[19/Mar/2013:14:09:57 -0400] - Moving file /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/ipaca/publicKeyData.db
[19/Mar/2013:14:09:57 -0400] - Copying /tmp/tmpVRNYXkipa/ipa/GREYOAK-COM/ipaca/publicKeyData.db to /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/ipaca/publicKeyData.db
[19/Mar/2013:14:09:57 -0400] - Moving file /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/ipaca/extension.db
[19/Mar/2013:14:09:57 -0400] - Copying /tmp/tmpVRNYXkipa/ipa/GREYOAK-COM/ipaca/extension.db to /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/ipaca/extension.db
[19/Mar/2013:14:09:57 -0400] - Moving file /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/ipaca/objectclass.db
[19/Mar/2013:14:09:57 -0400] - Copying /tmp/tmpVRNYXkipa/ipa/GREYOAK-COM/ipaca/objectclass.db to /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/ipaca/objectclass.db
[19/Mar/2013:14:09:57 -0400] - Moving file /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/ipaca/uid.db
[19/Mar/2013:14:09:57 -0400] - Copying /tmp/tmpVRNYXkipa/ipa/GREYOAK-COM/ipaca/uid.db to /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/ipaca/uid.db
[19/Mar/2013:14:09:57 -0400] - Moving file /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/ipaca/description.db
[19/Mar/2013:14:09:57 -0400] - Copying /tmp/tmpVRNYXkipa/ipa/GREYOAK-COM/ipaca/description.db to /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/ipaca/description.db
[19/Mar/2013:14:09:57 -0400] - Moving file /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/ipaca/entryusn.db
[19/Mar/2013:14:09:57 -0400] - Copying /tmp/tmpVRNYXkipa/ipa/GREYOAK-COM/ipaca/entryusn.db to /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/ipaca/entryusn.db
[19/Mar/2013:14:09:57 -0400] - Moving file /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/ipaca/vlv#allvalidcertsnotafterpkitomcatindex.db
[19/Mar/2013:14:09:57 -0400] - Copying /tmp/tmpVRNYXkipa/ipa/GREYOAK-COM/ipaca/vlv#allvalidcertsnotafterpkitomcatindex.db to /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/ipaca/vlv#allvalidcertsnotafterpkitomcatindex.db
[19/Mar/2013:14:09:57 -0400] - Moving file /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/ipaca/metaInfo.db
[19/Mar/2013:14:09:57 -0400] - Copying /tmp/tmpVRNYXkipa/ipa/GREYOAK-COM/ipaca/metaInfo.db to /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/ipaca/metaInfo.db
[19/Mar/2013:14:09:57 -0400] - Moving file /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/ipaca/uniquemember.db
[19/Mar/2013:14:09:57 -0400] - Copying /tmp/tmpVRNYXkipa/ipa/GREYOAK-COM/ipaca/uniquemember.db to /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/ipaca/uniquemember.db
[19/Mar/2013:14:09:57 -0400] - Moving file /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/ipaca/mail.db
[19/Mar/2013:14:09:57 -0400] - Copying /tmp/tmpVRNYXkipa/ipa/GREYOAK-COM/ipaca/mail.db to /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/ipaca/mail.db
[19/Mar/2013:14:09:57 -0400] - Moving file /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/ipaca/entryrdn.db
[19/Mar/2013:14:09:57 -0400] - Copying /tmp/tmpVRNYXkipa/ipa/GREYOAK-COM/ipaca/entryrdn.db to /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/ipaca/entryrdn.db
[19/Mar/2013:14:09:57 -0400] - Moving file /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/ipaca/subjectname.db
[19/Mar/2013:14:09:57 -0400] - Copying /tmp/tmpVRNYXkipa/ipa/GREYOAK-COM/ipaca/subjectname.db to /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/ipaca/subjectname.db
[19/Mar/2013:14:09:57 -0400] - Moving file /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/ipaca/duration.db
[19/Mar/2013:14:09:57 -0400] - Copying /tmp/tmpVRNYXkipa/ipa/GREYOAK-COM/ipaca/duration.db to /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/ipaca/duration.db
[19/Mar/2013:14:09:57 -0400] - Moving file /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/ipaca/dateOfCreate.db
[19/Mar/2013:14:09:57 -0400] - Copying /tmp/tmpVRNYXkipa/ipa/GREYOAK-COM/ipaca/dateOfCreate.db to /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/ipaca/dateOfCreate.db
[19/Mar/2013:14:09:57 -0400] - Moving file /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/ipaca/vlv#allinvalidcertsnotbeforepkitomcatindex.db
[19/Mar/2013:14:09:57 -0400] - Copying /tmp/tmpVRNYXkipa/ipa/GREYOAK-COM/ipaca/vlv#allinvalidcertsnotbeforepkitomcatindex.db to /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/ipaca/vlv#allinvalidcertsnotbeforepkitomcatindex.db
[19/Mar/2013:14:09:57 -0400] - Moving file /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/ipaca/vlv#allinvalidcertspkitomcatindex.db
[19/Mar/2013:14:09:57 -0400] - Copying /tmp/tmpVRNYXkipa/ipa/GREYOAK-COM/ipaca/vlv#allinvalidcertspkitomcatindex.db to /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/ipaca/vlv#allinvalidcertspkitomcatindex.db
[19/Mar/2013:14:09:57 -0400] - Moving file /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/ipaca/cn.db
[19/Mar/2013:14:09:57 -0400] - Copying /tmp/tmpVRNYXkipa/ipa/GREYOAK-COM/ipaca/cn.db to /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/ipaca/cn.db
[19/Mar/2013:14:09:57 -0400] - Moving file /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/ipaca/sn.db
[19/Mar/2013:14:09:57 -0400] - Copying /tmp/tmpVRNYXkipa/ipa/GREYOAK-COM/ipaca/sn.db to /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/ipaca/sn.db
[19/Mar/2013:14:09:57 -0400] - Moving file /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/ipaca/issuedby.db
[19/Mar/2013:14:09:57 -0400] - Copying /tmp/tmpVRNYXkipa/ipa/GREYOAK-COM/ipaca/issuedby.db to /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/ipaca/issuedby.db
[19/Mar/2013:14:09:57 -0400] - Moving file /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/ipaca/requestid.db
[19/Mar/2013:14:09:57 -0400] - Copying /tmp/tmpVRNYXkipa/ipa/GREYOAK-COM/ipaca/requestid.db to /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/ipaca/requestid.db
[19/Mar/2013:14:09:57 -0400] - Moving file /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/ipaca/vlv#caenrollmentpkitomcatindex.db
[19/Mar/2013:14:09:57 -0400] - Copying /tmp/tmpVRNYXkipa/ipa/GREYOAK-COM/ipaca/vlv#caenrollmentpkitomcatindex.db to /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/ipaca/vlv#caenrollmentpkitomcatindex.db
[19/Mar/2013:14:09:57 -0400] - Moving file /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/ipaca/seeAlso.db
[19/Mar/2013:14:09:57 -0400] - Copying /tmp/tmpVRNYXkipa/ipa/GREYOAK-COM/ipaca/seeAlso.db to /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/ipaca/seeAlso.db
[19/Mar/2013:14:09:57 -0400] - Moving file /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/ipaca/notbefore.db
[19/Mar/2013:14:09:57 -0400] - Copying /tmp/tmpVRNYXkipa/ipa/GREYOAK-COM/ipaca/notbefore.db to /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/ipaca/notbefore.db
[19/Mar/2013:14:09:57 -0400] - Moving file /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/ipaca/vlv#capendingpkitomcatindex.db
[19/Mar/2013:14:09:57 -0400] - Copying /tmp/tmpVRNYXkipa/ipa/GREYOAK-COM/ipaca/vlv#capendingpkitomcatindex.db to /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/ipaca/vlv#capendingpkitomcatindex.db
[19/Mar/2013:14:09:57 -0400] - Moving file /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/ipaca/certstatus.db
[19/Mar/2013:14:09:57 -0400] - Copying /tmp/tmpVRNYXkipa/ipa/GREYOAK-COM/ipaca/certstatus.db to /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/ipaca/certstatus.db
[19/Mar/2013:14:09:57 -0400] - Moving file /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/userRoot
[19/Mar/2013:14:09:57 -0400] - Moving file /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/userRoot/automountkey.db
[19/Mar/2013:14:09:57 -0400] - Copying /tmp/tmpVRNYXkipa/ipa/GREYOAK-COM/userRoot/automountkey.db to /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/userRoot/automountkey.db
[19/Mar/2013:14:09:57 -0400] - Moving file /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/userRoot/managedby.db
[19/Mar/2013:14:09:57 -0400] - Copying /tmp/tmpVRNYXkipa/ipa/GREYOAK-COM/userRoot/managedby.db to /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/userRoot/managedby.db
[19/Mar/2013:14:09:57 -0400] - Moving file /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/userRoot/parentid.db
[19/Mar/2013:14:09:57 -0400] - Copying /tmp/tmpVRNYXkipa/ipa/GREYOAK-COM/userRoot/parentid.db to /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/userRoot/parentid.db
[19/Mar/2013:14:09:57 -0400] - Moving file /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/userRoot/DBVERSION
[19/Mar/2013:14:09:57 -0400] - Copying /tmp/tmpVRNYXkipa/ipa/GREYOAK-COM/userRoot/DBVERSION to /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/userRoot/DBVERSION
[19/Mar/2013:14:09:57 -0400] - Moving file /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/userRoot/ou.db
[19/Mar/2013:14:09:57 -0400] - Copying /tmp/tmpVRNYXkipa/ipa/GREYOAK-COM/userRoot/ou.db to /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/userRoot/ou.db
[19/Mar/2013:14:09:57 -0400] - Moving file /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/userRoot/member.db
[19/Mar/2013:14:09:57 -0400] - Copying /tmp/tmpVRNYXkipa/ipa/GREYOAK-COM/userRoot/member.db to /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/userRoot/member.db
[19/Mar/2013:14:09:57 -0400] - Moving file /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/userRoot/aci.db
[19/Mar/2013:14:09:57 -0400] - Copying /tmp/tmpVRNYXkipa/ipa/GREYOAK-COM/userRoot/aci.db to /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/userRoot/aci.db
[19/Mar/2013:14:09:57 -0400] - Moving file /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/userRoot/memberOf.db
[19/Mar/2013:14:09:57 -0400] - Copying /tmp/tmpVRNYXkipa/ipa/GREYOAK-COM/userRoot/memberOf.db to /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/userRoot/memberOf.db
[19/Mar/2013:14:09:57 -0400] - Moving file /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/userRoot/id2entry.db
[19/Mar/2013:14:09:57 -0400] - Copying /tmp/tmpVRNYXkipa/ipa/GREYOAK-COM/userRoot/id2entry.db to /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/userRoot/id2entry.db
[19/Mar/2013:14:09:57 -0400] - Moving file /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/userRoot/numsubordinates.db
[19/Mar/2013:14:09:57 -0400] - Copying /tmp/tmpVRNYXkipa/ipa/GREYOAK-COM/userRoot/numsubordinates.db to /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/userRoot/numsubordinates.db
[19/Mar/2013:14:09:57 -0400] - Moving file /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/userRoot/ancestorid.db
[19/Mar/2013:14:09:57 -0400] - Copying /tmp/tmpVRNYXkipa/ipa/GREYOAK-COM/userRoot/ancestorid.db to /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/userRoot/ancestorid.db
[19/Mar/2013:14:09:57 -0400] - Moving file /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/userRoot/nsuniqueid.db
[19/Mar/2013:14:09:57 -0400] - Copying /tmp/tmpVRNYXkipa/ipa/GREYOAK-COM/userRoot/nsuniqueid.db to /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/userRoot/nsuniqueid.db
[19/Mar/2013:14:09:57 -0400] - Moving file /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/userRoot/uidnumber.db
[19/Mar/2013:14:09:57 -0400] - Copying /tmp/tmpVRNYXkipa/ipa/GREYOAK-COM/userRoot/uidnumber.db to /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/userRoot/uidnumber.db
[19/Mar/2013:14:09:57 -0400] - Moving file /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/userRoot/objectclass.db
[19/Mar/2013:14:09:57 -0400] - Copying /tmp/tmpVRNYXkipa/ipa/GREYOAK-COM/userRoot/objectclass.db to /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/userRoot/objectclass.db
[19/Mar/2013:14:09:57 -0400] - Moving file /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/userRoot/uid.db
[19/Mar/2013:14:09:57 -0400] - Copying /tmp/tmpVRNYXkipa/ipa/GREYOAK-COM/userRoot/uid.db to /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/userRoot/uid.db
[19/Mar/2013:14:09:57 -0400] - Moving file /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/userRoot/krbPrincipalName.db
[19/Mar/2013:14:09:57 -0400] - Copying /tmp/tmpVRNYXkipa/ipa/GREYOAK-COM/userRoot/krbPrincipalName.db to /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/userRoot/krbPrincipalName.db
[19/Mar/2013:14:09:57 -0400] - Moving file /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/userRoot/entryusn.db
[19/Mar/2013:14:09:57 -0400] - Copying /tmp/tmpVRNYXkipa/ipa/GREYOAK-COM/userRoot/entryusn.db to /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/userRoot/entryusn.db
[19/Mar/2013:14:09:57 -0400] - Moving file /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/userRoot/memberHost.db
[19/Mar/2013:14:09:57 -0400] - Copying /tmp/tmpVRNYXkipa/ipa/GREYOAK-COM/userRoot/memberHost.db to /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/userRoot/memberHost.db
[19/Mar/2013:14:09:57 -0400] - Moving file /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/userRoot/mail.db
[19/Mar/2013:14:09:57 -0400] - Copying /tmp/tmpVRNYXkipa/ipa/GREYOAK-COM/userRoot/mail.db to /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/userRoot/mail.db
[19/Mar/2013:14:09:57 -0400] - Moving file /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/userRoot/entryrdn.db
[19/Mar/2013:14:09:57 -0400] - Copying /tmp/tmpVRNYXkipa/ipa/GREYOAK-COM/userRoot/entryrdn.db to /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/userRoot/entryrdn.db
[19/Mar/2013:14:09:57 -0400] - Moving file /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/userRoot/displayname.db
[19/Mar/2013:14:09:57 -0400] - Copying /tmp/tmpVRNYXkipa/ipa/GREYOAK-COM/userRoot/displayname.db to /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/userRoot/displayname.db
[19/Mar/2013:14:09:57 -0400] - Moving file /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/userRoot/cn.db
[19/Mar/2013:14:09:57 -0400] - Copying /tmp/tmpVRNYXkipa/ipa/GREYOAK-COM/userRoot/cn.db to /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/userRoot/cn.db
[19/Mar/2013:14:09:57 -0400] - Moving file /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/userRoot/sn.db
[19/Mar/2013:14:09:57 -0400] - Copying /tmp/tmpVRNYXkipa/ipa/GREYOAK-COM/userRoot/sn.db to /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/userRoot/sn.db
[19/Mar/2013:14:09:57 -0400] - Moving file /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/userRoot/memberUser.db
[19/Mar/2013:14:09:57 -0400] - Copying /tmp/tmpVRNYXkipa/ipa/GREYOAK-COM/userRoot/memberUser.db to /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/userRoot/memberUser.db
[19/Mar/2013:14:09:57 -0400] - Moving file /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/userRoot/fqdn.db
[19/Mar/2013:14:09:57 -0400] - Copying /tmp/tmpVRNYXkipa/ipa/GREYOAK-COM/userRoot/fqdn.db to /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/userRoot/fqdn.db
[19/Mar/2013:14:09:57 -0400] - Moving file /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/userRoot/ipakrbprincipalalias.db
[19/Mar/2013:14:09:57 -0400] - Copying /tmp/tmpVRNYXkipa/ipa/GREYOAK-COM/userRoot/ipakrbprincipalalias.db to /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/userRoot/ipakrbprincipalalias.db
[19/Mar/2013:14:09:57 -0400] - Moving file /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/userRoot/seeAlso.db
[19/Mar/2013:14:09:57 -0400] - Copying /tmp/tmpVRNYXkipa/ipa/GREYOAK-COM/userRoot/seeAlso.db to /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/userRoot/seeAlso.db
[19/Mar/2013:14:09:57 -0400] - Moving file /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/userRoot/macAddress.db
[19/Mar/2013:14:09:57 -0400] - Copying /tmp/tmpVRNYXkipa/ipa/GREYOAK-COM/userRoot/macAddress.db to /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/userRoot/macAddress.db
[19/Mar/2013:14:09:57 -0400] - Moving file /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/userRoot/gidnumber.db
[19/Mar/2013:14:09:57 -0400] - Copying /tmp/tmpVRNYXkipa/ipa/GREYOAK-COM/userRoot/gidnumber.db to /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/userRoot/gidnumber.db
[19/Mar/2013:14:09:57 -0400] - Moving file /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/userRoot/givenName.db
[19/Mar/2013:14:09:57 -0400] - Copying /tmp/tmpVRNYXkipa/ipa/GREYOAK-COM/userRoot/givenName.db to /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/userRoot/givenName.db
[19/Mar/2013:14:09:57 -0400] - Moving file /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/userRoot/nscpEntryDN.db
[19/Mar/2013:14:09:57 -0400] - Copying /tmp/tmpVRNYXkipa/ipa/GREYOAK-COM/userRoot/nscpEntryDN.db to /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/userRoot/nscpEntryDN.db
[19/Mar/2013:14:09:57 -0400] - Moving file /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/dse_instance.ldif
[19/Mar/2013:14:09:57 -0400] - Copying /tmp/tmpVRNYXkipa/ipa/GREYOAK-COM/dse_instance.ldif to /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/dse_instance.ldif
[19/Mar/2013:14:09:57 -0400] - Moving file /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/log.0000000001
[19/Mar/2013:14:09:57 -0400] - Copying /tmp/tmpVRNYXkipa/ipa/GREYOAK-COM/log.0000000001 to /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/log.0000000001
[19/Mar/2013:14:09:58 -0400] - Moving file /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/dse_index.ldif
[19/Mar/2013:14:09:58 -0400] - Copying /tmp/tmpVRNYXkipa/ipa/GREYOAK-COM/dse_index.ldif to /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/dse_index.ldif
[19/Mar/2013:14:09:58 -0400] - Removing file /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/DBVERSION from staging area
[19/Mar/2013:14:09:58 -0400] - Removing file /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/ipaca from staging area
[19/Mar/2013:14:09:58 -0400] - Removing file /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/userRoot from staging area
[19/Mar/2013:14:09:58 -0400] - Removing file /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak/log.0000000001 from staging area
[19/Mar/2013:14:09:58 -0400] - All database threads now stopped
[19/Mar/2013:14:09:58 -0400] - Restore: Removing staging area /var/lib/dirsrv/slapd-GREYOAK-COM/db/../fribak.

Bug description: backend instance name was not validated correctly.
When a given backend instance name was not valid, the instance name
was ignored and the utility restored all instances, which was a default
behaviour of the restore -- bak2db.

Fix description: This patch adds the code to check the backend instance
name. If there is no backend instance, the restore request is ignored.
In addition, it enhanced the back up path validation, as well.

There was another bug found in the restore/bak2db. The backend instance
name is supposed to be case insensitive, but the case was not ignored.
The bug was fixed, too.

{{{

76      return_value = dbversion_read(li, directory, &dbversion, &dataversion); 
77      if (return_value) { 
78          if (ENOENT == return_value) { 
79              LDAPDebug1Arg(LDAP_DEBUG_ANY, "archive2db: no back up \"%s\" exists.\n", 
80                            directory); 
81              return -1; 
82          } 
83          LDAPDebug1Arg(LDAP_DEBUG_ANY, "Warning: Unable to read dbversion file in %s\n", 
84                        directory); 
85      }

}}}
How do you distinguish between no such directory "directory" and no such file "dbversion"?

Replying to [comment:7 rmeggins]:

How do you distinguish between no such directory "directory" and no such file "dbversion"?

Yeah, it's not being distinguished... How about adding this additional check and return a different error (e.g., EACCES) if PR_Open(DBVERSION) fails?

@@ -170,14 +172,20 @@ dbversion_read(struct ldbminfo li, const char directory,
return EINVAL;
}

  • rc = PR_GetFileInfo64(directory, &fileinfo);
  • if ((rc != PR_SUCCESS) || (fileinfo.type != PR_FILE_DIRECTORY)) {
  • / Directory does not exist or not a directory. /
  • return ENOENT;
  • }
    +

If the directory does not exist, it fails as follows:
archive2db: no back up "/var/lib/dirsrv/slapd-totoro/bak/totoro-2013_08_05_16_38_00" exists.
Restore failed (error -1)

If opening DBVERSION fails, it logs this error:
Restore: backup directory /var/lib/dirsrv/slapd-totoro/bak/totoro-2013_08_05_16_38_38 does not contain a complete backup
archive2db: Failed to read backup file set. Either the directory specified doesn't exist, or it exists but doesn't contain a valid backup set, or file permissions prevent the server reading the backup set. error=53 (Invalid request descriptor)

Reviewed by Rich (Thank you!!)

Pushed to master:
44ebe22..ad32c62 master -> master
commit ad32c62

Metadata Update from @rmeggins:
- Issue assigned to nhosoi
- Issue set to the milestone: 1.3.2 - 08/13 (August)

3 years ago

Login to comment on this ticket.

Metadata