Restoring an LDAP backup to a different server db2bak

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

 



Eddie C wrote:
> Unfortunately I only have the db2bak from the day I need to restore. 
> No ldif files. And I need to restore them to a new server. I do not 
> need all the configuration data. I only need two of our data trees.
Once again, do your backed up server and the new server share the same 
set of suffixes not including NetscapeRoot (if you have o=netscaperoot 
on the servers, you can't use this trick)?  If the answer is yes, you 
could restore the back-up onto the new server.

If the answer is no, did you run "db2bak" when the server was down?  If 
yes, theoretically you could do as follows.

    cd slapd-<newserver>  ## please make sure the new server already has
    corresponding root suffixes / backend to be restored.
    ./stop-slapd
    rm -rf db/*
    Repeat the command line for each backend to be restored:
    ./bak2db <full_path_to_backup_dir> -n <backendname>
    (e.g., bak2db /opt/fedora-ds/slapd-<id>/bak/2007_04_09_14_46_14/ -n
    exampleRoot; bak2db
    /opt/fedora-ds/slapd-<id>/bak/2007_04_09_14_46_14/ -n userRoot)
    ./start-slapd

But I remember it did not work as expected when Oscar experimented for 
us...  If it does not work, you may need to try what Oscar suggested.
Thanks,
--noriko
 
> On 4/9/07, *Oscar A. Valdez* <oscar.valdez at duraflex.com.sv 
> <mailto:oscar.valdez at duraflex.com.sv>> wrote:
>
>     El lun, 09-04-2007 a las 14:22 -0400, Eddie C escribi?:
>     > Every night I run a db2bak.
>     > Can this backup be safely restored to a different server? using
>     > bak2db?
>
>     It won't.
>
>     I had to do a restore by necessity, and here's what I had to do (by
>     Noriko Hosoi's gracious recommendation):
>
>     1. on the current directory server, export the data into ldif files.
>     go to your <server_root>/slapd-<id>; run "db2ldif -n <backend>"
>     for each backend (e.g., userRoot) EXCEPT NetscapeRoot
>     2. install new FDS
>     3. go to the <new_server_root>/slapd-<id>
>     4. stop the directory server
>     5. import the ldif files from the current directory server
>     repeat "ldif2db -n <backend> -i
>     <server_root>/slapd-<id>/<date_time>.ldif" for each
>     <date_time>.ldif file exported in (1).
>     6. start the directory server
>
>     The issue is documented in this thread:
>     https://www.redhat.com/archives/fedora-directory-users/2007-February/msg00024.html
>     <https://www.redhat.com/archives/fedora-directory-users/2007-February/msg00024.html>
>
>     The NetscapeRoot instance is server-specific, and it won't restore
>     properly on a new server.
>     --
>     Oscar A. Valdez
>
>
>     --
>     Fedora-directory-users mailing list
>     Fedora-directory-users at redhat.com
>     <mailto:Fedora-directory-users at redhat.com>
>     https://www.redhat.com/mailman/listinfo/fedora-directory-users
>
>
> ------------------------------------------------------------------------
>
> --
> Fedora-directory-users mailing list
> Fedora-directory-users at redhat.com
> https://www.redhat.com/mailman/listinfo/fedora-directory-users
>   


-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3237 bytes
Desc: S/MIME Cryptographic Signature
Url : http://lists.fedoraproject.org/pipermail/389-users/attachments/20070409/7c28fa97/attachment.bin 


[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