Skip to content

Commit

Permalink
Merge pull request #6157 from EnterpriseDB/DOCS-1082-add-basic-templa…
Browse files Browse the repository at this point in the history
…te-to-livecompare-docs-

docs-1082 - LiveCompare Docs update
  • Loading branch information
djw-m authored Oct 17, 2024
2 parents 047274e + cdbabe2 commit 00b8bba
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 10 deletions.
41 changes: 34 additions & 7 deletions product_docs/docs/livecompare/3/command_line_usage.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,45 @@
navTitle: Command line usage
title: Command-line usage
originalFilePath: command_line_usage.md

deepToC: true
---

## Compare mode

Copy any `/etc/livecompare/template*.ini` to use in your project and adjust as necessary. See [Settings](settings/).
Create a `.ini` file to configure LiveCompare. See [Settings](settings/) for a description of the various configuration options.

For example, a basic template contains:

```ini
; © Copyright EnterpriseDB UK Limited 2019-2024 - All rights reserved.

[General Settings]
logical_replication_mode = off
max_parallel_workers = 2

[First Connection]
dsn = host=192.168.0.100 port=5432 dbname=live1 user=postgres

[Second Connection]
dsn = host=192.168.0.200 port=5432 dbname=live2 user=postgres

[Third Connection]
dsn = host=192.168.0.200 port=5432 dbname=live3 user=postgres

[Output Connection]
dsn = port=5432 dbname=liveoutput user=postgres

[Table Filter]
schemas = schema_name = 'public'
```
cp /etc/livecompare/template_basic.ini my_project.ini

This basic template compares three connections, `live1`, `live2`, and `live3`, and outputs the results to the `liveoutput` database. LiveCompare only uses the `public` schema in the comparison.

### Running the comparison

To run the comparison, run livecompare and pass it the name of your settings file as an argument. If you have created a `my_project.ini` file, execute the following command:

```
livecompare my_project.ini
```

Expand Down Expand Up @@ -119,9 +148,7 @@ For more details about the `conflicts` mode, see [PGD support](bdr_support/).

## Dry-run mode

!!! Tip "New Feature"
LiveCompare dry-run mode support is available for LiveCompare version 2.2.0 and later.
!!!
Dry-run mode allows you to run the comparison without actually executing it. This mode is useful for checking the configuration before running the comparison.

For example, suppose you have the following INI file:

Expand All @@ -146,7 +173,7 @@ dsn = dbname=liveoutpu
schemas = schema_name = 'public'
```

As the DSN under `Output Connection` (the LiveCompare cache database) is incorrect, running LiveCompare initially fails with:
As the DSN under `Output Connection` (the LiveCompare cache database) is incorrect due to a mis-spelling of `liveoutput`, running LiveCompare initially fails with:

```
Output connection is not reachable.
Expand Down
6 changes: 3 additions & 3 deletions product_docs/docs/livecompare/3/installation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ Before installing, consult the [LiveCompare requirements](requirements) to ensur

You can install LiveCompare from the EnterpriseDB's Repos 2.0 repository.

If you have not already installed the appropriate EnterpriseDB repository, follow the instructions in the [EnterpriseDB repository installation guide](/repos/getting_started/).
If you haven't already installed the appropriate EnterpriseDB repository, follow the instructions in the [EnterpriseDB repository installation guide](/repos/getting_started/).

Then, to install LiveCompare, run the following command:

### RHEL 8, or othe RPM-based distributions:
### RHEL 8, or other RPM-based distributions:

```bash
sudo dnf install edb-livecompare
Expand All @@ -37,7 +37,7 @@ If you prefer to download the LiveCompare package manually, you can download the

After downloading the package, you can install it using the following command:

### RHEL 8, or othe RPM-based distributions:
### RHEL 8, or other RPM-based distributions:

```bash
sudo rpm -i edb-livecompare-<version>.rpm
Expand Down

1 comment on commit 00b8bba

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.