

# RDS Custom for SQL Server DB 스냅샷에서 복원
<a name="custom-backup-sqlserver.restoring"></a>

RDS Custom for SQL Server DB 인스턴스를 복원하는 경우 DB 스냅샷의 이름과 새로운 인스턴스의 이름을 입력합니다. 스냅샷에서 기존 RDS Custom DB 인스턴스로 복원할 수 없습니다. 복원 시 새로운 RDS Custom for SQL Server DB 인스턴스가 생성됩니다.

스냅샷에서 복원하면 스토리지 볼륨이 스냅샷을 생성한 시점으로 복원됩니다. 여기에는 `(D:)` 볼륨에 있던 모든 데이터베이스와 기타 파일이 포함됩니다.

## 콘솔
<a name="custom-backup-sqlserver.restoring.console"></a>

**DB 스냅샷에서 RDS Custom DB 인스턴스를 복원하는 방법**

1. AWS Management Console에 로그인한 후 [https://console.aws.amazon.com/rds/](https://console.aws.amazon.com/rds/)에서 Amazon RDS 콘솔을 엽니다.

1. 탐색 창에서 [**Snapshots**]를 선택합니다.

1. 복원 원본으로 사용할 DB 스냅샷을 선택합니다.

1. **작업**에서 **스냅샷 복원**을 선택합니다.

1. **DB 인스턴스 복원(Restore DB instance)** 페이지의 **DB 인스턴스 식별자(DB instance identifier)**에 복원된 RDS Custom DB 인스턴스의 이름을 입력합니다.

1. **DB 인스턴스 복원**을 선택합니다.

## AWS CLI
<a name="custom-backup-sqlserver.restoring.CLI"></a>

[ restore-db-instance-from-db-snapshot](https://docs.aws.amazon.com/cli/latest/reference/rds/restore-db-instance-from-db-snapshot.html) AWS CLI 명령을 사용하여 RDS Custom DB 스냅샷을 복원합니다.

복원하려는 스냅샷이 프라이빗 DB 인스턴스용인 경우 `db-subnet-group-name` 및 `no-publicly-accessible`을 모두 올바르게 지정해야 합니다. 그렇지 않으면 DB 인스턴스의 기본값에 공개적으로 액세스할 수 있게 됩니다. 다음 옵션이 필요합니다.
+ `db-snapshot-identifier` - 복구할 스냅샷을 식별합니다.
+ `db-instance-identifier` - DB 스냅샷에서 생성할 RDS Custom DB 인스턴스의 이름을 지정합니다.
+ `custom-iam-instance-profile` - RDS Custom for Oracle DB 인스턴스의 기본 Amazon EC2 인스턴스와 연결된 인스턴스 프로필을 지정합니다.

다음 코드는 `my-custom-instance`에 대한 `my-custom-snapshot`이라는 스냅샷을 복원합니다.

**Example**  
대상 LinuxmacOS, 또는Unix:  

```
aws rds restore-db-instance-from-db-snapshot \
  --db-snapshot-identifier my-custom-snapshot \
  --db-instance-identifier my-custom-instance \
  --custom-iam-instance-profile AWSRDSCustomInstanceProfileForRdsCustomInstance \
  --no-publicly-accessible
```
Windows의 경우:  

```
aws rds restore-db-instance-from-db-snapshot ^
  --db-snapshot-identifier my-custom-snapshot ^
  --db-instance-identifier my-custom-instance ^
  --custom-iam-instance-profile AWSRDSCustomInstanceProfileForRdsCustomInstance ^
  --no-publicly-accessible
```