Вопрос

I want to restore mysql rds snapshot with my custom parameter group. does any one know, how can I do this? Recently fist I have to restore snapshot to new Instance, then edit/change it with security group and parameter group and then restart instance. this is very long and time taking process. on "Restore DB Instance" page, there is no option for "Security Group", "Parameter Group" and "Password". One more options should be there for restoring snapshot on existing instance or specific database or specific table restore?

Это было полезно?

Решение

No, there is no way to restore a snapshot with custom security groups and custom parameter group. When you restore a snapshot, default security group and parameter groups are applied. Then you to modify the cluster to apply your customer security group and parameter group.

From Restoring From a DB Snapshot:

When you restore a DB instance, only the default DB parameter and security groups are applied. If you need to associate a custom DB parameter or security group to the DB instance, you must apply them explicitly using the RDS console's Modify command, the ModifyDBInstance API, or the rds-modify-db-instance command line tool, once the DB instance is available. The option group associated with the DB snapshot is associated with the restored DB instance once it is created.

So, this is 2 step procedure.

Другие советы

These days, you can select both a security group and a parameter group when you restore an RDS snapshot.

In the console:

Select a security group

Select a parameter group

Or with CLI options:

aws rds restore-db-instance-from-db-snapshot \
    --db-instance-identifier db7-new-instance \
    --db-snapshot-identifier db7-test-snapshot \
    --db-instance-class db.t3.small \
    --vpc-security-group-ids "sg-123" "sg-456" \
    --db-parameter-group-name MyParameterGroup
Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top