Review NIFCLOUD RDB backup retention

Keep backups long enough to detect problems and recover.

Description

Choose an RDB backup retention period long enough to discover a bad change and restore an earlier backup. backup_retention_period = 0 disables automatic backups.

Potential impact

If the last good backup has expired, you may be unable to recover data from before the change.

Remediation

Set backup_retention_period to a value your engine supports. If policy requires at least seven days, use seven or more. Check that backups complete and that you can restore one from the required period.

Examples

The first excerpt omits retention. Check the effective value on the instance. The second explicitly retains automatic backups for seven days.

Before

hcl
resource "nifcloud_db_instance" "example" {
  identifier     = "example"
  instance_class = "db.large8"
}

After

hcl
resource "nifcloud_db_instance" "example" {
  identifier              = "example"
  instance_class          = "db.large8"
  backup_retention_period = 7
}

References