13H. RDS๋ฅผ ํน์ ์์ ์ผ๋ก ๋ณต๊ตฌํ๊ธฐ
13H. RDS๋ฅผ ํน์ ์์ ์ผ๋ก ๋ณต๊ตฌํ๊ธฐ ๊ด๋ จ

RDS DB ์ธ์คํด์ค๋ฅผ ์์ฑํ ๋ ์๋ ๋ฐฑ์ ์ค์ (Enable Automatic Backups)์ ํ๋ค๋ฉด DB์ ํน์ ์์ ์ RDS DB ์ธ์คํด์ค๋ก ์์ฑํ ์ ์์ต๋๋ค. ์ด๋ฏธ ์๋ DB ์ธ์คํด์ค์ ๋ด์ฉ์ ๋๋๋ฆฌ๋ ๊ฒ์ด ์๋๋ผ ํน์ ์์ ์ ๋ด์ฉ์ DB ์ธ์คํด์ค๋ก ์๋กญ๊ฒ ์์ฑํ๋ ๋ฐฉ์์ ๋๋ค.
๋จผ์ MySQL Workbench๋ก DB์ ๋ด์ฉ์ ์์ ํ ๋ค ์์ ํ๊ธฐ ์ ์ ๋ด์ฉ์ผ๋ก ๋ณต๊ตฌํด๋ณด๊ฒ ์ต๋๋ค (MySQL Workbench ์ฌ์ฉ๋ฒ์ '13.6 RDS DB ์ธ์คํด์ค ์ฌ์ฉํ๊ธฐ'๋ฅผ ์ฐธ์กฐํ๊ธฐ ๋ฐ๋๋๋ค).
MySQL Workbench๋ฅผ ์คํํ๊ณ RDS DB ์ธ์คํด์ค(exampledbinstance
)์ ์ ์ํฉ๋๋ค. ๊ทธ๋ฆฌ๊ณ [ExampleDB]
โ [ExampleTable]
์ ์ ํํ๊ณ ์ค๋ฅธ์ชฝ ๋ง์ฐ์ค ๋ฒํผ์ ํด๋ฆญํ๋ฉด ํ์
๋ฉ๋ด๊ฐ ๋์ต๋๋ค. [Select Rows - Limit 1000]
์ ํด๋ฆญํฉ๋๋ค.

Andrew, LA
๋ฅผ ์ถ๊ฐํ๊ณ [Apply]
๋ฒํผ์ ํด๋ฆญํฉ๋๋ค.RDS DB ์ธ์คํด์ค(exampledbinstance
)์ ExampleTable์ ๋ฐ์ดํฐ ์ถ๊ฐ๊ฐ ์๋ฃ๋์์ต๋๋ค.

RDS DB ์ธ์คํด์ค ๋ชฉ๋ก(Instances)์์ ๋ฐฉ๊ธ DB์ ๋ด์ฉ ์ถ๊ฐํ๋ DB ์ธ์คํด์ค(exampledbinstance
)๋ฅผ ์ ํํ๊ณ ๋ง์ฐ์ค ์ค๋ฅธ์ชฝ ๋ฒํผ์ ํด๋ฆญํ๋ฉด ํ์
๋ฉ๋ด๊ฐ ๋์ต๋๋ค (์์ชฝ Instance Actions ๋ฒํผ์ ํด๋ฆญํด๋ ๊ฐ์ ๋ฉ๋ด๊ฐ ๋์ต๋๋ค).

[Restore to Point in Time]
์ ํด๋ฆญํฉ๋๋ค.ํน์ ์์ ์ผ๋ก DB๋ฅผ ๋ณต๊ตฌํฉ๋๋ค (ํน์ ์์ ์ ๋ด์ฉ์ผ๋ก ์๋ก์ด DB ์ธ์คํด์ค ์์ฑ).
- Use Custom Restore Time: MySQL Workbench์์ ์ ๊ฐ ๋ฐ์ดํฐ๋ฅผ ์ถ๊ฐํ ์๊ฐ์ด 05:13:28์ด๋ฏ๋ก June 21, 2014 05:12:00์ผ๋ก ์ค์ ํ์์ต๋๋ค. ์ด ํญ๋ชฉ์ ๋ฐ์ดํฐ๋ฅผ ์ถ๊ฐํ๊ธฐ ์ด์ ์ ์๊ฐ์ผ๋ก ์ค์ ํด์ผ ํฉ๋๋ค. ๋ ์ง ๋ถ๋ถ์ ํด๋ฆญํ๋ฉด ๋ฌ๋ ฅ์ด ํ์๋์ด ๋ ์ง๋ฅผ ์ ํํ ์ ์์ต๋๋ค.
- Source DB Instance: ์๋ ๋ฐฑ์ ์ ํ๋ DB ์ธ์คํด์ค์ ์ด๋ฆ์ด ํ์๋ฉ๋๋ค. ๋ณต๊ตฌ ์ ์ ๊ผญ ํ์ธํ๊ธฐ ๋ฐ๋๋๋ค.
- DB Instance Identifier: ์๋ ๋ฐฑ์
์ ํน์ ์์ ์ผ๋ก ์๋ก ์์ฑ๋ DB ์ธ์คํด์ค์ ์ด๋ฆ์
๋๋ค.
exampledbinstance3
๋ฅผ ์ ๋ ฅํฉ๋๋ค. - DB Engine: MySQL DB์ ์๋ ๋ฐฑ์ ์ด๋ฏ๋ก ๋ณ๊ฒฝํ ์ ์์ต๋๋ค.
- License Model: MySQL์ General Public License๋ง ์ ํํ ์ ์์ต๋๋ค.
- DB Instance Class: ์์ฑํ DB ์ธ์คํด์ค์ ํด๋์ค์ ๋๋ค. ์๋ ๋ฐฑ์ ์ ํน์ ์์ ์ผ๋ก DB ์ธ์คํด์ค๋ฅผ ์์ฑํ ๋ ์ฑ๋ฅ์ด ๋ ์ข์ ์ธ์คํด์ค ํด๋์ค๋ก ๋ฐ๊ฟ ์ ์์ต๋๋ค. ์ฌ๊ธฐ์๋ db.t1.micro๋ฅผ ์ ํํฉ๋๋ค.
- Multi-AZ Deployment: ์ฅ์ ์ ์๋์ผ๋ก ๋์ฒํ๋ Failover ๊ธฐ๋ฅ์ ์ํ ๋ค์ค ๊ฐ์ฉ ์์ญ(Multi Availability Zone) ๋ณต์ ์ต์ ์ ๋๋ค. No๋ฅผ ์ ํํฉ๋๋ค.
- Auto Minor Version Upgrade: ์๋์ผ๋ก ๋ง์ด๋ ๋ฒ์ ์ ์ ๋ฐ์ดํธํ๋ ์ต์ ์ ๋๋ค. ๋ณด์ ํจ์น๋ ๋ฒ๊ทธ๊ฐ ์์ ๋ ๋ฒ์ ์ ์๋์ผ๋ก ์ ๋ฐ์ดํธํฉ๋๋ค. ์๋ฅผ ๋ค๋ฉด MySQL์ ๊ฒฝ์ฐ 5.6.13์ ์ฌ์ฉํ๊ณ ์๋๋ฐ 5.6.14๊ฐ ๋์ค๋ฉด 5.6.14 ๋ฒ์ ์ผ๋ก ์ ๋ฐ์ดํธํ๊ฒ ๋ฉ๋๋ค. ๊ธฐ๋ณธ๊ฐ ๊ทธ๋๋ก ์ฌ์ฉํฉ๋๋ค.
- Database Port: MySQL ์ ์ ํฌํธ ๋ฒํธ์ ๋๋ค. ๊ธฐ๋ณธ๊ฐ ๊ทธ๋๋ก ์ฌ์ฉํฉ๋๋ค.
- Storage Type: ์คํ ๋ฆฌ์ง ํ์ ์ ๋๋ค. ์๋ ๋ฐฑ์ ์ ํ๋ DB ์ธ์คํด์ค๊ฐ Provisioned IOPS๋ฅผ ์ฌ์ฉํ๋ค๋ฉด ์ฌ๊ธฐ์ Provisioned IOPS๋ฅผ ์ ํํ ์ ์์ต๋๋ค. Standard๋ฅผ ์ ํํ์ฌ ์ผ๋ฐ ์คํ ๋ฆฌ์ง๋ฅผ ์ฌ์ฉํ ์๋ ์์ต๋๋ค. ๊ธฐ๋ณธ๊ฐ ๊ทธ๋๋ก ์ฌ์ฉํฉ๋๋ค.
- VPC: DB ์ธ์คํด์ค๊ฐ ์์นํ ๋คํธ์ํฌ(VPC)์ ๋๋ค. ๊ธฐ๋ณธ๊ฐ ๊ทธ๋๋ก ์ฌ์ฉํฉ๋๋ค.
- DB Subnet Group: DB ์ธ์คํด์ค๊ฐ ์์นํ ์๋ธ๋ท์ ๋๋ค. ์์์ Default VPC์ด์ธ์ VPC๋ฅผ ์ ํํ์ ๋ ์ด ์๋ธ๋ท์ ์ค์ ํ ์ ์์ต๋๋ค. ๊ธฐ๋ณธ๊ฐ ๊ทธ๋๋ก ์ฌ์ฉํฉ๋๋ค.
- Publicly Accessible: DB๋ฅผ ์ธ๋ถ์์ ์ ๊ทผํ ์ ์๊ฒ ํ๋ ์ต์ ์ ๋๋ค. No๋ก ์ค์ ํ๋ฉด VPC ๋ด๋ถ์์๋ง ์ ๊ทผํ ์ ์์ต๋๋ค. ๊ธฐ๋ณธ๊ฐ ๊ทธ๋๋ก ์ฌ์ฉํฉ๋๋ค.
- Availability Zone: DB ์ธ์คํด์ค๊ฐ ์์ฑ๋ ๊ฐ์ฉ ์์ญ(Availability Zone)์ ๋๋ค. ์๋ ๋ฐฑ์ ์ ํ๋ DB ์ธ์คํด์ค์ AZ๊ฐ ๊ธฐ๋ณธ์ ์ผ๋ก ์ ํ๋ฉ๋๋ค. ๊ธฐ๋ณธ๊ฐ ๊ทธ๋๋ก ์ฌ์ฉํฉ๋๋ค.
- Option Group: DB ์ต์ ์ ๋๋ค. MySQL์ ํน๋ณํ ์ง์ ํ์ง ์์๋ ๋ฉ๋๋ค. ๊ธฐ๋ณธ๊ฐ ๊ทธ๋๋ก ์ฌ์ฉํฉ๋๋ค.

[Launch DB Instance]
๋ฒํผ์ ํด๋ฆญํฉ๋๋ค.RDS DB ์ธ์คํด์ค ๋ชฉ๋ก(Instances)์์ ์๋ ๋ฐฑ์
์ ํน์ ์์ ์ผ๋ก DB ์ธ์คํด์ค(exampledbinstance3
)๊ฐ ์์ฑ๋๊ณ ์์ต๋๋ค. ์์ ํ ์์ฑ๋๊ธฐ๊น์ง ์ฝ 10~15๋ถ ์ ๋ ์์๋ฉ๋๋ค(DB์ ์ฉ๋์ ๋ฐ๋ผ ์๊ฐ์ ๋ฌ๋ผ์ง ์ ์์ต๋๋ค).

exampledbinstance3
)๊ฐ ์์ ํ ์์ฑ๋ ํ ์ธ๋ถ ๋ด์ฉ์ ์๋ํฌ์ธํธ ์ฃผ์๊ฐ ํ์๋ฉ๋๋ค. ์ ๊ฐ ์์ฑํ DB ์ธ์คํด์ค์ ์๋ํฌ์ธํธ ์ฃผ์๋ exampledbinstance3.cnlconsezo7y.ap-northeast-1.rds.amazonaws.com:3306
์
๋๋ค.์์ฑํ DB ์ธ์คํด์ค(exampledbinstance3
)์ ์ ์ํ๋ ค๋ฉด Security Group์ ์ค์ ํด์ค์ผ ํฉ๋๋ค. '13.5 RDS DB ์ธ์คํด์ค Security Group ์์ฑ ๋ฐ ์ค์ ํ๊ธฐ'๋ฅผ ์ฐธ์กฐํ์ฌ Security Group์ ์ค์ ํ๊ธฐ ๋ฐ๋๋๋ค.

exampledbinstance3
)์ ์ ์ํด๋ณด๋ฉด ExampleTable์ Andrew, LA
๋ฅผ ์ถ๊ฐํ๊ธฐ ์ ์ ๋ฐ์ดํฐ๋ฅผ ํ์ธํ ์ ์์ต๋๋ค.์ด์ฒ๋ผ ์๋ ๋ฐฑ์ ์ ํน์ ์์ ์ RDS DB ์ธ์คํด์ค๋ก ๋ณต๊ตฌํ ์ ์์ต๋๋ค.