By using AWS re:Post, you agree to the Terms of Use

Using AWS backup service for DB backup

0

Hi,

My question is regarding the execution of backup job in AWS backup service. Description of the use case: We have lots of DBs from different kind on EC2 (Oracle, PostgreSQL, MySQL) + PostgreSQL RDS and Aurora cluster. To backup the DB we currently use EBS snapshots, we have a bash script that:

• put the DB into backup mode

• create snapshots on 2 EBS that contains the data and redo/wal files

• end backup mode

• delete old archives and snapshots according to retention policy.

For RDS/Aurora we have a script to create snapshot, and delete old ones

In both cases the backups are executed several times per day and it can also be triggered on demand from our tools.

We want to check the option to use AWS backup service to replace the EBS/RDS snapshots creation, mainly to simplify the copy of the snapshots to DR account. I have read the documentation about the service and my questions are:

  1. What would be the suitable solution in AWS backup for our use case?
  2. Can we call a backup job from our script using cli and make sure the job will be executed immediately?
  3. In our use case, do we need to create a job per DB or there is an option to create something generic to all but still have flexibility to trigger the backup from the script?

Thanks, Eldad

asked 2 months ago74 views
1 Answer
0
  1. What would be the suitable solution in AWS backup for our use case? -> AWS Backup will completely fit your use case. You can add a particular tag (key-value pairs) to your RDS and EBS resources.

  2. Can we call a backup job from our script using CLI and make sure the job will be executed immediately? -> There is no difference between the backup job executed by the backup plan or on-demand backup using CLI. The backup job will be in running state with start within the window mentioned in the backup plan or CLI command. [+] https://docs.aws.amazon.com/cli/latest/reference/backup/start-backup-job.html

  3. In our use case, do we need to create a job per DB or there is an option to create something generic to all but still have flexibility to trigger the backup from the script? -> You can create a single backup plan for all the RDS and EBS resources with tag based selection and associate same tag to each resource if the retention, start time, backup vault is same. You can also create different backup plan if the start time, backup vault, retention or tags associated with resources are different.

-> So, the reason you should switch from script to AWS backup is that this will eliminate the use of scripts, and it's maintenance + there is no extra charge for AWS backup service as you pay for snapshot, and you have benefits of AWS backup like Vault lock, backup protection etc. [+] https://docs.aws.amazon.com/aws-backup/latest/devguide/whatisbackup.html#features-for-all-resources

answered a month ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions