Home / Repstance User Guide / CONFIGURE REPLICATION WITH REPSTANCE

CONFIGURE REPLICATION WITH REPSTANCE

This section shows how to build a replication with Repstance, step by step. Every example is a complete configuration: the commands you type, the answers you get and how to check the result. The examples use repcli; the same configuration can be made in the Web UI (see Setup First Replication) or with the REST API.

Before you start

  • Repstance is installed and running (see GETTING STARTED WITH REPSTANCE), and repcli can reach it. The commands of the examples are typed at the repcli prompt, in Fully Interactive Mode.
  • The Source and the Target Databases can be reached from the Repstance server, and the logins have the privileges that are described in Database Privileges.
  • The tables that are replicated exist in the Target Database with the same columns, or the Initial Load creates them (see Initial Data Migration).

The examples use the sample names db-src.example.com and db-tgt.example.com for the servers, testDB for the database, repuser for the login and Passw0rd123 for the password. Replace them with your own values.

The examples

ExampleWhat it showsDatabases
Basic Replication ConfigurationReplication in one direction: prepare the databases, create the Capture Process and the Apply Process, start them and check them.SQL Server to SQL Server
Initial Data MigrationCopy the data that exists in the Source (Initial Load), create the tables that are missing, then keep the databases in sync.SQL Server to Oracle
Database Sync from BackupThe other way to the first synchronization of the data: restore the Target from a backup of the Source while the Source stays in use, then apply the changes that were made since the backup.SQL Server to SQL Server
Multi-Target ReplicationOne Capture Process and two Apply Processes: the changes of the Source go to two Targets, with different rules for each.SQL Server to SQL Server and Snowflake
Bi-Direction ReplicationReplication in both directions between two databases, without loops.SQL Server and SQL Server
Objects and Data TransformationRename a schema, a table or a column, remove a column, change a data type and add a column with a constant value.SQL Server to PostgreSQL

Two of the examples bring the data of the Source to the Target for the first time. Initial Data Migration does it with the Initial Load: Repstance reads the tables of the Source and loads them into the Target, which can be a different database. Database Sync from Backup does it with a backup of the Source: the database moves the data, and Repstance applies the changes that were made since the backup. The second page compares the two ways.

What Repstance is used for

Repstance replicates data between databases of the same type and of different types (the databases are listed in SUPPORTED DATABASE REQUIREMENTS). It is used for:

  • Data migration
  • Data replication
  • Blue/green upgrade strategies
  • Zero-downtime migrations and upgrades
  • Disaster recovery and “hot standby” provisioning
  • Multi-node and multi-cluster provisioning for load balancing
  • “High availability” and “Always On” scenarios
  • Offloading of BI reporting
  • Data warehousing and data lake provisioning
  • Cross-vendor platform redundancy

The examples show the parts that every configuration is built from: Capture Processes, Apply Processes and the parameters that control which objects and which changes they handle, for example skiploopback (see Bi-Direction Replication).

The commands

The commands that the examples use are described in four sections: