SQL Backup 9

File location tags

SQL Backup Pro enables you to set up file locations that are automatically generated when the backup is created, by using tags. For example, you can use tags to include the date and time of creation of a backup in its file name:

C:\Backups\<DATETIME yyyymmdd_hhnnss>_Backup.sqb

Tags are particularly useful when you are backing up multiple databases in one operation. For example, you could specify that the backup files for each database are to be created in a separate folder using the <DATABASE> tag in the path:

C:\Backups\<DATABASE>\Backup.sqb

You can use the following tags in paths and file names:

<TYPE>

The backup type. SQL Backup Pro will use the following values:

  • FULL for full backups
  • DIFF for differential backups
  • LOG for transaction log backups
  • FILE for filegroup or file backups
<SERVER>The SQL Server name.
<CLUSTER>The name of the cluster or SERVER> if NOT on a clustered instance
<INSTANCE>The SQL Server instance name.

< AVAILABILITYGROUP >

                                           

The name of the availability group or <INSTANCE> if NOT on a clustered instance.
<DATABASE>The database name.
<DATETIME x>The date and time value of the backup process, where x is a format string. The values that you can use in the format string are listed below, under Date and time format. Note that you can use only many DATETIME tags in the default name.
<AUTO>

If you specify <AUTO>, SQL Backup Pro uses the backup file location options (see File management options) to generate the backup file path and file name. If no backup location options have been set up, SQL Backup Pro uses the SQL Server instance's default backup folder, and the default format for file names.

If you specify a path and <AUTO> (for example C:\MyBackups\<AUTO>), SQL Backup Pro uses the specified path, and generates the file name using the Backup Location options. If no backup location options have been set up, SQL Backup Pro uses the default format for file names.

If you specify <AUTO> with a file extension (for example <AUTO>.sqb, SQL Backup Pro uses the Backup Location options to generate the backup file path and file name. If no backup settings have been set up, SQL Backup Pro uses the SQL Server instance's default backup folder, and the default format for file names. This is useful when you generate split backup files.

If you specify a format that may result in identical file names (for example, by not specifying a <DATETIME> tag), the backups will fail if you have not chosen to overwrite the backup files. For more information about overwriting backup files, see Creating backups: file settings and Scheduling backups: file settings.

Date and time format

You can use the following formats for string x in the <DATETIME x> tag.

dDisplays the day as a number without a leading zero (1-31).
ddDisplays the day as a number with a leading zero (01-31).
dddDisplays the day as an abbreviation (Sun-Sat) using the strings given by the ShortDayNames global variable.
ddddDisplays the day as a full name (Sunday-Saturday) using the strings given by the LongDayNames global variable.
dddddDisplays the date using the format given by the ShortDateFormat global variable.
ddddddDisplays the date using the format given by the LongDateFormat global variable.
mDisplays the month as a number without a leading zero (1-12). If the m specifier immediately follows an h or hh specifier, the minute rather than the month is displayed.
mmDisplays the month as a number with a leading zero (01-12). If the mm specifier immediately follows an h or hh specifier, the minute rather than the month is displayed.
mmmDisplays the month as an abbreviation (Jan-Dec) using the strings given by the ShortMonthNames global variable.
mmmmDisplays the month as a full name (January-December) using the strings given by the LongMonthNames global variable.
yyDisplays the year as a two-digit number (00-99).
yyyyDisplays the year as a four-digit number (0000-9999).
hDisplays the hour without a leading zero (0-23).
hhDisplays the hour with a leading zero (00-23).
nDisplays the minute without a leading zero (0-59).
nnDisplays the minute with a leading zero (00-59).
sDisplays the second without a leading zero (0-59).
ssDisplays the second with a leading zero (00-59).

Didn't find what you were looking for?