From 780b92ada9afcf1d58085a83a0b9e6bc982203d1 Mon Sep 17 00:00:00 2001 From: Lorry Tar Creator Date: Tue, 17 Feb 2015 17:25:57 +0000 Subject: Imported from /home/lorry/working-area/delta_berkeleydb/db-6.1.23.tar.gz. --- docs/programmer_reference/rep_init.html | 100 +++++++++++++++++++------------- 1 file changed, 59 insertions(+), 41 deletions(-) (limited to 'docs/programmer_reference/rep_init.html') diff --git a/docs/programmer_reference/rep_init.html b/docs/programmer_reference/rep_init.html index 51865945..8678124f 100644 --- a/docs/programmer_reference/rep_init.html +++ b/docs/programmer_reference/rep_init.html @@ -14,7 +14,7 @@ -

By default, adding a new site to a replication group only requires the -client to join. Berkeley DB will automatically perform internal -initialization from the master to the client, bringing the client into -sync with the master.

- However, depending on the network and infrastructure, it can be - advantageous in a few instances to use a "hot backup" to initialize a - client into a replication group. Clients not wanting to automatically - perform internal initialization should call the DB_ENV->rep_set_config() method to - turn off the DB_REP_CONF_AUTOINIT flag. Turning off this - configuration flag causes Berkeley DB to - return DB_REP_JOIN_FAILURE to the application's DB_ENV->rep_process_message() method instead of - performing internal initialization. - -

-

To use a hot backup to initialize a client into a replication group, -perform the following steps:

+ By default, adding a new site to a replication group only + requires the client to join. Berkeley DB will automatically + perform internal initialization from the master to the client, + bringing the client into sync with the master. +

+

+ However, depending on the network and infrastructure, it + can be advantageous in a few instances to use a "hot backup" + to initialize a client into a replication group. Clients not + wanting to automatically perform internal initialization + should call the DB_ENV->rep_set_config() method to turn off the + DB_REP_CONF_AUTOINIT flag. Turning off this configuration + flag causes Berkeley DB to return DB_REP_JOIN_FAILURE to the + application's DB_ENV->rep_process_message() method instead of performing + internal initialization. +

+

+ To use a hot backup to initialize a client into a + replication group, perform the following steps: +

    -
  1. Do an archival backup of the master's environment, as described in -Database and log file archival. The backup can either be a conventional backup or a hot -backup.
  2. -
  3. Copy the archival backup into a clean environment directory on the -client.
  4. -
  5. Run catastrophic recovery on the client's new environment, as described -in Recovery procedures.
  6. -
  7. Reconfigure and reopen the environment as a client member of the -replication group.
  8. +
  9. + Do an archival backup of the master's environment, + as described in Database and log file + archival. The backup can + either be a conventional backup or a hot + backup. +
  10. +
  11. + Copy the archival backup into a clean environment + directory on the client. +
  12. +
  13. + Run catastrophic recovery on the client's new + environment, as described in Recovery procedures. +
  14. +
  15. + Reconfigure and reopen the environment as a client + member of the replication group. +
-

If copying the backup to the client takes a long time relative to the -frequency with which log files are reclaimed using the -db_archive utility or the DB_ENV->log_archive() method, it may be -necessary to suppress log reclamation until the newly restarted client -has "caught up" and applied all log records generated during its -downtime.

-

As with any Berkeley DB application, the database environment must be in a -consistent state at application startup. This is most easily assured -by running recovery at startup time in one thread or process; it is -harmless to do this on both clients and masters even when not strictly -necessary.

+

+ If copying the backup to the client takes a long time + relative to the frequency with which log files are reclaimed + using the db_archive utility or the DB_ENV->log_archive() method, it may be + necessary to suppress log reclamation until the newly + restarted client has "caught up" and applied all log records + generated during its downtime. +

+

+ As with any Berkeley DB application, the database + environment must be in a consistent state at application + startup. This is most easily assured by running recovery at + startup time in one thread or process; it is harmless to do + this on both clients and masters even when not strictly + necessary. +