Purpose
This table contains server-level backup settings. Specifically, each row represents a backup scenario as defined by the database type, backup type, day, begin and end time, and maximum number of backups per timeframe. The backup job (MinionBackup-AUTO) runs regularly in conjunction with this table to provide a wide range of backup options, all without introducing additional jobs.
In addition, you can enable settings synchronization, and/or log synchronization, for any or all of the backup scenarios. (So for example, Minion Backup can synchronize settings and logs with the weekly full backups.)
For more information, see the “About: Backup Schedules” section.
Minion.BackupSettingsServer ships with a full set of schedules in place.
Column Name | Data Type | Definition |
ID | Int | Primary key row identifier. |
DBType | varchar | Database type. Valid values: User, System |
BackupType | varchar | Backup type. Valid inputs: Full, Diff, Log |
Day | Varchar | The day or days to which the settings apply. Valid inputs: Daily, Weekday, Weekend, [an individual day, e.g., Sunday], FirstOfMonth, LastOfMonth, FirstOfYear, LastOfYear Note: Note that the least frequent “Day” settings – FirstOfYear, LastOfYear, FirstOfMonth, LastOfMonth – only apply to user databases, not to system databases. |
CertName | varchar | Certificate name. |
ReadOnly | tinyint | Backup readonly option; this decides whether or not to include ReadOnly databases in the backup, or to perform backups on only ReadOnly databases. A value of 1 includes ReadOnly databases; 2 excludes ReadOnly databases; and 3 only includes ReadOnly databases. Valid values: 1, 2, 3 |
BeginTime | varchar | The start time at which this schedule applies. IMPORTANT: Must be in the format hh:mm:ss, or hh:mm:ss:mmm (where mmm is milliseconds), on a 24 hour clock. This means that both ’00:00:00’ and ’08:15:00:000’ are valid times, but ‘8:15:00:000’ is not (because single digit hours must have a leading 0). |
EndTime | varchar | The end time at which this schedule applies. IMPORTANT: Must be in the format hh:mm:ss, or hh:mm:ss:mmm (where mmm is milliseconds), on a 24 hour clock. This means that both ’00:00:00’ and ’08:15:00:000’ are valid times, but ‘8:15:00:000’ is not (because single digit hours must have a leading 0). |
MaxForTimeframe | int | Maximum number of iterations within the specified timeframe (BeginTime to EndTime). For more information, see “Table based scheduling” in the “Quick Start” section. |
CurrentNumBackups | Int | Count of backup attempts for the particular DBType, BackupType, and Day, for the current timeframe (BeginTime to EndTime) |
NumConcurrentBackups | tinyint | For future use. |
LastRunDateTime | datetime | The last time a backup ran that applied to this particular scenario (DBType, BackupType, Day, and timeframe). |
Include | varchar | The value to pass into the @Include parameter of the Minion.BackupMaster job; in other words, the databases to include in this attempt. This may be left NULL (meaning “all databases”). |
Exclude | varchar | The value to pass into the @Exclude parameter of the Minion.BackupMaster job; in other words, the databases to exclude from this attempt. This may be left NULL (meaning “no exclusions”). |
SyncSettings | bit | Whether or not to perform a synchronization of settings tables during this particular run. For more information, see “How to: Synchronize backup settings and logs among instances”. |
SyncLogs | bit | Whether or not to perform a synchronization of log tables during this particular run. For more information, see “How to: Synchronize backup settings and logs among instances”. |
BatchPreCode | varchar | Precode to run before the entire backup operation. |
BatchPostCode | varchar | Precode to run after the entire backup operation. |
IsActive | Bit | Whether the current row is valid (active), and should be used in the Minion Backup process. |
Comment | varchar | For your reference only. You can label each row with a short description and/or purpose. |
Example 1: Weekly full, daily differential, hourly log backups
We could use this table to define the following backup time scenarios:
- Full system backups on Sunday, one time between 6pm and 7pm.
- Full user backups on Sunday, one time between 8pm and 9pm.
- Differential backups on every other day (Monday-Saturday), one time each between 8pm and 9pm.
- Log backups hourly (except when differential or full backups are running).
To do this, we would set the MinionBackup-AUTO backup job to run once hourly, and define the following rows. (Note that some of the table columns are omitted, for presentation purposes.)
ID | DBType | BackupType | Day | ReadOnly | BeginTime | EndTime | MaxForTimeframe |
5 | System | Full | Sunday | 1 | 18:00:00 | 19:00:00 | 1 |
6 | User | Full | Sunday | 1 | 20:00:00 | 21:00:00 | 1 |
7 | User | Diff | Weekday | 1 | 20:00:00 | 21:00:00 | 1 |
8 | User | Diff | Saturday | 1 | 20:00:00 | 21:00:00 | 1 |
9 | User | Log | Sunday | 1 | 00:00:00 | 23:59:59 | 24 |
We do not have to specifically time the log backups to avoid the 8pm differential and full backup windows; because both differential and full backups take precedence over log backups. So when the 8pm job begins, it will see the differential or full backup slated, and discard the log backup for that hour. In other words, the job run history would look like this:
- Sunday 7pm – user log backup, system full backup
- Sunday 8pm – user full backup
- Sunday 9pm – user log backup
- Continuing hourly log backups…
- Monday 7pm – user log backup
- Monday 8pm – user diff backups
- Etc...
Example 2: Daily full, differential every 4 hours, log backups every 15 minutes
We could use this table to define the following backup time scenarios:
- Full system backups daily, one time between 9pm and 9:30pm.
- Full user backups daily, one time between 10pm and 10:30pm.
- Differential backups every 4 hours (except when full backups are running), starting at 2:00am.
- Log backups every 15 minutes (except when differential or full backups are running).
To do this, we would set the MinionBackup-AUTO backup job to run every 15 minutes, and define the following rows. (Note that some of the table columns are omitted, for presentation purposes.)
ID | DBType | BackupType | Day | ReadOnly | BeginTime | EndTime | MaxForTimeframe |
5 | System | Full | Daily | 1 | 21:00:00 | 21:30:00 | 1 |
6 | User | Full | Daily | 1 | 22:00:00 | 22:30:00 | 1 |
7 | User | Diff | Daily | 1 | 02:00:00 | 02:30:00 | 1 |
8 | User | Diff | Daily | 1 | 06:00:00 | 06:30:00 | 1 |
9 | User | Diff | Daily | 1 | 10:00:00 | 10:30:00 | 1 |
10 | User | Diff | Daily | 1 | 14:00:00 | 14:30:00 | 1 |
11 | User | Diff | Daily | 1 | 18:00:00 | 18:30:00 | 1 |
12 | User | Log | Daily | 1 | 00:00:00 | 23:59:59 | 96 |
In short, we need one row each for:
- full daily system backups
- full daily user backups
- full log backups (these run every 15 minutes)
And additionally, one row per each differential backup timeframe (2am, 6am, 10am, 2pm, and 6pm). We don’t take a differential at 10pm, of course, because that is when the full backup will run.
Note: The 10pm user log backups will be replaced by the 10pm user full backups.