Skip to main content

Backup and Recovery

By defect aos cloud for aws implementation uses velero as backup tool.

Velero as backup tool

Companies worldwide are adopting containers to encapsulate their microservices, and many of them choose Kubernetes for automating deployment, scaling, and managing their containerized applications. As the number of these microservices grows, it becomes increasingly important to have a centralized backup mechanism in place to:

  • Protect applications in case of physical and logical errors
  • Perform migrations between Kubernetes clusters
  • Replicate production clusters to development and testing environments

Velero is a popular open-source tool that can provide Kubernetes cluster disaster recovery, data migration, and data protection. Velero can back up Kubernetes cluster resources and persistent volumes to externally supported storage backend on demand or by schedule.

NOTE: In case of EKS replacement the only persistent data that will be recovered it is about metrics, not production data.

EKS workloads restore

In case of lost of EKS or replacement, you need to reinstall the eks and re-run the velero helm lambda installer function, need also to get the velero cli, you can avoid this step if the metrics data for grafana and alert handler it is not critical for you.

# Get backups
velero backup get
velero schedule get

# We can choose a backup from 4 days old
velero restore create --from-backup <backup>
velero restore create --from-schedule <schedule-name>

Postgres RDS Backup and recovery

Automated Backups

Turned on by default, the automated backup feature of Amazon RDS will backup your databases and transaction logs. Amazon RDS automatically creates a storage volume snapshot of your DB instance, backing up the entire DB instance and not just individual databases.

This backup occurs during a daily user-configurable 30 minute period known as the backup window. Automated backups are kept for a configurable number of days (called the backup retention period). Your automatic backup retention period can be configured to up to thirty-five days.

Additionally we are using daily snapshot of the db to be able to restore easily in time.

To restore a DB instance from a DB snapshot

  1. Sign in to the AWS Management Console and open the Amazon RDS console at https://console.aws.amazon.com/rds/
  2. In the navigation pane, choose Snapshots.
  3. Choose the DB snapshot that you want to restore from.
  4. For Actions, choose Restore snapshot.
  5. On the Restore snapshot page, for DB instance identifier, enter the name for your restored DB instance.
  6. Specify other settings, such as allocated storage size.

    For information about each setting, see Settings for DB instances.

  7. Choose Restore DB instance.

Full and more details in the AWS RDS restore docs.