Skip to content

Commit

Permalink
Edits to EPRS: fix to offline snapshot steps PR5985
Browse files Browse the repository at this point in the history
  • Loading branch information
ebgitelman committed Sep 19, 2024
1 parent b12644a commit 3f97507
Showing 1 changed file with 19 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,9 @@ The default value is `true`.

You can use an offline snapshot to first load the subscription tables of a single-master replication system. For a publication that's intended to have multiple subscriptions, you can create some of the subscriptions using the default Replication Server snapshot replication process as described in [Performing snapshot replication](../05_smr_operation/04_on_demand_replication/01_perform_replication/#perform_replication). You can create other subscriptions from an offline snapshot.

### Preparing the publication and subscription server configuration:
### Preparing the publication and subscription server configuration

Perform these steps before creating any subscriptions:
Before creating any subscriptions:

1. Register the publication server, add the publication database definition, and create the publication as described in [Creating a publication](../05_smr_operation/02_creating_publication/#creating_publication).

Expand All @@ -101,18 +101,21 @@ Perform these steps before creating any subscriptions:
- Change the `offlineSnapshot` option to `true`. When you restart the publication server or reload the publication server's configuration via reloadconf, `offlineSnapshot` set to `true` has two effects. One is that creating a subscription doesn't create the schema and subscription table definitions in the subscription database as is done with the default setting. The other is that creating a subscription sets a column in the control schema indicating an offline snapshot is used to load this subscription.
- Set the `batchInitialSync` option to the appropriate setting for your situation as discussed at the end of [Non-batch mode synchronization](#non_batch_mode_sync).

1. If you modified the publication server configuration, reload the configuration. See [Reloading the Publication or Subscription Server Configuration File (reloadconf)](../05_smr_operation/02_creating_publication/01_registering_publication_server/#registering_publication_server) for directions on reloading the publication server's configuration.
1. If you modified the publication server configuration, reload the configuration. See [Reloading the publication or subscription server configuration file (reloadconf)](../08_xdb_cli/03_xdb_cli_commands/52_reload_conf_file/].

### Creating subscription servers

Execute these steps to create a subscription from an offline snapshot. Repeat them for each additional subscription.
Perform these steps for each subscription you want to create from an offline snapshot.

1. Add the subscription as described in [Adding a subscription](../05_smr_operation/03_creating_subscription/03_adding_subscription/#adding_subscription).
!!! Note
See [Adding a subscription database](../05_smr_operation/03_creating_subscription/02_adding_subscription_database) for the rules for how Replication Server creates the subscription definitions from the publication for each database type. Follow these conventions when you create the target definitions manually.

1. Add the subscription as described in [Adding a subscription](../05_smr_operation/03_creating_subscription/03_adding_subscription). The subscription database user name you use when you add the subscription must have full privileges over the database objects you plan to create in the subscription database.

1. In the subscription database, create the schema and the subscription table definitions, and load the subscription tables from your offline data source. The subscription database user name used in [Adding a subscription database](../05_smr_operation/03_creating_subscription/02_adding_subscription_database/#adding_subscription_database) must have full privileges over the database objects created in this step. Also review the beginning of [Adding a subscription database](../05_smr_operation/03_creating_subscription/02_adding_subscription_database/#adding_subscription_database) regarding the rules as to how Replication Server creates the subscription definitions from the publication for each database type. You must follow these same conventions when you create the target definitions manually.
1. In the subscription database, create the schema and the subscription table definitions, and load the subscription tables from your offline data source.

!!!note
Ensure you don't load the offline data source from the source Publication database until after you complete the creation of a subscription. Otherwise, certain changes from the source database won't be replicated.
Ensure you don't load the offline data source from the source publication database until after you finish creating a subscription. Otherwise, certain changes from the source database won't be replicated.
!!!

1. Perform an on-demand synchronization replication. See [Performing synchronization replication](../05_smr_operation/04_on_demand_replication/02_perform_sync_replication/#perform_sync_replication) to learn how to perform an on-demand synchronization replication.
Expand All @@ -128,11 +131,11 @@ You can use an offline snapshot to first load the primary nodes of a multi-maste
!!! Note
Offline snapshots aren't supported for a multi-master replication system that's actively in use. Any changes on an active primary node are lost during the offline snapshot process of dumping or restoring the data of another node.

### Preparing the publication and subscription server configurations:
### Preparing the publication and subscription server configurations

Perform these steps before adding primary nodes:
Before adding primary nodes:

1. Register the publication server, add the primary definition node, and create the publication as described in [Creating a publication](../06_mmr_operation/02_creating_publication_mmr/#creating_publication_mmr).
1. Register the publication server, add the primary definition node, and create the publication as described in [Creating a publication](../06_mmr_operation/02_creating_publication_mmr).

1. Be sure there's no schedule defined on the replication system. If there is, remove the schedule until you complete this process. See [Removing a schedule](03_managing_schedule/#remove_schedule) for details.

Expand All @@ -141,21 +144,21 @@ Perform these steps before adding primary nodes:
- Set the `offlineSnapshot` option to `true`. When you restart the publication server or reload the publication server's configuration via reloadconf, this setting has the effect that adding a primary node sets a column in the control schema indicating an offline snapshot is used to load this primary node.
- Set the `batchInitialSync` option to the appropriate setting for your situation as discussed at the end of [Non-batch mode synchronization](#non_batch_mode_sync).

1. If you modified the publication server configuration file, reload the configuration. See [Reloading the Publication or Subscription Server Configuration File (reloadconf)](../05_smr_operation/02_creating_publication/01_registering_publication_server/#registering_publication_server) for directions to reload the publication server's configuration.
1. If you modified the publication server configuration file, reload the configuration. See [Reloading the publication or subscription server configuration file (reloadconf)](../08_xdb_cli/03_xdb_cli_commands/52_reload_conf_file/].

### Adding primary nodes
### Adding primary nodes

Execute these steps to add a primary node from an offline snapshot. Repeat them for each additional primary node.
Perform these steps for each primary node you want to add from an offline snapshot.

1. Add the primary node as described in [Creating more primary nodes](../06_mmr_operation/03_creating_primary_nodes/#creating_primary_nodes) with the options **Replicate Publication Schema** and **Perform Initial Snapshot** cleared.
1. Add the primary node as described in [Creating more primary nodes](../06_mmr_operation/03_creating_primary_nodes) with the options **Replicate Publication Schema** and **Perform Initial Snapshot** cleared.

1. In the database to use as the new primary node, create the schema and the table definitions, and load the tables from your offline data source.

!!!note
Ensure you don't load the offline data source from the source Publication database until after you add the target node in the MMR cluster. Otherwise, certain changes from the source database won't be replicated.
Ensure you don't load the offline data source from the source publication database until after you add the target node in the MMR cluster. Otherwise, certain changes from the source database won't be replicated.
!!!

1. Perform an initial on-demand synchronization. See [Performing synchronization replication](../06_mmr_operation/05_on_demand_replication_mmr/#perform_synchronization_replication_mmr) to learn how to perform an on demand-synchronization.
1. Perform an initial on-demand synchronization. See [Performing synchronization replication](../06_mmr_operation/05_on_demand_replication_mmr/#perform_synchronization_replication_mmr).

1. If you aren't planning to load any other primary nodes using an offline snapshot at this time, change the `offlineSnapshot` option back to `false` and the `batchInitialSync` option to `true` in the publication server configuration file.

Expand Down

0 comments on commit 3f97507

Please sign in to comment.