https://github.com/financial-times/pac-aurora-synchroniser
A CLI tool to synchronise the latest PAC data between two Aurora instances
https://github.com/financial-times/pac-aurora-synchroniser
pac universal-publishing
Last synced: about 1 year ago
JSON representation
A CLI tool to synchronise the latest PAC data between two Aurora instances
- Host: GitHub
- URL: https://github.com/financial-times/pac-aurora-synchroniser
- Owner: Financial-Times
- License: mit
- Created: 2018-04-24T11:33:45.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2023-01-10T14:02:06.000Z (over 3 years ago)
- Last Synced: 2025-01-23T22:13:10.302Z (over 1 year ago)
- Topics: pac, universal-publishing
- Language: Go
- Size: 16.6 KB
- Stars: 0
- Watchers: 21
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# pac-aurora-synchroniser
A CLI tool to synchronise the latest PAC data between two Aurora instances
[](https://circleci.com/gh/Financial-Times/pac-aurora-synchroniser/tree/master)[](https://goreportcard.com/report/github.com/Financial-Times/pac-aurora-synchroniser)[](https://coveralls.io/github/Financial-Times/pac-aurora-synchroniser)
## Introduction
This CLI tool aims to synchronize two AWS aurora instances used for PAC.
The software moves all the records that are more recent in a source database to a target database
based on the `last_modified` field of each table.
Tables without such field will be ignored by the synchronisation process.
## Installation
Download the source code, dependencies and test dependencies:
curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
mkdir $GOPATH/src/github.com/Financial-Times/public-things-api
cd $GOPATH/src/github.com/Financial-Times
git clone https://github.com/Financial-Times/public-things-api.git
cd public-things-api && dep ensure -vendor-only
go build .
## Running locally
1. Run the tests and install the binary:
go test ./...
go install
2. Run the binary (using the `help` flag to see the available optional arguments):
$GOPATH/bin/pac-aurora-synchroniser [--help]
Options:
--source-db-connection-url Connection URL to the database with the most recent data (env $SOURCE_DB_CONNECTION_URL)
--target-db-connection-url Connection URL to the database that needs to receive the latest data (env $TARGET_DB_CONNECTION_URL)