Backing up databases
Creating backups is the most important task in database administration. Backups allow you to retrieve your data when a server is down, or when configurations, data files, etc. are lost.
Use the DatabaseBackup script to make the following backups:
- A full backup of SYSTEM_DATABASES databases to be scheduled once a day.
EXECUTE [dbo].[DatabaseBackup]
@Databases = 'SYSTEM_DATABASES',
@Directory = NULL,
@BackupType = 'FULL',
@Verify = 'Y',
@CleanupTime = NULL,
@CheckSum = 'Y',
@LogToTable = 'Y'
- A full backup of USER_DATABASES databases, to be scheduled once a day.
EXECUTE [dbo].[DatabaseBackup]
@Databases = 'USER_DATABASES',
@Directory = NULL,
@BackupType = 'FULL',
@Verify = 'Y',
@CleanupTime = NULL,
@CheckSum = 'Y',
@LogToTable = 'Y'
- A backup of USER_DATABASES database logs, to be scheduled frequently several times per day: every 15 minutes, 30 minutes or hour.
EXECUTE [dbo].[DatabaseBackup]
@Databases = 'USER_DATABASES',
@Directory = NULL,
@BackupType = 'LOG',
@Verify = 'Y',
@CleanupTime = NULL,
@CheckSum = 'Y',
@LogToTable = 'Y'