T-SQL Tutorial

Backup partial database - TSQL Tutorial


The following example backup partial the model database to a disk file.

BACKUP DATABASE Syntax:

BACKUP DATABASE { database_name }
READ_WRITE_FILEGROUPS [ , [ ,...n ] ]
TO backup_device [ ,...n ]
[ MIRROR TO clause ]
[ WITH { DIFFERENTIAL | [ ,...n ] } ];

Backup partial backup example:

BACKUP DATABASE model READ_WRITE_FILEGROUPS
TO DISK = 'E:\SQLServerBackup\model_partial.bak'
GO

Messages:
Processed 328 pages for database 'model', file 'modeldev' on file 1.
Processed 2 pages for database 'model', file 'modellog' on file 1.
BACKUP DATABASE...FILE=name successfully processed 330 pages in 0.325 seconds (7.910 MB/sec).

Backup partial backup with differential example:

BACKUP DATABASE model READ_WRITE_FILEGROUPS
TO DISK = 'E:\SQLServerBackup\model_partial.dif'
WITH DIFFERENTIAL
GO

Messages:
Processed 40 pages for database 'model', file 'modeldev' on file 1.
Processed 2 pages for database 'model', file 'modellog' on file 1.
BACKUP DATABASE...FILE=name WITH DIFFERENTIAL successfully processed 42 pages in 0.147 seconds (2.182 MB/sec).