Skip to content

Latest commit

 

History

History
47 lines (31 loc) · 1.39 KB

File metadata and controls

47 lines (31 loc) · 1.39 KB

Backfill reports

Backfilling reports is something hopefully you will not need to do. However, should need arise the process is scripted.

  1. Take a RDS snapshot of the database using the take-manual-rds-snapshot.sh script.
  2. Use the shell script run-reports-backfill.sh to begin the backfill.
  3. Delete the backup RDS snapshot.

IMPORTANT:

  • IT IS ADVISABLE TO DO A DRY RUN IN THE PRE-PRODUCTION ENVIRONMENT BEFORE DOING THIS IN THE PRODUCTION ENVIRONMENT.
  • WHEN A BACKFILL DOES PLACE YOU MUST ALWAYS BACKFILL TO YESTERDAYS DATE OTHERWISE YOU MAY BE MISSING KEY DATA/CHANGES. THIS SCRIPT DOES NOT ENFORCE THAT!
  • DEPENDING ON HOW FAR YOU GO BACK IT CAN TAKE A LONG TIME, IDEALLY RUN OUT OF HOURS ON PROD.

How to backfill reports

Example taking a RDS snapshot

List the snapshots before

$ ./list-rds-snapshots.sh dev

Take the snapshot and make a note of the snapshot identifier

$ ./take-manual-rds-snapshot.sh dev

Check the snapshot has been created and is in "Status" : "available"

$ ./list-rds-snapshots.sh dev

Start the backfill from a local terminal session by running the following

$ ./run-reports-backfill.sh <dev/preprod/prod> <DATE_FROM> <DATE_TO> 

If you are happy all has worked then you can delete the snapshot taken at the start of the process

$ ./delete-rds-snapshot.sh <dev/preprod/prod> <snapshot_identifier>