For the log backup, you log on to Database Manager CLI as a DBM operator, connect to the database for which the backup template is to be created, and define a backup template of type File.
You can use the backup template for automatic and for interactive log backup and you can define either LOG or AUTO as the backup type. The database system processes automatic and interactive log backups in exactly the same way both for backing up and restoring.
You can define where you want to store this file in the system. If you enter a relative path, it is interpreted as relative to the working directory of the database. The specified directory must already exist. If you enter a path that includes blank characters, these must be written in quotation marks in the DBM command. The leading quotation mark must be preceded by a backslash (\).
Database Manager stores the backup template internally. The file that contains the backup only becomes visible in the system when the backup template is used for a backup.
Note
The system numbers the files sequentially if they are used for a log backup. After backing up the log area using the backup template <file_name>, you could therefore find one or more file(s) with the file name <file_name>.<running_number> on your hard disk.
You want to define a backup template with the following properties for log backup to a file:
Name of backup template: DemoFileLog
Data carrier (device/file): Backups 2005\Data\logBackup
Type: FILE
Backup type: AUTO(automatic log backups)
Size restriction: 0 (none)
You can find the prerequisites under Database Manager CLI, medium_put
Call Database Manager CLI, log on as DBM operator OLEG with password MONDAY, connect to database DEMODB, and create a backup template with the properties specified in the scenario:
>dbmcli -u OLEG,MONDAY -d DEMODB medium_put DemoFileLog "Backups 2005\Data\logBackup" FILE AUTO 0
OK
You have created backup template DemoFileLog for database DEMODB.
If you have already made a complete backup of DEMODB, you can now execute a log backup to a file or activate the automatic log backup function.
Activating Automatic Log Backup
Database Administration, Backup Templates and Data Carriers
Database Manager CLI, backup_start, autolog_on