bak2db script: how do you use it?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,

I am now trying to make the initial replication happen manually through the restoration of a backup. This is also turning out to be strangely difficult.

After backing up servera I have the following directory on serverc:

[root@serverc ~]# ls -al /tmp/replicate/
total 16
drwx------. 4 nobody nobody 4096 May  5 12:08 .
drwxrwxrwt. 6 root   root   4096 May  5 13:30 ..
drwx------. 2 nobody nobody 4096 May  5 12:08 NetscapeRoot
drwx------. 2 nobody nobody 4096 May  5 12:08 userRoot

I want to restore the contents of userRoot to serverc, which looks like this:

[root@serverc ~]# ls -al /var/lib/dirsrv/slapd-serverc/db/
total 20604
drwxrwx---. 3 nobody nobody     4096 May  5 13:31 .
drwxrwx---. 5 nobody nobody     4096 May  5 13:30 ..
-rw-------. 1 nobody nobody       49 May  5 13:31 DBVERSION
-rw-------. 1 nobody nobody    24576 May  5 13:31 __db.001
-rw-------. 1 nobody nobody  1736704 May  5 13:37 __db.002
-rw-------. 1 nobody nobody 10002432 May  5 13:31 __db.003
-rw-------. 1 nobody nobody  1081344 May  5 13:37 __db.004
-rw-------. 1 nobody nobody  8134656 May  5 13:31 __db.005
-rw-------. 1 nobody nobody    90112 May  5 13:31 __db.006
-rw-------. 1 nobody nobody 10485760 May  5 13:31 log.0000000001
drwx------. 2 nobody nobody     4096 May  5 13:30 userRoot

I try and import the backup like so:

[root@serverc ~]# /usr/lib64/dirsrv/slapd-serverc/bak2db /tmp/replicate/ -n userRoot
[05/May/2014:13:49:53 +0200] 389-Directory/1.2.11.15 - debug level: backend (524288)
[05/May/2014:13:49:53 +0200] - Warning: Unable to read dbversion file in /tmp/replicate
[05/May/2014:13:49:53 +0200] - Restore: backup directory /tmp/replicate does not contain a complete backup
[05/May/2014:13:49:53 +0200] - 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)

No luck. Let's guess again:

[root@serverc ~]# /usr/lib64/dirsrv/slapd-serverc/bak2db /tmp/replicate/userRoot/ -n userRoot

Lots of encouraging looking output, but the server is now completely empty - the root DSE is gone.

Looking at serverc, we see the userRoot directory has been ignored and we now have a totally different directory structure:

[root@joey ~]# ls -al /var/lib/dirsrv/slapd-joey/db/
total 260252
drwxrwx---. 3 nobody nobody      4096 May  5 13:43 .
drwxrwx---. 5 nobody nobody      4096 May  5 13:30 ..
-rw-------. 1 nobody nobody        49 May  5 13:43 DBVERSION
-rw-------. 1 nobody nobody     24576 May  5 13:43 __db.001
-rw-------. 1 nobody nobody   1736704 May  5 13:44 __db.002
-rw-------. 1 nobody nobody  10002432 May  5 13:44 __db.003
-rw-------. 1 nobody nobody   1081344 May  5 13:44 __db.004
-rw-------. 1 nobody nobody   8134656 May  5 13:44 __db.005
-rw-------. 1 nobody nobody     90112 May  5 13:44 __db.006
-rw-------. 1 nobody nobody     16384 May  5 13:41 aci.db4
-rw-------. 1 nobody nobody   2482176 May  5 13:41 ancestorid.db4
-rw-------. 1 nobody nobody     16384 May  5 13:41 associatedDomain.db4
-rw-------. 1 nobody nobody     16384 May  5 13:41 certificateUUID.db4
-rw-------. 1 nobody nobody  24117248 May  5 13:41 cn.db4
-rw-------. 1 nobody nobody     16384 May  5 13:41 contractClass.db4
-rw-------. 1 nobody nobody     16384 May  5 13:41 contractCustomerCounterparty.db4
-rw-------. 1 nobody nobody     16384 May  5 13:41 contractRecipientCounterparty.db4
-rw-------. 1 nobody nobody     16384 May  5 13:41 contractVendorCounterparty.db4
-rw-------. 1 nobody nobody  22487040 May  5 13:41 entryrdn.db4
-rw-------. 1 nobody nobody   5316608 May  5 13:41 givenName.db4
-rw-------. 1 nobody nobody 159891456 May  5 13:41 id2entry.db4
-rw-------. 1 nobody nobody     16384 May  5 13:41 ipHostNumber.db4
-rw-------. 1 nobody nobody  10485760 May  5 13:44 log.0000000001
-rw-------. 1 nobody nobody  11468800 May  5 13:41 mail.db4
-rw-------. 1 nobody nobody     40960 May  5 13:41 mailAlternateAddress.db4
-rw-------. 1 nobody nobody     24576 May  5 13:41 mailHost.db4
-rw-------. 1 nobody nobody     16384 May  5 13:41 memberCertificateIssuerDN.db4
-rw-------. 1 nobody nobody     16384 May  5 13:41 memberCertificateSubjectDN.db4
-rw-------. 1 nobody nobody     16384 May  5 13:41 nscpEntryDN.db4
-rw-------. 1 nobody nobody   6430720 May  5 13:41 nsuniqueid.db4
-rw-------. 1 nobody nobody     24576 May  5 13:41 numsubordinates.db4
-rw-------. 1 nobody nobody   2473984 May  5 13:41 objectclass.db4
-rw-------. 1 nobody nobody     16384 May  5 13:41 owner.db4
-rw-------. 1 nobody nobody    802816 May  5 13:41 parentid.db4
-rw-------. 1 nobody nobody   5308416 May  5 13:41 sn.db4
-rw-------. 1 nobody nobody     16384 May  5 13:41 uid.db4
-rw-------. 1 nobody nobody   4243456 May  5 13:41 uniquemember.db4

What is the secret to the bak2db? What command line should I use that is compatible with the server? How do you convince bak2db to restore into the userRoot directory instead of just dumping everything in the root of the directory, to be ignored by the server?

Anyone used bak2db before?

Regards,
Graham
--

--
389 users mailing list
389-users@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/389-users





[Index of Archives]     [Fedora User Discussion]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora News]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora QA]     [Fedora Triage]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Yosemite Photos]     [Linux Apps]     [Maemo Users]     [Gnome Users]     [KDE Users]     [Fedora Tools]     [Fedora Art]     [Fedora Docs]     [Maemo Users]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Fedora ARM]

  Powered by Linux