|
As a standard
you can implement the following file extension naming convention for
Microsoft SQL Server database backup files:
/* File extensions for SQL Server backups
Full Database Backup - *.bak
Transaction Log Backup - *.trn
Differential Backup - *.dif
Filegroup Backup - *.fil
*/
NOTE: file extension or filename extension are frequently misspelled as extention.
-- SQL Server full database backup basic syntax
BACKUP DATABASE [AdventureWorks] TO DISK = N'F:\data\backup\AW.bak'
GO
-- SQL Server full database backup with options
BACKUP DATABASE [AdventureWorks] TO DISK = N'F:\data\backup\AW.bak'
WITH NOFORMAT, NOINIT, NAME = N'AdventureWorks-Full Database Backup',
SKIP, NOREWIND, NOUNLOAD, STATS = 10
GO
------------
-- SQL Server transaction log backup
BACKUP LOG [AdventureWorks] TO DISK = N'F:\data\backup\AW_20120201_1430.trn'
GO
------------
-- SQL Server differential backup
BACKUP DATABASE [AdventureWorks] TO DISK = N'F:\data\backup\AW.dif'
WITH DIFFERENTIAL
GO
------------
Related article:
SQL Server 2000 Backup and Restore
|