Computer Science/Database

W3Schools SQL | #39 SQL BACKUP DATABASE - SQL SERVER 데이터베이스 백업

토마토. 2022. 10. 29. 10:28

SQL BACKUP DATABASE for SQL Server

The SQL BACKUP DATABASE Statement

SQL 데이터베이스에서 전체 백업을 만드는 명령어

Syntax

BACKUP DATABASE databasename
TO DISK = 'filepath';

The SQL BACKUP WITH DIFFERENTIAL Statement

변경된 부분만 백업하는 명령어

BACKUP DATABASE databasename
TO DISK = 'filepath'
WITH DIFFERENTIAL;

BACKUP DATABASE example

BACKUP DATABASE testDB
TO DIST = 'D:\backups\testDB.bak';

BACKUP WITH DIFFERENTIAL Example

BACKUP DATABASE testDB
TO DIST = 'D:\backups\testDB.bak'
WITH DIFFERENTIAL;