How To

How to back up files and filegroups (Transact-SQL)

To back up files and filegroups

Examples

This example performs a backup operation with files and filegroups for the MyNwind database.

-- Back up the MyNwind file(s) and filegroup(s)
BACKUP DATABASE MyNwind
   FILE = 'MyNwind_data_1',
   FILEGROUP = 'new_customers',
   FILE = 'MyNwind_data_2', 
   FILEGROUP = 'first_qtr_sales'
   TO MyNwind_1
GO

See Also

BACKUP

File and Filegroup Backup and Restore