Backup and recovery¶
The Attini frameworks maintain state in 3 places:
AWS S3
Amazon DynamoDb
AWS Systems Manager Parameter Store
All data that Attini used during deployments is created during the deployment execution, so you can always delete/truncate all Attini data without risking your ability to re-deploy. However this data is useful to see your deployment history and enabling you to do rollbacks.
Attini data in AWS S3 Buckets¶
Attini have 2 AWS S3 Buckets per installation:
attini-deployment-origin-{region}-{aws account}
attini-artifact-store-{region}-{aws account}
Both buckets have version history enabled and a life cycle policy to delete non current objects after 30 days. So any objects that are overwritten or deleted can be restored for 30 days.
Note
When you deploy a new version of a Attini Distribution, it does not overwrite any files in attini-artifact-store-{region}-{aws account}
.
So the life cycle will be determined by the retention configuration (RetainDistributionDays and
RetainDistributionVersions).
Attini data in Amazon DynamoDb¶
Attini have 2 Amazon DynamoDb tables:
AttiniDeployData
AttiniResourceStates
Both tables have Point in time recovery enabled. If you want to make extra backups of these tables you are free to do so using your own backup tools.
This data is only used during deployments so if its deleted it will not effect your new deployments. The only Attini
features you will lose if the data is lost is the CLI command attini deploy history
.
If any data in these tables are deleted by mistake you can follow these steps:
Do a restore to a new DynamoDb table from the point in time recovery backup.
Copy the data from the new table into AttiniDeployData or AttiniResourceStates tables.
If any of the tables are accidentally deleted and you do not have any manual backups the data is lost.
Manually getting the Deployment history if DynamoDb tables are lost¶
An ordered list of the 100 latest versions of all distribution IDs are also saved as parameter history in AWS Systems Manager Parameter Store.
You can find then under the path /attini/distributions/{environment}/{distribution name}/latest
.
Using these parameters you can find any distribution in the s3 bucket attini-artifact-store-{region}-{aws account}
that is still
saved by your retention configuration (RetainDistributionDays and
RetainDistributionVersions).
Attini data in AWS Systems Manager Parameter Store¶
An ordered list of the 100 latest versions of all distribution IDs are saved as parameter history in AWS Systems Manager Parameter Store.
You can find then under the path /attini/distributions/{environment}/{distribution name}/latest
.
These parameters are not backed up so if they are deleted, the data is lost.
If the data in Attini data in Amazon DynamoDb is intact, you can still get the latest versions within your retention configuration
(RetainDistributionDays and RetainDistributionVersions)
by using the Attini CLI attini deploy history -e {environment} -n {distribution name}