Backup and Restore
Here are the instructions for backing up and restoring the database in EKS environments.
Backup and Restore of the controller¶
When making backup, ensure that clusters are provisioned and nothing is in-progress. Follow the below steps to restore the current database with a new controller.
To take a snapshot of the current database using the AWS console, go to the Amazon RDS page, select Snapshots from the left menu, then click Take snapshot.
After the snapshot is available, select the snapshot, click Actions at the top, then select Restore snapshot.
On the Restore snapshot page, for DB specifications, select PostgreSQL for the Engine.
- For Availability and durability, leave the default selection.
- For Settings, provide a unique value for DB instance identifier.
- For Connectivity, choose the existing VPC and subnet groups. Set the Public access to Yes if you want to access the database from Internet.
Create a new VPC security group.
For Instance configuration, select Standard classes and select db.m6g.4xlarge.
- For Database authentication, select Password authentication.
- Click Restore DB instance.
- Create a new controller by updating the details of new RDS (Created in step 1) under the RDS variables section of terraform.tfvars. Keep the config variables the same as the old controller configuration, and change everything else except RDS and config variables.
Use the following variables under config variables:
velero-restore = true restore_rds = false most_recent = true
Use the following variables under RDS variables:
create_s3_velero = false
In the main.tf, change the following:
Change the key of S3 bucket
Under RDS module, set Count=0. The RDS module won’t be executed and a new RDS will not be created as you have already created a new RDS and restored it manually.
- Under the RADM application module, configure rds_hostname and rds_port with the name which was specified while restoring the RDS.
- Under the RDS Restore module, configure the db_instance_identifier with an old RDS name.
- Once all the above configurations are done, run