How to do it...

Follow these steps to restore an RDS snapshot:

  1. Type the following command:
      aws rds restore-db-instance-from-db-snapshot 
--db-snapshot-identifier <name-of-snapshot-to-restore >
--db-instance-identifier <name-for-new-db>
--db-subnet-group-name <your-db-subnet-group>
--multi-az
  1. You may have noticed that this command creates a new database in the default security group. This happens because restore-db-instance-from-db-snapshot doesn't accept a security group ID as a parameter. You'll have to run a second command to assign a non-default security group to the new database:
      aws rds modify-db-instance 
--db-instance-identifier <name-of-newly-restored-db>
--vpc-security-group-ids <id-of-security-group>
The modify-db-instance command will return an error unless the state of the target database is available.

Also, security group names aren't valid with this command; you'll need to use a security group ID instead, for example, sg-7603d50a.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset