I have set Backup Retention Period 3 days but database show 30 days

0

I have set Backup Retention Period to 3 days, but the database (binlog_expire_logs_seconds) shows 30 days, so what I need to do? I don't have a technical support plan

I'm using MySQL 8.x

1 Answer
0

It appears there's a discrepancy between your intended backup retention period and what's actually configured in your database. This situation can occur due to differences in how AWS RDS manages backups and how the database engine itself handles log retention.

For RDS instances, the backup retention period you set (in this case, 3 days) applies to the automated backups managed by AWS. However, the database parameter 'binlog_expire_logs_seconds' is specific to the database engine and controls how long binary logs are kept.

To address this issue:

  1. For the AWS RDS backup retention period:

    • Verify in the RDS console that the backup retention period is indeed set to 3 days.
    • If it's not, you can modify this setting in the RDS instance configuration.
  2. For the database binary log retention (binlog_expire_logs_seconds):

    • This parameter is set to 30 days (2592000 seconds) by default in some database versions.
    • To change this, you'll need to modify the parameter group associated with your RDS instance.
    • Set 'binlog_expire_logs_seconds' to 259200 (3 days in seconds) to match your desired 3-day retention period.
  3. If you're using MariaDB 10.11 or later, note that 'expire_logs_days' has been deprecated. Instead, you should use a stored procedure to set the binary log retention:

    • Connect to your database and run: CALL mysql.rds_set_configuration('binlog retention hours', 72); This sets the retention to 72 hours (3 days).
  4. After making changes, you may need to reboot your RDS instance for the new settings to take effect.

If you encounter any issues while making these changes, even without a technical support plan, you can still use AWS re:Post to ask for community assistance or consult the AWS documentation for further guidance.
Sources
expire_logs_days does not exists in MariaDB 10.11 Parameter group | AWS re:Post
RDS Retention Period not working | AWS re:Post

profile picture
answered 3 days ago
  • I'm using mysql 8.x

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