- Newest
- Most votes
- Most comments
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:
-
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.
-
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.
-
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).
-
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
Relevant content
- asked a year ago
- asked 2 months ago
- asked a year ago
- AWS OFFICIALUpdated 3 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 4 years ago
- AWS OFFICIALUpdated 2 years ago
I'm using mysql 8.x