-- To permit log backups, before the full database backup, alter the database
-- to use the full recovery model.
USE master;
GO
ALTER DATABASE ReportServer
SET RECOVERY FULL
-- If the ReportServerData device does not exist yet, create it.
USE master
GO
EXEC sp_addumpdevice 'disk', 'ReportServerData',
'C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\BACKUP\ReportServerData.bak'
-- Create a logical backup device, ReportServerLog.
USE master
GO
EXEC sp_addumpdevice 'disk', 'ReportServerLog',
'C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\BACKUP\ReportServerLog.bak'
-- Back up the full ReportServer database.
BACKUP DATABASE ReportServer
TO ReportServerData
WITH COPY_ALL
-- Back up the ReportServer log.
BACKUP LOG ReportServer
TO ReportServerLog
WITH COPY_ALL
-- To permit log backups, before the full database backup, alter the database
-- to use the full recovery model.
USE master;
GO
ALTER DATABASE ReportServerTempdb
SET RECOVERY FULL
-- If the ReportServerTempDBData device does not exist yet, create it.
USE master
GO
EXEC sp_addumpdevice 'disk', 'ReportServerTempDBData',
'C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\BACKUP\ReportServerTempDBData.bak'
-- Create a logical backup device, ReportServerTempDBLog.
USE master
GO
EXEC sp_addumpdevice 'disk', 'ReportServerTempDBLog',
'C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\BACKUP\ReportServerTempDBLog.bak'
-- Back up the full ReportServerTempDB database.
BACKUP DATABASE ReportServerTempDB
TO ReportServerTempDBData
WITH COPY_ALL
-- Back up the ReportServerTempDB log.
BACKUP LOG ReportServerTempDB
TO ReportServerTempDBLog
WITH COPY_ALL