This product provides the following two backup functions for user assets.
Set backup conditions through a GUI.
Set backup conditions through command parameters. The commands themselves do not have a scheduling function.
Point
Adding the backup commands to the Task Scheduler will facilitate the command execution.
After being incorporated in a scheduled batch file, the backup commands can be executed at the specified time.
The Backup Tool (GUI) and backup commands can be used to perform the following operations:
Back up data.
Data backup is a precaution against a hard disk failure or file corruption. In addition, the backup data can be used to re-construct the database. The data that can be backed up is classified into the following two types:
Management information
Log information (log data in the DB and command logs)
For details about the information that can be backed up, see "3.1.1.2 User Assets ".
The time required for backing up data can be estimated according to the number of logs to be backed up. The estimation is as follows:
7,000 per second (Xeon, 2.0 GHz, 2 GB memory, and RAID1 architecture)
*More time may be consumed, depending on the server performance and RAID architecture.
Delete data.
Delete the unnecessary data in the database to prevent the database from running out of space.
In addition, the time required for deleting data can be estimated according to the number of logs to be deleted. The purpose is as follows:
200 per second (Xeon, 2.0 GHz, 2 GB memory, and RAID1 architecture)
*More time may be consumed, depending on the server performance and RAID architecture.
Output log information (in Log Viewer format).
Output operation logs and prohibition logs to CSV files in Log Viewer format and view the logs. The information output in Log Viewer format, however, cannot be used for restoration.
The time required by log information output can be estimated according to the number of logs to be backed up. The estimation is as follows:
2,000 per second (Xeon, 2.0 GHz, 2 GB memory, and RAID1 architecture)
*More time may be consumed, depending on the server performance and RAID architecture.
Set scheduled tasks for deleting or backing up data, which is supported only by the Backup Tool (GUI).
Set scheduled tasks so that data can be automatically backed up or deleted. The scheduled tasks will be added to the Task Scheduler. The following operations can be automatically performed:
Back up data (management information, log information, and configuration change logs).
Delete data (log information and configuration change logs).
Output log information (in Log Viewer format).
When an error occurs during automatic operation execution, an E-mail for notification will be sent to the administrator.
Select [Server Settings Tool]-[Administrator Notification Settings]-[E-mail Sending Settings], and then set the E-mail address for notification.
The operational status of the Backup Tool (GUI) or backup commands will be output to event logs.
The Backup Tool (GUI) and the backup commands can back up the user assets (including management information and log information) except the attached data, but they do not back up the information about programs and settings information of the product. Please use other software to regularly back up all the information.
This section describes how to back up the user assets by using the Backup Tool (GUI).
Note
Notes on using the Backup Tool (GUI)
Please ensure that there is sufficient available space on the disk specified as the output target disk for the backup files. If the disk space is insufficient to save a large amount of data, please correspondingly narrow the date range of the targets to be saved.
Please ensure that there is sufficient available space on the installation target disk of the database-related files. When a large number of logs are to be backed up, there must be enough available space on the installation target disk of the database-related files. For details about disk capacity requirements, please see "Operation Environment" in the "Systemwalker Desktop Keeper User’s Guide".
In a 3-level system architecture, each Management Server is installed with a database; therefore, please perform the backup or restoration operation on each Master Management Server and Management Server separately.
The Backup Tool may convert data in a log and then output the converted log to a CSV file. The following data is converted:
TAB, CR, and LF → Replaced by Single-byte spaces.
" (double quotation marks) → "" (doubled)
The Backup Tool/backup commands do not back up the attached data (including the screen capture data and backup original files). In addition, the attached data cannot be deleted even by the log deletion operation.
Point
Logon history of the Backup Tool (GUI)
The logon history of the Backup Tool (GUI) will be output to event logs (application).
Preparations
When backing up data for restoration, please record the following setting information. (Obtain the collected bitmaps and notes of the windows.)
Target | Window to Be Backed Up |
---|---|
Management console | [Terminal Operation Settings] |
Server Settings Tool | [System Settings] |
[Setting of Active Directory Linkage] *when the Active Directory linkage function is used | |
[Administrator Notification Settings] | |
[Management Server Settings] | |
[Trace Settings] | |
[Self Version Upgrade Settings for Folder/CT] |
Perform the following steps to display the [Terminal Operation Settings] window:
Start [Management Console].
Select [Terminal Operation Settings] from the [Operation Settings] menu.
→The [Terminal Operation Settings] window is displayed.
For details about how to display the windows of the Server Settings Tool, please see "2.2.5 Set Environment of Management Server/Master Management Server ".
Note
Please properly store the recorded information.
The preceding setting information cannot be backed up using the Backup Tool. After restoring data, it is necessary to restore the terminal operation settings to the status before backup; therefore, ensure that the information recorded along with the backup data is properly stored.
Start Backup
The procedure for using the Backup Tool is as follows:
Log on to the Windows OS as a user of the Administrators group or Domain Admins group.
Select [All Programs]-[Systemwalker Desktop Keeper]-[Server]-[Backup Tool] from the [Start] menu on the computer installed with the Master Management Server or Management Server.
→The [Systemwalker Desktop Keeper - Backup Tool] window is displayed.
Enter the user ID (granted with the authority to back up and restore information) and password registered in the Server Settings Tool, and then click [OK]. (The user ID and password of the Primary Administrator can also be used for logon.)
→The [Backup Tool] window is displayed.
The following table describes the menu bar in the [Backup Tool] window.
Menu Bar | Function Summary | ||
---|---|---|---|
[File] | [Exit] | Exit the Backup Tool. | |
[Information] | [Confirm number of tables] | Display the number of records in the log information table in the database. | |
[Service] | [Conform service status] | Display the operational status of the "Level Control Service" and "Server Service" on the target server. | |
[Start service] | Start the "Level Control Service" and "Server Service" on the target server. | ||
[Stop service] | Stop the "Level Control Service" and "Server Service" on the target servertarget server. | ||
[Settings] | [Set extraction item] | When backing up the logs in the Log Viewer format, backing up the log table and deleting the records in the log table, enter the date related to data item extraction and deletion.
| |
[Automatic backup settings] | Display the Automatic Backup Settings window. | ||
[Backup tool trace] | [No] | Do not collect the traces of the Backup Tool. | |
[Summary] | Collect the traces of the Backup Tool in summary mode. | ||
[Details] | Collect the traces of the Backup Tool in details mode. | ||
[Help] | [Online Help] | Display the online help manual. | |
[Version Information] | Display the copyright information and version information. |
Before backing up the "management information" and "log information" by using the Backup Tool, it’s necessary to stop the "Level Control Service" and "Server Service" on the target server.
Select [Stop Service] from the [Service] menu. A confirmation window is displayed. Click [OK] in the window to stop the services.
The operation result window is displayed.
For first-time backup, set the data extraction method for log information backup and deletion. Select [Extraction item settings] from the [Settings] menu.
→The [Extraction item settings] window is displayed.
The extraction item settings specify the time for log backup and deletion. This can be the time that logs were generated on the client or the time that logs were stored on the server.
[Process in the client occurrence date and time (standard)]: Select this option when you want to operate based on the time that logs were generated on the client.
[Process in the server saving date and time]: Select this option when you want to operate based on the time that logs were stored on the server.
To extract logs according to the time that logs were generated on the client (CT), select "Process in the client occurrence date and time (standard)". To extract logs according to the time that logs were stored on the server, select "Process in the server saving date and time". Then, click [Set].
Note
Please do not change the extraction item settings after they are put into use.
Please do not change the extraction item settings after they are put into use. Otherwise, certain log data may fail to be backed up. If a change is required, please make the change after the preceding data is backed up.
In the [Backup Tool] window, enter the information described in steps 1 to 4.
Item Name | Description |
---|---|
[Collectively Backup Management Information] | Select it when backing up the management information. |
[Target Folder for Saving Backup File] | Select a folder for saving the backup management information. There are two methods for selecting such a folder:
An absolute path can contain a maximum of 189 single-byte characters. The folder name should not contain the following symbols: "\" "/" ":" "*" "?" """ "<" ">" "|". The backup management information is saved in the MSyyyymmdd sub-folder of the specified folder. (yyyymmdd indicates the backup execution date.) In addition, if the backup operation is performed for more than two times in a same day, a number is automatically added to the subfolder name, for example, (1). For the second backup operation: MSyyyymmdd(1) For the third backup operation: MSyyyymmdd(2) For the fourth backup operation: MSyyyymmdd(3) (The subsequent number can be deduced like this.) |
Item Name | Description |
---|---|
[Backup Log Information in Log Viewer Format] | Select it when backing up the log information in the format that enables the logs to be viewed in the Log Viewer. |
[Backup Target Period] | There are four options for specifying a backup target period:
|
[Log Type of Backup Target] | Select the type of logs to be backed up. |
[Target Folder for Saving Backup File] | Select a folder for saving the backup log information. There are two methods for selecting such a folder.
An absolute path can contain a maximum of 189 single-byte characters. The folder name should not contain the following symbols: "\" "/" ":" "*" "?" """ "<" ">" "|". The backup logs are saved in the LVyyyymmdd sub-folder of the specified folder. (yyyymmdd indicates the backup execution date.) In addition, if the backup operation is performed for more than two times in a same day, a number is automatically added to the subfolder name, for example, (1). For the second backup operation: LVyyyymmdd(1) For the third backup operation: LVyyyymmdd(2) For the fourth backup operation: LVyyyymmdd(3) (The subsequent number can be deduced like this.) |
Item Name | Description |
---|---|
[Backup Log Information] | Select it when backing up log information. |
[Backup Target Period] | There are four options for specifying a backup target period.
|
[Target Folder for Saving Backup File] | Select a folder for saving the backup log information. There are two methods for selecting such a folder:
An absolute path can contain a maximum of 189 single-byte characters. The folder name should not contain the following symbols: "\" "/" ":" "*" "?" """ "<" ">" "|". The backup logs are saved in the BKyyyymmdd sub-folder of the specified folder. (yyyymmdd indicates the backup execution date.) In addition, if the backup operation is performed for more than two times in a same day, a number is automatically added to the subfolder name, for example, (1). For the second backup operation: BKyyyymmdd(1) For the third backup operation: BKyyyymmdd(2) For the fourth backup operation: BKyyyymmdd(3) (The subsequent number can be deduced like this.) |
Item Name | Description |
---|---|
[Delete Log Information] | Select it when deleting the log information. |
[Delete Target Period] | There are five options for specifying a delete target period.
|
Enter the common settings in the [Backup Tool] window.
Item Name | Description |
---|---|
[Result Log File] | Specify the file for saving the execution results of the Backup Tool. There are two methods for selecting such a file:
An absolute path can contain a maximum of 255 single-byte characters. The file name should not contain the following symbols: "\" "/" ":" "*" "?" """ "<" ">" "|". |
[When files exist] | Select the processing operation to be performed when the result log file exists at the location specified by [Result Log File].
|
After completing all the settings, click [Execute].
→The confirmation window is displayed.
Note
If [Backup Target Period] and [Delete Target Period] are set to different values:
If [Backup Target Period] and [Delete Target Period] are set to different values on the Backup Tool, the Backup Tool displays the following message informing you that this operation may delete the files that are not backed up and prompting you to check whether the settings are correct.
[BKCI-SEL001] The [Backup Target Period] and [Delete Target Period] are set to different values. Please check whether the target periods are correctly set. Are you sure to continue?
Click [OK] to start execution. The [Backup Condition] window is displayed and the backup process starts.
When the backup process is completed successfully, the process completion window is displayed. Click [OK] in the window.
After confirming the execution status, click [Close].
Start the stopped "Level Control Service" and "Server Service". Select [Start Service] from the [Service] menu. The service startup confirmation window is displayed. Click [OK] in the window to start the services.
The operation result window is displayed. Click [OK] in the window.
Confirm Service Status
During the backup process, the Backup Tool must stop the Systemwalker Desktop Keeper services on the connected Management Server. Therefore, it is necessary to confirm the service status. This part describes how to confirm the status of the Systemwalker Desktop Keeper services by using the Backup Tool.
Select [Confirm Service Status] from the [Service] menu.
The [Confirm Service Status] window is displayed, showing whether the services are running.
Click [OK] after confirmation.
Confirm the Number of Records in the Log Information Table
This part describes how to use the Backup Tool to view the number of records in the log information table that are backup targets.
Select [Confirm Number of Tables] from the [Information] menu.
→The [Confirm Number of Tables] window is displayed. For details about the contents in the table, please see "Log Information (Not Including Command logs)" in "3.1.1.2 User Assets ".
Enter a target period.
The value of year ranges from 2000 to 9999.
The value of month ranges from 1 to 12.
The value of day ranges from 1 to 31.
Click [Confirm the number of tables].
→The number of logs is displayed in each table.
Click [Close] after confirmation.
Exit the Backup Tool
To exit the Backup Tool, select [Exit] from the [File] menu.
→The [Confirm to Exit] window is displayed.
Select whether to save the conditions specified in the Backup Tool window. Click [Yes] to exit with the conditions saved, click [No] to exit without saving the conditions, or click [Cancel] to cancel the exiting operation.
In addition, the menu settings ([Extraction Item Settings] and [Settings of Debugging Trace]) are saved when they are set.
Note
Time required by automatic data backup and deletion
The automatic data backup and deletion function will back up the management information, log information in Log Viewer format, and log information, and delete the log information.
Therefore, execution of this function may take some time.
This section describes how to set the automatic data backup and deletion function by using the Backup Tool (GUI).
Before setting this function, please ensure that no other data backup and deletion settings are specified during the creation of the operation database.
Add an automatic data backup and deletion task to the Windows Task Scheduler.
Log on the Windows OS as a user of the Administrators group or Domain Admins group.
Select [All Programs]-[Systemwalker Desktop Keeper]-[Server]-[Backup Tool] from the [Start] menu on the computer installed with the Master Management Server or Management Server.
→The [Systemwalker Desktop Keeper - Backup Tool] initialization window is displayed.
Enter the user ID (granted with the authority to back up and restore information) and password registered in the Server Settings Tool, and then click [OK]. (The user ID and password of the Primary Administrator can also be used for logon.)
→The [Backup Tool] window is displayed.
Select [Automatic backup settings] from the [Settings] menu.
→The [Automatic backup settings] window is displayed.
Target | Window to Backed Up | |
---|---|---|
Automatic backup/deletion | Set whether to automatically back up and delete data.
Default value: No | |
Automatic backup/deletion settings | Set an automatic data backup and deletion task. | |
| Task name | Specify the task name registered in the Task Scheduler. The value is fixed. |
Backup target folder | Specify the path for saving data during automatic backup. | |
Schedule Type | Specify the interval for carrying out an automatic data backup and deletion task.
Default value: Daily | |
Execution week | After selecting [Weekly] from [Type of Schedule], select a weekday on which the task is to be carried out. The month and date can be selected. Default value: Monthly | |
Execution date | After selecting [Monthly] from [Type of Schedule], enter the exact date on which the task is to be carried out. A value ranging from 1 to 31 can be entered. Default value: 1 | |
Execution start time | Set the time at which an automatic data backup and deletion task is to be carried out. A time ranging from 00:00 to 23:59 can be set. Default value: 00:00 | |
Saving date | Specify the time for saving operation logs.
If [Daily] is selected from [Type of Schedule], only [Day] is available here. If [Weekly] is selected from [Type of Schedule], [Day] and [Week] are available here. If [Monthly] is selected from [Type of Schedule], [Day] and [Month] are available here. Default value:
|
Click [Set].
Note
If a date later than 29 is specified for [Execution Date], the following message will be displayed:
If the selected date is unavailable in the specified execution month, the automatic data backup and deletion task cannot be carried out. To ensure that the task can be carried out every month, please specify a date earlier than 28.
Note
Edit a scheduled task by using the Task Scheduler of the OS.
After completing the Automatic Backup Settings, create a task named "DTK_Auto_Backup_Command" in the Task Scheduler of the OS. If the task is directly changed, the change cannot be updated in the [Automatic backup settings] window.
In addition, if the settings are changed in the [Automatic backup settings] window after a direct task change, the task change is overwritten by the change of settings in the [Automatic backup settings] window.
This section describes how to process the data in the database by using the backup commands provided by the Systemwalker Desktop Keeper.
The backup commands do not provide the task scheduling function.
Point
Adding the backup commands to the Task Scheduler will facilitate the command execution.
The Task Scheduler provided by the OS by default or the task scheduling software ARCserve can be used to set scheduled backup tasks. If using the Windows Server® 2008 OS, please set scheduled tasks as the administrator.
Note
Notes on using the backup commands
The backup commands are dedicated to V14.2.0. These commands may fail if they are used in the environment constructed under other versions.
When manually running the backup commands, please set the current folder of the backup commands to the folder that saves the backup commands.
[Saving folder]
Installation folder of the database-related files\BackupCommand
Example: C:\DTKDB\BackupCommand
Please ensure that there is sufficient available space on the disk specified as the output target disk for the backup files. If the disk space is insufficient to save a large amount of data, please correspondingly narrow the date range of the targets to be saved.
Please ensure that there is sufficient available space on the installation target disk of the database-related files. When a large number of logs are to be backed up, there must be enough available space on the installation target disk of the database-related files. For details about disk capacity requirements, please see "Operation Environment" in the "Systemwalker Desktop Keeper User’s Guide".
In the Windows Server® 2008 OS, execution of the backup commands requires the administrator authority. Before running the backup commands, please log on to the Windows OS as a user of the Administrators group or Domain Admins group.
Execution of the backup commands requires that the command extension function of the command prompt be enabled.
The command extension function is enabled by default. Run "echo %CMDEXTVERSION%" in the command prompt window. If the output value is larger than or equal to 2, you can infer that the command extension function is enabled.
The date range that supports execution of the backup commands is from 2001-01-01 to 2034-12-31. The backup commands may not function on other dates.
The backup commands may convert data in a log and then output the converted log to a CSV file. The following data is converted:
TAB, CR, and LF →Replaced by Single-byte spaces.
" (double quotation marks) → "" (doubled)
The backup commands do not back up the attached data (including the screen capture data and backup original files). The structure of the target folder that saves the attached data is as follows. Please back up the attached data separately by application. For details about the target folder that saves the attached data, please see "2.2.5.9 Set Saving Target Folder ". In addition, the attached data cannot be deleted even by the log deletion command (DTLDELR).
[Structure]
Target folder for saving attached data
+- Folder of day unit
+- Folder of CT unit
[Example]
The backup commands do not back up the E-mail contents (including the E-mail Text and attachments). The structure of the target folder that saves the E-mail contents is as follows. Please back up the E-mail contents separately by application. For details about the target folder that saves the E-mail contents, please see "2.2.5.9 Set Saving Target Folder ".
In addition, the E-mail contents cannot be deleted even by the log deletion command (DTLDELR).
The DTKMLDL.BAT (Delete E-mail Content) command can be used to delete the E-mail contents. For details about how to use the command, please see "DTKMLDL.BAT (Delete E-mail Content)" of the "Systemwalker Desktop Keeper Reference Manual".
[Structure]
Target folder for saving e-mail content
+- Folder of day unit
+- Folder of CT unit
[Example]
Types of Backup Commands
The Systemwalker Desktop Keeper provides 10 types of backup commands. Each command performs different operations on the data in the database. The following table describes the command types and the corresponding operations. The folders used for saving backup commands are as follows:
Target folder for saving the backup commands:
[Installation target folder of the database-related files]\BackupCommand
Example: C:\DTKDB\BackupCommand
No. | Command | Operation |
---|---|---|
1 | DTKMSTB.EXE | Back up each table described in "Management Information" of "3.1.1.2 User Assets " as a CSV file. |
2 | DTKLGTB.EXE | Back up each table described in "Log Information (Not Including Command logs)" of "3.1.1.2 User Assets " as a CSV file. |
3 | DTKLG1T.EXE | Output the log information from the database to CSV files in a specified format supported by the Log Viewer, and view the log information. |
4 | DTKLGAT.BAT | Collectively output the log information from the database to CSV files in Log Viewer format, and view the log information. |
5 | DTKDELR.EXE | Delete the data in all the tables described in "Log Information (Not Including Command logs)" of "3.1.1.2 User Assets " from the database. |
6 | DTKBKDL.BAT | Back up each table described in "Log Information (Not Including Command logs)" of "3.1.1.2 User Assets " as a CSV file and then delete the backed up table data from the database. |
7 | DTKCVDL.BAT | Back up each table described in "Log Information (Not Including Command logs)" of "3.1.1.2 User Assets " as a CSV file and collectively output log information from the database to CSV files. Then, delete the backed up table data from the database. |
8 | DTKBFDM.EXE | Internal command invoked by other backup commands Used for calculating the number of past days |
9 | DTKELSET.BAT | Internal command invoked by other backup commands Used for re-setting the value of [ERRORLEVEL] |
10 | DTKNUMCK.BAT | Internal command invoked by other backup commands Used for checking whether the input parameter values of the backup commands are numeric |
For details about each command, see "Command Reference" of the "Systemwalker Desktop Keeper Reference Manual".
Edit Backup Commands
The following commands must be edited before they are used. Please edit the following backup commands based on the operating environment.
DTKLGAT.BAT
DTKBKDL.BAT
DTKCVDL.BAT
To use "DTKLGAT.BAT", please open it with a text editor and edit the following contents that are underlined and in bold type.
rem ********************************************************* rem * Block for specifying operational parameters * rem ********************************************************* rem Database name set SQLDB=DTKDB rem User ID used for connecting to the database set SQLuser=(*1) rem Password corresponding to the preceding user ID set SQLpsw=(*2) set startday=%1 set endday=%2 rem Name of the target drive for saving the output files set bkdrive=(*3) rem Name of the target folder for saving the output files (in the output process) set bkdir=(*4) rem Name of the folder created under the preceding bkdir folder set csvdir=(*5) rem Extraction key (A null value indicates that the client time is used. The value "SERVER" indicates that the server time is used.) set how=(*6)
rem ********************************************************* rem * Block for completing the process * rem ********************************************************* :allend0 pause(*7) EXIT /B 0 :allend1 pause(*7) EXIT /B 1
No. | Editing Content | Configuration Example |
---|---|---|
(*1) | Enter the user ID (granted with the authority to back up and restore information) registered in the Server Settings Tool. | BKUSER |
(*2) | Enter the password corresponding to the preceding user ID. | BKPSW |
(*3) | Enter the name of the target drive for saving the output files. (The drive letter must be followed by ":".) | C: |
(*4) | Enter the name of the target folder for saving the output files in the output process. ("\" must be added before the folder name.) | \DTKBKUP |
(*5) | Enter the name of the target folder for saving the output files, created under the folder set in (*4). %2 indicates the end date of the backup target period, after which the folder is named. (Example: If the end date of the backup target period is April 20, 2007, the folder name is 20070420.) | LV%2 |
(*6) | Set whether client time (log occurrence date and time on the CT) or server time (log saving time on the server) is used in extraction of logs of the backup/delete target period.
| SERVER |
(*7) | Enter "pause" or "rem pause".
| rem pause |
To use "DTKBKDL.BAT", please open it with a text editor and edit the following contents that are underlined and in bold type.
rem ********************************************************* rem * Block for specifying operational parameters * rem ********************************************************* rem Database name set SQLDB=DTKDB rem User ID used for connecting to the database set SQLuser=(*1) rem Password corresponding to the preceding user ID set SQLpsw=(*2) rem Name of the target drive for saving the output files set bkdrive=(*3) rem Name of the target folder for saving the output files (in the output process) set bkdir=(*4) rem Name of the folder created under the preceding bkdir folder set logdir=(*5) em Extraction key (A null value indicates that the client time is used. The value "SERVER" indicates that the server time is used.) set how=(*6)
rem ********************************************************* rem * Block for completing the process * rem ********************************************************* :allend0 pause(*7) EXIT /B 0 :allend1 pause(*7) EXIT /B 1
No. | Editing Content | Configuration Example |
---|---|---|
(*1) | Enter the user ID (granted with the authority to back up and restore information) registered in the Server Settings Tool. | BKUSER |
(*2) | Enter the password corresponding to the preceding user ID. | BKPSW |
(*3) | Enter the name of the target drive for saving the output files. (The drive letter must be followed by ":".) | C: |
(*4) | Enter the name of the target folder for saving the output files. ("\" must be added before the folder name.) | \DTKBKUP |
(*5) | Enter the name of the target folder for saving the output files, created under the folder set in (*4). %2 indicates the end date of the backup target period, after which the folder is named. (Example: If the end date of the backup target period is April 20, 2007, the folder name is 20070420.) | BK%2 |
(*6) | Set whether client time (log occurrence date and time on the CT) or server time (log saving time on the server) is used in extraction of logs of the backup/delete target period.
| SERVER |
(*7) | Enter "pause" or "rem pause".
| rem pause |
To use "DTKCVDL.BAT", please open it with a text editor and edit the following contents that are underlined and in bold type.
rem ********************************************************* rem * Block for specifying operational parameters * rem ********************************************************* rem Database name set SQLDB=DTKDB rem User ID used for connecting to the database set SQLuser=(*1) rem Password corresponding to the preceding user ID set SQLpsw=(*2) rem Number of days from the end date of the target period to the execution date set bkdays=(*3) set bkMonth=(*3) set bkdate=(*3) rem State date of the target period (date of the first record to be processed) set startday=(*4) DTKBFDM.EXE %bkdays% %bkMonth% %bkdate% if errorlevel 20350101 goto errend4 if errorlevel 20010101 goto next1 goto errend4 :next1 set endday=%errorlevel% rem Name of the target drive for saving the output files set bkdrive=(*5) rem Name of the target folder for saving the output files (in the output process) set bkdir=(*6) rem Name of the folder created under the preceding bkdir folder (BK indicates the backup data format.) set logdir=(*7) rem Name of the folder created under the preceding bkdir folder (LV indicates the Log Viewer format.) set csvdir=(*8) rem Extraction key (A null value indicates that the client time is used. The value "SERVER" indicates that the server time is used.) set how=(*9)
rem ********************************************************* rem * Block for completing the process * rem ********************************************************* :allend0 pause(*10) EXIT /B 0 :allend1 pause(*10) EXIT /B 1
No. | Editing Content | Configuration Example |
---|---|---|
(*1) | Enter the user ID (granted with the authority to back up and restore information) registered in the Server Settings Tool. | BKUSER |
(*2) | Enter the password corresponding to the preceding user ID. | BKPSW |
(*3) | Enter the end date of the backup/delete target period, that is, a date several days or months before the date that “DTKCVDL.BAT” is executed. For details about the values, please see "Backup/Delete Target Period".
(For example, to specify 90 days ago:) set bkdays=90 set bkMonth= set bkdate= (For example, to specify the first day of the month that is three months ago:) set bkdays=3 set bkMonth=MONTH set bkdate=1 (For example, to specify the last day of the month that is three months ago:) set bkdays=3 set bkMonth=MONTH set bkdate=99 | (To specify 90 days ago:) set bkdays=90 (To specify the first day of the month that is three months ago:) set bkdays=3 (To specify the last day of the month that is three months ago:) set bkdays=3 |
(*4) | Enter the start date of the backup/delete target period. The data between the start date and the end date set in (*4) will be backed up or deleted. The start date can be set to "00000000" or a value ranging from "20010000" to "20349999". The start date must be earlier than the end date set in (*3). Otherwise, errors may occur. If the last four digits of the value ranging from 20010000 to 20349999 cannot be found in the calendar, the following dates will be specified:
If "00000000" is entered, the start date is the date from which the database starts storing data. For details about the values, please see "Backup/Delete Target Period". | 00000000 |
(*5) | Enter the name of the target drive for saving the output files. (The drive letter must be followed by ":".) | C: |
(*6) | Enter the name of the target folder for saving the output files in the output process. ("\" must be added before the folder name.) | \DTKBKUP |
(*7) | Enter the name of the target folder for saving the output files, created under the folder set in (*7). %endday% indicates the end date of the backup target period, after which the folder is named. (Example: If the end date of the backup target period is April 20, 2007, the folder name is 20070420.) | BK%endday% |
(*8) | Enter the name of the target folder for saving the output files, created under the folder set in (*7). %endday% indicates the end date of the backup target period, after which the folder is named. (Example: If the end date of the backup target period is April 20, 2007, the folder name is 20070420.) | LV%endday% |
(*9) | Set whether client time (log occurrence date and time on the CT) or server time (log saving time on the server) is used in extraction of logs of the backup/delete target period.
| SERVER |
(*10) | Enter "pause" or "rem pause".
| rem pause |
To use "DTKCVDL.BAT", the backup/delete target period must be specified. The following figure shows (*3) and (*4) described in the preceding table, which are related to the configuration of the target period. For details about the editing contents, please see the preceding table.
Preparations
When backing up data for restoration, please record the following setting information. (Obtain the collected bitmaps and notes of the windows.)
Target | Window to Be Backed Up |
---|---|
Management console | [Terminal Operation Settings] |
Server Settings Tool | [System Settings] |
[Setting of Active Directory Linkage] *when the Active Directory linkage function is used | |
[Administrator Notification Settings] | |
[Management Server Settings] | |
[Self Version Upgrade Settings for Folder/CT] |
Perform the following steps to display the [Terminal Operation Settings] window:
Start [Management Console].
Select [Terminal Operation Settings] from the [Operation Settings] menu.
→The [Terminal Operation Settings] window is displayed.
For details about how to display the windows of the Server Settings Tool, please see "2.2.5 Set Environment of Management Server/Master Management Server ".
Note
Please properly store the recorded information.
The preceding setting information cannot be backed up by the Backup Tool. After restoring data, it is necessary to restore the terminal operation settings to the status before backup; therefore, ensure that the information recorded along with the backup data is properly stored.
Start Backup
For details about how to use the backup commands, please see "Command Reference" of the "Systemwalker Desktop Keeper Reference Manual".
Note
Please ensure that services are stopped before command execution.
Stop the "Level Control Service" and "Server Service" before the backup or restoration operation is performed. Otherwise, data may be incomplete during backup or restoration.
When selecting backup commands after batch files are created, please ensure that the Server Service and Level Control Service are stopped, as described in "Examples of Creating Batch Files in the Task Scheduler".
In addition, after starting SWServerService or during date change (12am), confirmation of available database capacity will be performed. In the 15 minutes till the confirmation operation has completed, service may not be able to be stopped.
Therefore, when registering to scheduled task, please prevent it from executing batch file at the above time frame.
The following procedure must be manually performed:
Log on the PC as a user of the local Administrators group or Domain Admins group.
If there is another running application, exit it.
In the displayed Windows Services window, select the following services and select [Stop] from the [Action] menu. It will take 30 seconds to 1 minute. In addition, after starting SWServerService or during date change (12am), confirmation of available database capacity will be performed. In the 15 minutes till the confirmation operation has completed, service may not be able to be stopped, please confirm later.
SWLevelControlService
SWServerService
The following examples are used to illustrate how to add the backup commands to the Task Scheduler and execute the commands in two modes.
Example I: Backing Up and Deleting the Logs Saved 91 Days Ago (Log Storage Life: 3 Months)
Set the data storage life to 90 days. The data stored longer than this period will be backed up to files and no longer be kept in the database.
Create a folder named after the backup date in the specified drive every day and back up the data stored in the database for longer than 91 days to the created folder.
The backup targets are as follows:
All the tables described in “Management Information” (with DTKMSTB)
All the tables (log data in the DB and command logs) described in “Log Information”, as well as the log information stored in the database (with DTKCVDL)
For details about the data to be backed up, please see "3.1.1.2 User Assets ".
Delete the data that is already backed up from the database (with DTKCVDL).
Use the Task Scheduler of the OS to enable automatic backup. Stop the services on the Systemwalker Desktop Keeper Server side before command execution in order to avoid conflict between the access operation of services and the database record deletion operation.
After the server-side services are stopped, start command execution at 02:00 a.m. when there are fewer database connections.
Verify the time required by backup and deletion of the database records. Assume that it takes about 30 minutes in total.
To perform operations under the preceding execution conditions, use the two provided backup commands DTKMSTB and DTKCVDL.
In the execution settings, the structures of the target drive and folder for saving backup files are as follows (XXXXXXXX indicates the end date):
All the tables described in “Management Information”
→In D:\BACKUP\XXXXXXXX\MSXXXXXXXX\
All the tables (log data in the DB and command logs) described in “Log Information”
→In D:\BACKUP\XXXXXXXX\BKXXXXXXXX\
Log information stored in the database
→In D:\BACKUP\XXXXXXXX\LVXXXXXXXX\
For details about the data to be backed up, please see "3.1.1.2 User Assets ".
To implement the execution settings, perform the following steps:
Modify the DTKCVDL contents as follows:
set SQLuser=bkuser ···Set the user ID used for connecting to the database. set SQLpsw=bkpsw ···Set the password corresponding to the preceding user ID. set bkdays=90 ···Set the data storage life. set bkdrive=D: ···Set the target drive for backing up the logs. set bkdir=\BACKUP\%endday% ···Set the target folder for backing up the logs. Change pause to rem pause.
Use the text editor to create a batch file to be executed by the "Task Scheduler".
For details about how to create a batch file, please see "Examples of Creating Batch Files in the Task Scheduler".
Save the created batch file as the "DailySch.bat" file under C:\DTK\BackupCommand.
Create the target folder for log backup, specified in the execution settings.
That is, D:\BACKUP in the example of execution settings.
Add "XXXXX.bat" to the "Task Scheduler".
Select [Start]-[Settings]-[Control Panel]-[Task Scheduler] and double click to add a scheduled task.
Click [Browse] in the Start a Program window of the Task Scheduler and select "C:\DTK\BackupCommand\XXXXX.bat".
Enter the task name and set the task to run at 02:00 a.m. every day.
Since task execution requires a user ID and a password, set the user ID and password of a user with administrator authority.
The following examples describe how to create an operation batch file and a registration batch file to be added to the Task Scheduler.
In this example of creating batch commands, the return value of the Net command invoked inside the batch file should not be used as the return value of the batch commands. Please take cautions when using the return value of the Net command to control the further processing.
Example of Creating an Operation Batch File (DailySch.bat)
@ECHO OFF SETLOCAL rem *********************************************************** rem * Set * rem *********************************************************** rem Name of the target drive for saving the output files SET BKDRIVE=D: rem Name of the target folder for saving the output files SET BKFOLDERNAME=\BACKUP rem Number of days from the end date of the target period to the execution date SET DELEND=90 rem User ID used for connecting to the database SET SQLUSER=dtkbkuser rem Password used for connecting to the database SET SQLPASSWORD=dtkpsw rem Target folder for saving the backup commands SET BACKUPCOMMANDFOLDER=C:\DTK\BackupCommand rem Extraction key (A null value indicates that the client time is used. The value "SERVER" indicates that the server time is used.) SET HOW=SERVER rem *************************************************************** rem * Block for processing * rem *************************************************************** path %BACKUPCOMMANDFOLDER%;%path% echo Start the backup process. (%TIME%) %BKDRIVE% CD %BKFOLDERNAME% rem Calculate the backup end date. %BACKUPCOMMANDFOLDER%\DTKBFDM.EXE %DELEND% rem Create a folder named after the execution date. SET TEMPDATE=%ERRORLEVEL% MKDIR %TEMPDATE% rem Create the target folder for saving backup files. SET MSFOLDER=%BKDRIVE%%BKFOLDERNAME%\%TEMPDATE%\MS%TEMPDATE% MKDIR %MSFOLDER% echo Stop the DTK service (Level Control Service). net stop SWLevelControlService if ERRORLEVEL 1 goto recover1 echo Stop the DTK service (Server Service). net stop SWServerService if ERRORLEVEL 1 goto recover2 rem Back up the master system data. %BACKUPCOMMANDFOLDER%\DTKMSTB.EXE DTKDB %SQLUSER% %SQLPASSWORD% %MSFOLDER% if ERRORLEVEL 1 goto recover3 rem Back up and delete the log system data. CALL %BACKUPCOMMANDFOLDER%\DTKCVDL if ERRORLEVEL 1 goto recover4 echo Start the DTK service. net start SWLevelControlService net start SWServerService echo The scheduled task is completed successfully. (%TIME%) EXIT /B 0 :recover1 echo An error occurs when stopping the Level Control Service. echo Cancel backup and start the DTK service (Level Control Service). goto allend1 :recover2 echo An error occurs when stopping the Server Service. echo Cancel backup and start the DTK services (Level Control Service and Server Service). goto allend1 :recover3 echo An error occurs when backing up the management information. echo Cancel backup and start the DTK services (Level Control Service and Server Service). goto allend1 :recover4 echo An error occurs when backing up and deleting logs. echo Cancel log backup and deletion and start the DTK services (Level Control Service and Server Service). goto allend1 :allend1 echo Start the DTK services. net start SWLevelControlService net start SWServerService echo The scheduled task ends abnormally. (%TIME%) EXIT /B 1
Example of Creating a Registration Batch File (XXXXX.bat)
@ECHO OFF SETLOCAL rem *********************************************************** rem * Set * rem *********************************************************** set BACKUPCOMMANDFOLDER=C:\DTK\BackupCommand rem *********************************************************** rem * Block for processing * rem *********************************************************** rem Calculate the execution date. %BACKUPCOMMANDFOLDER%\DTKBFDM.EXE 0 SET EXECDAY=%ERRORLEVEL% call DailySch.bat > %EXECDAY%.log if ERRORLEVEL 1 goto allend1 EXIT /B 0 :allend1 EXIT /B 1
The execution result log (%EXECDAY%.log) records the execution results of the registered DailySch.bat file in the preceding example.
Start the backup process. (12:50:27.87) Stop the DTK service (Level Control Service). The SWLevelControlService is stopping. The SWLevelControlService is stopped successfully. Stop the DTK service (Server Service). The SWServerService is stopping. The SWServerService is stopped successfully. 2009/06/08 12:50:33 Start collective backup of the management information. 2009/06/08 12:50:33 2009/06/08 12:50:33 Database: DTKDB 2009/06/08 12:50:33 Folder: D:\BACKUP\20090310\MS20090310 2009/06/08 12:50:33 2009/06/08 12:50:33 ○ LEVELTARGET 2009/06/08 12:50:33 Name of the output file: D:\BACKUP\20090310\MS20090310\LEVELTARGET.csv 2009/06/08 12:50:33 Number of output files: 1 2009/06/08 12:50:33 2009/06/08 12:50:33 ○ LEVELCOMPOSITION 2009/06/08 12:50:33 Name of the output file: D:\BACKUP\20090310\MS20090310\LEVELCOMPOSITION.csv 2009/06/08 12:50:33 Number of output files: 0 2009/06/08 12:50:33 ~~(Information omitted)~~ 2009/06/08 12:50:42 ○ FILEBRINGOUTLOG 2009/06/08 12:50:42 Processing 2009/02/01 Delete 84 logs 2009/06/08 12:50:42 Number of deleted logs 84 2009/06/08 12:50:42 2009/06/08 12:50:42 ○ LOGKEYWORDS 2009/06/08 12:50:42 Processing 2009/02/01 Delete 438 logs 2009/06/08 12:50:44 Number of deleted logs 438 2009/06/08 12:50:44 2009/06/08 12:50:44 ○ FILEACCESSLOG 2009/06/08 12:50:44 Processing 2009/02/01 Delete 446 logs 2009/06/08 12:50:45 Number of deleted logs 446 2009/06/08 12:50:45 2009/06/08 12:50:45 Log information deletion is completed. Start the DTK services. Start the SWLevelControlService. The SWLevelControlService is started successfully. Start the SWServerService. The SWServerService is started successfully. The scheduled task is completed successfully. (12:50:51.89)
Example II: Deleting the Logs Saved 91 Days Ago and Backing Up the Logs Saved in the Recent Week (Log Storage Life: 3 Months)
Set the data storage life to 90 days. The data stored longer than this period will be backed up to files and no longer be kept in the database.
Create a folder named after the backup start date in the specified drive every day and back up the data of the recent week to the created folder.
The backup targets are as follows:
All the tables described in “Management Information” (with DTKMSTB)
All the tables (log data in the DB and command logs) described in “Log Information”, as well as the log information stored in the database
For details about the data to be backed up, please see "3.1.1.2 User Assets ".
Delete the data saved in the database 91 days ago.
Use the Task Scheduler of the OS to enable automatic backup. Stop the services on the Systemwalker Desktop Keeper Server side before command execution in order to avoid conflict between the access operation of services and the database record deletion operation.
After the server-side services are stopped, start command execution at 02:00 a.m. when there are fewer database connections.
Verify the time required by backup and deletion of the database records. Assume that it takes about 30 minutes in total.
The following figure shows an example.
For example, set the backup target period to the week before the execution date and delete the logs saved 91 days ago.
To perform operations under the preceding execution conditions, use the provided backup commands DTKMSTB, DTKLGTB, DTKLG1T and DTKDELR.
In the execution settings, the structures of the target drive and folder for saving backup files are as follows (XXXXXXXX indicates the backup start date):
All the tables described in "Management Information"
→In D:\BACKUP\XXXXXXXX\MSXXXXXXXX\
All the tables (log data and command logs in the DB) described in “Log Information”
→In D:\BACKUP\XXXXXXXX\BKXXXXXXXX\
Log information stored in the database
→In D:\BACKUP\XXXXXXXX\LVXXXXXXXX\
For details about the data to be backed up, please see "3.1.1.2 User Assets ".
To implement the execution settings, perform the following steps:
Use the text editor to create a batch file to be executed by the "Task Scheduler".
For details about how to create a batch file, please see "Examples of Creating Batch Files in the Task Scheduler".
Save the created batch file as the "DailySch.bat" file under C:\DTK\BackupCommand.
Create the target folder for log backup, specified in the execution settings.
That is, D:\BACKUP in the example of execution settings.
Add "XXXXX.bat" to the "Task Scheduler".
Select [Start]-[Settings]-[Control Panel]-[Task Scheduler] and double click to add a scheduled task.
Click [Browse] in the Start a Program window of the Task Scheduler and select "C:\DTK\BackupCommand\XXXXX.bat".
Enter the task name and set the task to run at 02:00 a.m. every day.
Since task execution requires a user ID and a password, set the user ID and password of a user with administrator authority.
The following examples describe how to create an operation batch file and a registration batch file to be added to the Task Scheduler.
In this example of creating batch commands, the return value of the Net command invoked inside the batch file should not be used as the return value of the batch commands. Please take caution when using the return value of the Net command to control the further processing.
Example of Creating an Operation Batch File (DailySch.bat)
@ECHO OFF SETLOCAL echo Start setting. rem ************************************************************* rem * Set * rem ************************************************************* rem Name of the target drive for saving output files SET BKDRIVE=D: rem Name of the target folder for saving output files SET BKFOLDERNAME=\BACKUP rem Number of days, counting from the backup start date rem For example, set it to back up the logs saved in 7 days. SET BKSTART=7 rem Number of days, counting from the deletion start date rem For example, set it to delete the logs saved 90 days ago. SET DELEND=90 rem Used ID used for connecting to the database SET SQLUSER=dtkbkuser rem Password used for connecting to the database SET SQLPASSWORD=dtkpsw rem Target folder for saving the backup commands SET BACKUPCOMMANDFOLDER=C:\DTK\BackupCommand rem Extraction key (A null value indicates that the client time is used. The value "SERVER" indicates that the server time is used.) SET HOW=SERVER rem *************************************************************** rem * Block for processing * rem *************************************************************** path %BACKUPCOMMANDFOLDER%;%path% echo Start backup. (%TIME%) %BKDRIVE% CD %BKFOLDERNAME% echo Calculate the backup start date. rem Calculate the backup start date. %BACKUPCOMMANDFOLDER%\DTKBFDM.EXE %BKSTART% SET BKSTARTDAY=%ERRORLEVEL% rem Calculate the backup end date. %BACKUPCOMMANDFOLDER%\DTKBFDM.EXE 0 SET BKENDDAY=%ERRORLEVEL% rem Calculate the deletion end date. %BACKUPCOMMANDFOLDER%\DTKBFDM.EXE %DELEND% SET DELENDDAY=%ERRORLEVEL% rem Create a folder named after the backup start date (log data). MKDIR %BKSTARTDAY% SET BKFOLDER=%BKDRIVE%%BKFOLDERNAME%\%BKSTARTDAY%\BK%BKSTARTDAY% MKDIR %BKFOLDER% rem Create a folder named after the backup start date (for viewing data). SET LVFOLDER=%BKDRIVE%%BKFOLDERNAME%\%BKSTARTDAY%\LV%BKSTARTDAY% MKDIR %LVFOLDER% rem Create the target folder for saving backup files. SET MSFOLDER=%BKDRIVE%%BKFOLDERNAME%\%BKSTARTDAY%\MS%BKSTARTDAY% MKDIR %MSFOLDER% echo Stop the DTK service (Level Control Service). net stop SWLevelControlService if ERRORLEVEL 1 goto recover1 echo Stop the DTK service (Server Service). net stop SWServerService if ERRORLEVEL 1 goto recover2 rem Back up the master system data. %BACKUPCOMMANDFOLDER%\DTKMSTB.EXE DTKDB %SQLUSER% %SQLPASSWORD% %MSFOLDER% if ERRORLEVEL 1 goto recover3 rem Back up the log system data. %BACKUPCOMMANDFOLDER%\DTKLGTB.exe DTKDB %SQLUSER% %SQLPASSWORD% %BKSTARTDAY% %BKENDDAY% %BKFOLDER% %HOW% if ERRORLEVEL 1 goto recover4 rem Back up logs (for viewing). %BACKUPCOMMANDFOLDER%\DTKLG1T.EXE DTKDB %SQLUSER% %SQLPASSWORD% %BKSTARTDAY% %BKENDDAY% 3 %LVFOLDER%\Application Startup Prohibition Log.csv %how% if ERRORLEVEL 1 goto recover5 %BACKUPCOMMANDFOLDER%\DTKLG1T.EXE DTKDB %SQLUSER% %SQLPASSWORD% %BKSTARTDAY% %BKENDDAY% 9 %LVFOLDER%\Printing Prohibition Log.csv %how% if ERRORLEVEL 1 goto recover5 %BACKUPCOMMANDFOLDER%\DTKLG1T.EXE DTKDB %SQLUSER% %SQLPASSWORD% %BKSTARTDAY% %BKENDDAY% 10 %LVFOLDER%\Disabling Logon Log.csv %how% if ERRORLEVEL 1 goto recover5 %BACKUPCOMMANDFOLDER%\DTKLG1T.EXE DTKDB %SQLUSER% %SQLPASSWORD% %BKSTARTDAY% %BKENDDAY% 12 %LVFOLDER%\ PrintScreen Key Prohibition Log.csv %how% if ERRORLEVEL 1 goto recover5 %BACKUPCOMMANDFOLDER%\DTKLG1T.EXE DTKDB %SQLUSER% %SQLPASSWORD% %BKSTARTDAY% %BKENDDAY% 1 %LVFOLDER%\Application Startup Log.csv %how% if ERRORLEVEL 1 goto recover5 %BACKUPCOMMANDFOLDER%\DTKLG1T.EXE DTKDB %SQLUSER% %SQLPASSWORD% %BKSTARTDAY% %BKENDDAY% 2 %LVFOLDER%\Application Termination Log.csv %how% if ERRORLEVEL 1 goto recover5 %BACKUPCOMMANDFOLDER%\DTKLG1T.EXE DTKDB %SQLUSER% %SQLPASSWORD% %BKSTARTDAY% %BKENDDAY% 4 %LVFOLDER%\Window Title Obtaining Log.csv %how% if ERRORLEVEL 1 goto recover5 %BACKUPCOMMANDFOLDER%\DTKLG1T.EXE DTKDB %SQLUSER% %SQLPASSWORD% %BKSTARTDAY% %BKENDDAY% 17 %LVFOLDER%\Getting Window Title Log with URL.csv %how% if ERRORLEVEL 1 goto recover5 %BACKUPCOMMANDFOLDER%\DTKLG1T.EXE DTKDB %SQLUSER% %SQLPASSWORD% %BKSTARTDAY% %BKENDDAY% 5 %LVFOLDER%\E-mail Sending Log.csv %how% if ERRORLEVEL 1 goto recover5 %BACKUPCOMMANDFOLDER%\DTKLG1T.EXE DTKDB %SQLUSER% %SQLPASSWORD% %BKSTARTDAY% %BKENDDAY% 7 %LVFOLDER%\Device Configuration Change Log.csv %how% if ERRORLEVEL 1 goto recover5 %BACKUPCOMMANDFOLDER%\DTKLG1T.EXE DTKDB %SQLUSER% %SQLPASSWORD% %BKSTARTDAY% %BKENDDAY% 8 %LVFOLDER%\Printing Operation Log.csv %how% if ERRORLEVEL 1 goto recover5 %BACKUPCOMMANDFOLDER%\DTKLG1T.EXE DTKDB %SQLUSER% %SQLPASSWORD% %BKSTARTDAY% %BKENDDAY% 11 %LVFOLDER%\File Export Log.csv %how% if ERRORLEVEL 1 goto recover5 %BACKUPCOMMANDFOLDER%\DTKLG1T.EXE DTKDB %SQLUSER% %SQLPASSWORD% %BKSTARTDAY% %BKENDDAY% 6 %LVFOLDER%\Command Log.csv %how% if ERRORLEVEL 1 goto recover5 %BACKUPCOMMANDFOLDER%\DTKLG1T.EXE DTKDB %SQLUSER% %SQLPASSWORD% %BKSTARTDAY% %BKENDDAY% 13 %LVFOLDER%\File Operation Log.csv %how% if ERRORLEVEL 1 goto recover5 %BACKUPCOMMANDFOLDER%\DTKLG1T.EXE DTKDB %SQLUSER% %SQLPASSWORD% %BKSTARTDAY% %BKENDDAY% 16 %LVFOLDER%\E-mail attachment prohibition Log.csv %how% if ERRORLEVEL 1 goto recover5 %BACKUPCOMMANDFOLDER%\DTKLG1T.EXE DTKDB %SQLUSER% %SQLPASSWORD% %BKSTARTDAY% %BKENDDAY% 90 %LVFOLDER%\External Application Log.csv %how% if ERRORLEVEL 1 goto recover5 %BACKUPCOMMANDFOLDER%\DTKLG1T.EXE DTKDB %SQLUSER% %SQLPASSWORD% %BKSTARTDAY% %BKENDDAY% 14 %LVFOLDER%\Logon and Logoff Log.csv %how% if ERRORLEVEL 1 goto recover5 %BACKUPCOMMANDFOLDER%\DTKLG1T.EXE DTKDB %SQLUSER% %SQLPASSWORD% %BKSTARTDAY% %BKENDDAY% 24 %LVFOLDER%\FTP Operation Prohibition Log.csv %how% if ERRORLEVEL 1 goto recover5 %BACKUPCOMMANDFOLDER%\DTKLG1T.EXE DTKDB %SQLUSER% %SQLPASSWORD% %BKSTARTDAY% %BKENDDAY% 25 %LVFOLDER%\FTP Operation Log.csv %how% if ERRORLEVEL 1 goto recover5 %BACKUPCOMMANDFOLDER%\DTKLG1T.EXE DTKDB %SQLUSER% %SQLPASSWORD% %BKSTARTDAY% %BKENDDAY% 29 %LVFOLDER%\Web Operation Prohibition Log.csv %how% if ERRORLEVEL 1 goto recover5 %BACKUPCOMMANDFOLDER%\DTKLG1T.EXE DTKDB %SQLUSER% %SQLPASSWORD% %BKSTARTDAY% %BKENDDAY% 31 %LVFOLDER%\Web Operation Log.csv %how% if ERRORLEVEL 1 goto recover5 %BACKUPCOMMANDFOLDER%\DTKLG1T.EXE DTKDB %SQLUSER% %SQLPASSWORD% %BKSTARTDAY% %BKENDDAY% 34 %LVFOLDER%\E-mail sending interruption Log.csv %how% if ERRORLEVEL 1 goto recover5 rem Delete the log system data. C:\DTK\BackupCommand\DTKDELR.exe DTKDB %SQLUSER% %SQLPASSWORD% 00000000 %DELENDDAY% -Y %HOW% if ERRORLEVEL 100 goto allend0 goto recover6 :recover1 echo An error occurs when stopping the Level Control Service. echo Cancel backup and start the DTK service (Level Control Service). goto allend1 :recover2 echo An error occurs when stopping the Server Service. echo Cancel backup and start the DTK services (Level Control Service and Server Service). goto allend1 :recover3 echo An error occurs when backing up the management information. echo Cancel backup and start the DTK services (Level Control Service and Server Service). goto allend1 :recover4 echo An error occurs when backing up the log information. echo Cancel backup and start the DTK services (Level Control Service and Server Service). goto allend1 :recover5 echo An error occurs when backing up the log information (for viewing). echo Cancel backup and start the DTK services (Level Control Service and Server Service). goto allend1 :recover6 echo An error occurs when deleting the log information. echo Cancel the log information deletion and start the DTK services (Level Control Service and Server Service). goto allend1 :allend0 echo Start the DTK services. net start SWLevelControlService net start SWServerService echo The scheduled task is completed successfully. (%TIME%) EXIT /B 0 :allend1 echo Start the DTK services. net start SWLevelControlService net start SWServerService echo The scheduled task ends abnormally. (%TIME%) EXIT /B
Example of Creating a Registration Batch File (XXXXX.bat)
@ECHO OFF SETLOCAL rem *********************************************************** rem * Set * rem *********************************************************** set BACKUPCOMMANDFOLDER=C:\DTK\BackupCommand rem *********************************************************** rem * Block for processing * rem *********************************************************** rem Calculate the execution date. %BACKUPCOMMANDFOLDER%\DTKBFDM.EXE 0 SET EXECDAY=%ERRORLEVEL% call DailySch.bat > %EXECDAY%.log if ERRORLEVEL 1 goto allend1 EXIT /B 0 :allend1 EXIT /B 1
The execution result log (%EXECDAY%.log) records the execution results of the registered DailySch.bat file in the preceding example.
Start setting. Start the backup process. (13:52:01.43) Calculate the backup start date. Stop the DTK service (Level Control Service). The SWLevelControlService is stopping. The SWLevelControlService is stopped successfully. Stop the DTK service (Server Service). The SWServerService is stopping. The SWServerService is stopped successfully. 2009/06/08 13:52:06 Start collective backup of the management information. 2009/06/08 13:52:06 2009/06/08 13:52:06 Database: DTKDB 2009/06/08 13:52:06 Folder: D:\BACKUP\20090601\MS20090601 2009/06/08 13:52:06 2009/06/08 13:52:07 ○ LEVELTARGET 2009/06/08 13:52:07 Name of the output file: D:\BACKUP\20090601\MS20090601\LEVELTARGET.csv 2009/06/08 13:52:07 Number of output files: 2 2009/06/08 13:52:07 2009/06/08 13:52:07 ○ LEVELCOMPOSITION 2009/06/08 13:52:07 Name of the output file: D:\BACKUP\20090601\MS20090601\LEVELCOMPOSITION.csv 2009/06/08 13:52:07 Number of output files: 1 2009/06/08 13:52:07 ~~(Information omitted)~~ 2009/06/08 13:52:16 ○ LOGKEYWORDS 2009/06/08 13:52:16 Processing 2009/02/01 Delete 223 logs 2009/06/08 13:52:17 Number of deleted logs 223 2009/06/08 13:52:17 2009/06/08 13:52:17 ○ FILEACCESSLOG 2009/06/08 13:52:17 Processing 2009/02/01 Delete 446 logs 2009/06/08 13:52:18 Number of deleted logs 446 2009/06/08 13:52:18 2009/06/08 13:52:18 Log information deletion is completed. Start the DTK services. Start the SWLevelControlService. The SWLevelControlService is started successfully. Start the SWServerService. The SWServerService is started successfully. The scheduled task is completed successfully. (13:52:24.92)