diff --git a/README.md b/README.md index f89b31c..ac81de1 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,10 @@ # OTT Developer Docs -👉 https://docs.trade-tariff.service.gov.uk/ - production -👉 https://docs.staging.trade-tariff.service.gov.uk/ - staging -👉 https://docs.dev.trade-tariff.service.gov.uk/ - development +You can find the developer docs deployed, here: + +- [production] +- [staging] +- [development] This is a static site generated with Middleman, using [alphagov/tech-docs-template](https://github.com/alphagov/tech-docs-template). @@ -79,6 +81,7 @@ This will create a `build` directory containing a set of HTML files. [MIT License](LICENCE) -[development]: /.github/workflows/development.yml -[staging]: /.github/workflows/staging.yml -[production]: /.github/workflows/production.yml + +[development]: https://docs.dev.trade-tariff.service.gov.uk/ +[staging]: https://docs.staging.trade-tariff.service.gov.uk/ +[production]: https://docs.trade-tariff.service.gov.uk/ diff --git a/favicon.ico b/favicon.ico deleted file mode 100644 index 28004dd..0000000 Binary files a/favicon.ico and /dev/null differ diff --git a/source/images/aws/dyanmodb-pitr-restoring.png b/source/images/aws/dyanmodb-pitr-restoring.png new file mode 100644 index 0000000..1e31714 Binary files /dev/null and b/source/images/aws/dyanmodb-pitr-restoring.png differ diff --git a/source/images/aws/dynamodb-pitr-restoring-form.png b/source/images/aws/dynamodb-pitr-restoring-form.png new file mode 100644 index 0000000..8fef5f9 Binary files /dev/null and b/source/images/aws/dynamodb-pitr-restoring-form.png differ diff --git a/source/manual/how-to-backup-and-restore-in-aws-dynamodb-pitr.html.md b/source/manual/how-to-backup-and-restore-in-aws-dynamodb-pitr.html.md new file mode 100644 index 0000000..0bfcf2d --- /dev/null +++ b/source/manual/how-to-backup-and-restore-in-aws-dynamodb-pitr.html.md @@ -0,0 +1,43 @@ +--- +owner_slack: "#trade-tariff-infrastructure" +title: Restore tables in AWS DynamoDB using PITR +section: Backups +layout: manual_layout +parent: "/manual.html" +--- + +This playbook describes how to restore a table using Amazon's [DynamoDB PITR][dynamodb-pitr]. + +We use DynamoDB Point in Time Recovery (PITR) backups to keep 35 days worth of +changes to a configured dynamodb table. + +> Most dynamodb tables - for instance those used for terraform locks, do not include +> this functionality. + +## Prerequisites + +1. AWS account configured with the correct permissions +2. Any browser + +## Restore a DynamoDB table via the AWS Console + +The procedure for restoring a DynamoDB table using PITR is as follows: + +1. Navigate to DynamoDB > Tables > your table +2. Select the Backups tab +3. Click Restore +4. Choose a name for your table (for example `CustomerApiKeys-restored`) +5. Pick either the latest snapshot or specify a date and time where the data was last in a good state +6. Decide whether you need secondary indexes restored (pick `Restore the entire table`). This is more expensive but may be necessary if you have a lot of indexed data that is crucial for your application's performance +7. Choose `Same Region` for the region +8. Choose `Owned by Amazon DynamoDB` for the encryption keys +9. Select Restore at the bottom of the form + +Once the newly-restored table is available, you will need to configure your application to use it. + +> We recommend using environment variables to easily update your table names in your ECS application/lambda + +![Screenshot of the DynamoDB PITR form](images/aws/dynamodb-pitr-restoring-form.png) +![Screenshot of the DynamoDB table restoring](images/aws/dyanmodb-pitr-restoring.png) + +[dynamodb-pitr]: https://github.com/trade-tariff/trade-tariff-lambdas-database-backups diff --git a/source/manual/how-to-backup-and-restore-in-aws-rds.html.md b/source/manual/how-to-backup-and-restore-in-aws-rds.html.md index 05f7164..31862d5 100644 --- a/source/manual/how-to-backup-and-restore-in-aws-rds.html.md +++ b/source/manual/how-to-backup-and-restore-in-aws-rds.html.md @@ -1,6 +1,6 @@ --- owner_slack: "#trade-tariff-infrastructure" -title: Backup and restore databases in AWS RDS +title: Restore databases in AWS RDS section: Backups layout: manual_layout parent: "/manual.html"