티스토리 뷰

AWS

RDS 백업과 복원

세이브 2021. 9. 15. 18:08

 

RDS 백업에 대해 알아보기 전에  먼저 백업이 무엇인지 알아보겠습니다.

 

백업이란 데이터를 안전한 곳에 보관해두는 유지보수 방법을 말합니다. 백업의 핵심은 백업 자체가 아니라 복원이므로,

복원 방법을 정확하게 숙지하고 백업해야 합니다. 

 

 

RDS는 1) 자동 데이터베이스 백업(Automated Database Backup)과 2) 수동 데이터베이스 스냅샷(Manual Database Snapshot)이라는 두 가지 백업 기능을 기본적으로 제공합니다. (줄여서 자동백업과 스냅샵이라고 명명하겠습니다.)

백업한 자료는 백업 스토리지(Amazon S3)에 저장됩니다. 

 

AWS 공식문서  - RDS 백업 설명

" Amazon RDS creates and saves automated backups of your DB instance during the backup window of your DB instance .  RDS creates a storage volume snapshot of your DB instance, backing up the entire DB instance and not just individual databases."

 

 

 

1) 자동 백업

- 사용자가 설정한 백업 기간에 AWS 자동으로 백업을 수행하는 기능을 말합니다.

- 매일매일 백업이 이루어지며, 기본 보존 기간은 CLI로 생성시 1일 , 콘솔로 생성시 7일이고 , 최저 1일부터 35일까지 가능합니다

- 자동 백업 기간 중 백업 프로세스가 시작되면 스토리지 I/O가 일시적으로 중단 될 수 있습니다.

 

- AWS 공식문서  자동 백업 설명 

 "RDS saves the automated backups of your DB instance according to the backup retention period that you specify. If necessary, you can recover your database to any point in time during the backup retention period." 

 

 

2) 수동 스냅샷

- 사용자가 직접 백업하는 방법

- 리전당 최대 100개까지 보유 가능하다

- 보관기간에 제한이 없다

 

- AWS 공식문서  스탭샷 설명

"You can also back up your DB instance manually, by manually creating a DB snapshot."

 

" Creating this DB snapshot on a Single-AZ DB instance results in a brief I/O suspension that can last from a few seconds to a few minutes, depending on the size and class of your DB instance. For MariaDB, MySQL, Oracle, and PostgreSQL, I/O activity is not suspended on your primary during backup for Multi-AZ deployments" because the backup is taken from the standby. For SQL Server, I/O activity is suspended briefly during backup for Multi-AZ deployments."




스냅샷을 활용한 백업

actions 메뉴 중 Take snapshot을 선택해줍니다.

 

그 다음에는 snapshot의 이름을 정해주고 take snapshot 버튼을 눌러줍니다.

 

 

 

스냅샷을 복원하는 방법

 Actions 바에서 Restore snapshot 클릭

기존의 데이터베이스를 가지고 있던 스냅샷으로 교체하는 것이 아니라, 새로운 인스턴스를 생성합니다.

 

 


(자동 백업된) 특정 시점으로 복원

스냅샷을 사용한 복원과 마찬가지로  특정 시점으로 RDS로 되돌리는 것이 아니라 특정 시점의 인스턴스를 생성합니다.

 

 

custom을 선택해서 ,원하는 날짜로 설정해줄 수 있다

 

 

 

 

 

 

<참고>
ckahttps://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_WorkingWithAutomatedBackups.html

 

'AWS' 카테고리의 다른 글

RDS Replication  (0) 2021.09.15
ELB (Elastic Load Balancing)  (0) 2021.09.15
나는 왜 RDS를 쓰는가  (0) 2021.09.03
VPC(Virtual Private Cloud)  (0) 2021.09.02
S3(Simple Storage Service)  (0) 2021.09.02
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
TAG
more
«   2025/05   »
1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31
글 보관함