Configuration データベースのスケジュールバックアップを作成するには、CData Virtuality Server のエクスポートツールと内蔵スケジューラーを使用します。
Windows
- ダンプをバックアップするフォルダを作成します:drive:\path\to\backup。
backup.bat以下のスクリプトを作成します:
cddrive:\path\to\backup\cli-export-1.0sethr=%time:~0,2%if"%hr:~0,1%"equ" "sethr=0%hr:~1,1%.\export.bat --usernameusername --passwordpassword --hostlocalhost --file..\%date:~-4,4%-%date:~-7,2%-%date:~-10,2%_%hr%_%time:~3,2%_%time:~6,2%_config_backup.sqlBy default, the export tool is stored in C:\Data Virtuality Suite\DVServer\bin\cli-export-1.0.
Data Virtuality Server 内から実行をスケジュールする場合は、SQL ジョブを作成します:
CALL SYSADMIN.CreateSQLJob(script =>'CALL SYSADMIN.execExternalProcess( ''drive:\\path\\to\\backup\\cli-export-1.0\\backup.bat'', null )',description =>'internal db backup to drive:\path\to\backup');CData Virtuality Studio のJobs タブでこのジョブにスケジュールを追加します。
All backups are stored in the drive:\path\to\backup folder.
Linux
- ダンプをバックアップするフォルダを作成します:/path/to/backup/dir。
backup.sh 以下のスクリプトを作成します:
#!/bin/shOLDPWD=$PWDDIR=`dirname$0`cd$DIR./export.sh --username username --password password --host localhost --file../`date+"%Y-%m-%d_%H_%M_%S"`_config_backup.sqlcd$OLDPWDBy default, the export tool is stored in C:\Data Virtuality Suite\DVServer\bin\cli-export-1.0.
backup.shとexport.sh (
chmod a+x <file>) に実行Permissionを追加します。Data Virtuality Server 内から実行をスケジュールする場合は、SQL ジョブを作成します:
CALL SYSADMIN.CreateSQLJob(script =>'CALL SYSADMIN.execExternalProcess( ''/path/to/backup/dir/cli-export-1.0/backup.sh'', null )',description =>'internal db backup to path/to/backup/dir');CData Virtuality Studio のJobs タブで、このジョブにスケジュールを追加します。
All backups are stored in the drive:\path\to\backup folder.