Diff Backup Restore
--Make sure the database is using the simple recovery model.
ALTER DATABASE ten SET RECOVERY SIMPLE;
GO
-- Back up the full AdventureWorks2008R2 database.
BACKUP DATABASE AdventureWorks2008R2 TO DISK = 'D:\Websites\DB Backup\Ten\ AdventureWorks2008R2.bak'
WITH FORMAT;
GO
--Create a differential database backup.
BACKUP DATABASE AdventureWorks2008R2 TO DISK = 'D:\Websites\DB Backup\Ten\ AdventureWorks2008R2.bak'
WITH DIFFERENTIAL;
GO
--Restore the full database backup (from backup set 1).
RESTORE DATABASE TEN FROM DISK = 'D:\Websites\DB Backup\Tenx\65838_ Ten_25APR2013_23_04_54_ FULL.bak'
WITH FILE=1, NORECOVERY;
--Restore the differential backup (from backup set 2).
RESTORE DATABASE TEN FROM DISK = 'D:\Websites\DB Backup\Tenx\65926_ Ten_26APR2013_10_42_13_ DIFF.bak'
WITH FILE=1, RECOVERY;
GO
Comments
Post a Comment