[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: Full Backup/Restore slapd
- To: openldap-technical@openldap.org
- Subject: Re: Full Backup/Restore slapd
- From: Mauricio Tavares <raubvogel@gmail.com>
- Date: Thu, 21 Jun 2012 12:38:09 -0400
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=+tv24SgiW1z3mH6bSx9ZBXcZMw6aB0jbtX/TEml7hDw=; b=jm/ULdQ9FIsEOsGUGYaGp2xCj97eczOzfJrR1JARFcBIfGSs3u/rM8SglGCJfp+OpD N9Zws8z7h9W0nRrTO+xnT2R4NDobo10Pctmc667HkXOmfWuAw8KzNFTLc/BLw8+C+sS+ SEhc1aQ4uPKC7buI9a844lmd2VnCnd7R7ftvbAWZOd5KaNDdGsOplBCxS0us2tIGbkXu Cs2Q04QJQphiE5/meZ6VsbqWcqI1vCWkZO5e0hSuYOiB7/h8Mqn3v8Ybdxf3bJbsmSHC LKNM3zRYZ+BigVqZuiSYOANDatZDFVvvsXr3dUuVKfJB9xtHXSfoqjVoTf6f0MfHtSjQ bPDg==
- In-reply-to: <DUB109-W2348D1B1D56440678119C3C5FD0@phx.gbl>
- References: <DUB109-W2348D1B1D56440678119C3C5FD0@phx.gbl>
On Thu, Jun 21, 2012 at 11:33 AM, galemberti greg
<galemberti@hotmail.com> wrote:
> Hi,
> I want to implement a full backup procedure of my LDAP (schema, ACL, Data
> ...).
>
> * To save my schema i used the command: "slapcat -H
> ldap:///cn={4}my,cn=schema,cn=config -l schema.ldif"
> * To save my config, i used the command: "slapcat -H
> ldap:///olcDatabase={1}hdb,cn=config = config -l config.ldif
> * To save my accounts, i used the command: "slapcat -H ldap:///dc=my,dc=my
> -l accounts.ldif
>
> Now, when I want to test the restore on another server :
> * To restore my schema i used the command: "sudo -u openldap slapadd -v -b
> cn=config -l schema.ldiff " > OK
> * To restore my accounts i used the command: "sudo -u openldap slapadd -v -c
> -b cn=config -l accounts.ldiff " > OK
> * To restore my config i used the command: "sudo -u openldap slapadd -v -c
> -b olcDatabase={1}hdb,cn=config -l config.ldiff > KO. Indeed the slapadd
> command does not update the record so I get an error because they already
> exist. Also, how do I restore my configuration?
>
> Tks for your help
>
> PS : i use a debian squeeze server.
If you go to
https://help.ubuntu.com/12.04/serverguide/openldap-server.html#ldap-backup,
that is how I run my backups. And, I have tested the restore
procedure. Bottom line:
o The backend db (config.ldif in that page) has all the schemas and
config stuff. So, you do not need to bother saving schemas separately
or anything like that.
o The frontend db (example.com.ldif) has the account stuff.
There are other ways to yank those databases, but I was kinda lazy.