[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: Backup/Restore



On Fri, Jun 20, 2003 at 08:59:29PM -0700, Adam Jacob wrote:
> I've been fiddling with how to backup/restore my directory, especially when
> the restore is going to a different machine.  I seem to always wind up
> having errors like the following if I back up id2entry.bdb, run slapindex on
> the restore host, and start/stop slapd:
> 
> Jun 20 20:45:38 ldap1 slapd[30012]: bdb(dc=go2net,dc=com): id2entry.bdb:
> unable to flush page: 0
> Jun 20 20:45:38 ldap1 slapd[30012]: bdb(dc=go2net,dc=com): txn_checkpoint:
> failed to flush the buffer cache Invalid argument
> Jun 20 20:45:38 ldap1 slapd[30012]: bdb_db_destroy: txn_checkpoint failed:
> Invalid argument (22)
> 
> Is backing up id2entry and running slapindex no longer a reliable method
> for backing up the directory, as the Faq-O-Matic says?

Oooohh, look who answered his own question:

http://www.sleepycat.com/docs/ref/transapp/faq.html

# How can I move a database from one transactional environment into another?
#
# Because database pages contain references to log records, databases cannot
# be simply moved into different database environments. To move a database
# into a different environment, dump and reload the database before moving it.
# If the database is too large to dump and reload, the database may be
# prepared in place by setting the first eight bytes of each database page in
# the file to 0.
#
# # I'm seeing the error "log_flush: LSN past current end-of-log", what does
# that mean?
#
# The most common cause of this error is that a system administrator has
# removed all of the log files from a database environment. You should shut
# down your database environment as gracefully as possible, first flushing the
# database environment cache to disk, if that's possible. Then, dump and
# reload your databases. If your databases are too large to dump and reload,
# the database may be repaired in place by setting the first eight bytes of
# each database page in the file to 0, but if you do that, you must verify
# your databases before using them again. (It is possible for the databases to
# be corrupted when this happens, and the longer the application runs, the
# worse it can get.) 

Adam

-- 
adam@sysadminsith.org - (http://stalecoffee.org)
Democratically Elected Leader for Life
Peoples Socialist Republic of Humanitarian Well Being and All Around Goodness
Evil Lord of the Sysadmin Sith Darth Rmdashrf