pac-aurora-synchroniser

command module
v0.0.0-...-1e8c302 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 15, 2021 License: MIT Imports: 4 Imported by: 0

README

pac-aurora-synchroniser

A CLI tool to synchronise the latest PAC data between two Aurora instances

Circle CIGo Report CardCoverage Status

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)
    

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL