bash script for aurora psql db backup snapshots and export to S3 bucket

0

To generate a bash script to automate the process of creating snapshots of aroura psql database backup and export the same to s3 bucket with aws iam credentials cron job for every 3 hours and hold snapshots for 30 days

1 Risposta
0

You can use EventBridge to schedule a lambda, then use boto3 to take the snapshot directly to S3, like this example to star/stop the instance, just change the stop_db_cluster for create_db_snapshot, like this example:

rds_client.create_db_snapshot(DBSnapshotIdentifier=snapshot_id, DBInstanceIdentifier=instance_id)

Then create a S3 lifecycle policy to expire the files.

AWS
Jorge
con risposta un anno fa

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande