Skip to content

Commit

Permalink
doc: sync command breakdown and rollback notes
Browse files Browse the repository at this point in the history
  • Loading branch information
vjeeva committed Nov 15, 2024
1 parent d6610b1 commit ea6cf47
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions docs/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,16 @@ Therefore the next command will do the following:
$ belt sync testdatacenter1 database1
```

If the above command fails, you can diagnose and run the individual steps with the following commands:

- `sync-sequences` - reads and sets sequences values from SRC to DST at the time of command execution
- `dump-tables` - dumps only tables without Primary Keys
- `load_tables` - load into DST DB the tables from the `dump-tables` command (found on disk)
- `dump-contraints` - dumps NOT VALID constraints from your SRC DB schema onto disk
- `load-constraints` - load NOT VALID constraints from disk to your DST DB schema
- `validate-data` - Check random 100 rows and last 100 rows of every table involved in the replication job, and ensure all match exactly.
- `analyze` - Run ANALYZE on the database

## Step 8: Enable write traffic to the destination host

Enabling write traffic to the destination host is done outside of PgBelt, with your application.
Expand Down Expand Up @@ -221,8 +231,8 @@ command, some users might be missed here.

Things that will need manual resolution:

- Sequence values on the source database
- Tables without Primary Keys will need to be updated
- Sequence values on the source database. You will need to copy these over from the target database.
- Tables without Primary Keys will need to be updated. You will need to copy these over from the target database to the source.

After you are sure that sequences and tables without primary keys have been synchronized from the target
into the old source, point your application to the old source and your rollback is complete.

0 comments on commit ea6cf47

Please sign in to comment.