Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs-1082 - LiveCompare Docs update #6157

Merged
merged 3 commits into from
Oct 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading