nestauk / daps_utils

Tools for setting up and running pipelines in a Data Analytics and Production System (DAPS).
0 stars 1 forks source link

Restore and sync database tables #61

Open jaklinger opened 3 years ago

jaklinger commented 3 years ago

2 stages:

  1. dbs.restore_snapshot(when='latest'): Restore the latest version of a database from its latest snapshot (configurable) to a temporary location. Make sure to shutdown the database after the transaction (and preferably delete)
  2. dbs.sync_db(from_engine, to_engine, table_orm, drop_before_transfer=True)