[Date Prev][Date Next]
Re: LVM snapshot as a backup method
Pavlos Parissis wrote:
PP> Has anyone used LVM snapshot as a backup method when
PP> downtime isn't allowed and slapcat takes hours to finish?
I'd have thought it worth investigating _why_ slapcat takes so long.
Unless your database is truly gargantuan, very slow slapcat probably
indicates something is misconfigured, or the hardware is underspecified.
PP> I have to find a way to backup the LDAP without bring
PP> it down or set it in ReadOnly mode, thus I thought about
PP> the LVM snapshot.
A clean way to do this would be to set up a slave whose sole purpose is
to replicate from the main database, freeze, back-up, rinse and repeat.
But if you have a performance problem with your master, hitting it with
something that keeps stopping and starting a syncrepl consumer is likely
to make that problem bigger.
PP> I can run LVM snapshot every day and then run db_recover -c for
PP> making the snapshot LDAP DB in a good state.
I'll bow to the greater wisdom of those who know the innards of BDB, but
I would expect a dirty slapcat from a running server to be more likely
to give you a restore-able backup than a 'db_recover'ed LVM snap (for a
start the LDIF will be portable, whereas the snapshot will be tied to
the specific machine architecture and BDB version of the system it was
taken from). But neither of these are a particularly brilliant idea.
Duncan Gibb, Technical Director
Sirius Corporation plc - The Open Source Experts
Tel: +44 870 608 0063