CData Virtuality インストール間の移行が必要な場合、またはデータソース、ジョブ、設定などのバックアップが必要な場合は、特別なエクスポートスクリプトを使用することができます。CData Virtuality Studio のExporter コンポーネント、またはCData Virtuality Server 内のCLI-Exporter ツールで生成できます。

バックアップジョブは、いつでも最新のバックアップを取得できるように、定期的にエクスポートスクリプトを作成するようにスケジュールできるシステムジョブです。バックアップジョブは、特別なシステムユーザ - internal-backupによって実行されます。

Default Backup Job

デフォルトでは、バックアップ・ジョブのインスタンスが1つ作成されます。削除することはできませんが、必要に応じて無効にすることができます。

デフォルトの設定は以下のとおりです:

  • 毎日午前5時50分(CData Virtuality Server 時間)に実行されます;
  • エクスポートスクリプトは、サーバールートフォルダのbackup ディレクトリに保存されます。

他のジョブと同様に、バックアップジョブのスケジュールを編集したり、完全に削除して新しいスケジュールを作成したりできます。バックアップディレクトリは、SYSADMIN.editBackupJobシステムプロシージャを使用して変更できます。

Custom Backup Jobs

 SYSADMIN.createBackupJob システム手順を使用して、追加のバックアップジョブを作成できます。これらは編集や削除が可能で、すべての設定は で設定可能です。

Creating a Custom Backup Job

カスタムバックアップジョブを作成するためのシステム機能は以下のとおりです。 backupFolderを除くすべてのパラメータはオプションです:

CALL "SYSADMIN.createBackupJob"(
"description" => 'string_description',
"parallelRunsAllowed" => integer_parallelRunsAllowed,
"retryCounter" => integer_retryCounter,
"retryDelay" => integer_retryDelay,
"runTimeout" => integer_runTimeout,
"jobName" => 'string_jobName',
"jarFileLocation" => 'string_jarFileLocation',
"exportMattables" => boolean_exportMattables,
"backupFolder" => 'string_backupFolder',
"fileNamePattern" => 'string_fileNamePattern',
"additionalProperties" => 'string_additionalProperties',
"uuid" => 'string_uuid'
);; 

このプロシージャは以下のパラメータを取ります:

To view the full table, click the expand button in its top right corner

jarFileLocation parameter in SYSADMIN.createBackupJob depricated since v4.10

Parameter

Type

Description

description

string

Description of the job

parallelRunsAllowed

integer

Number of possible parallel runs allowed for the job

retryCounter

integer

Number of retry attempts for the job

retryDelay

integer

Delay between retries

runTimeout

integer

Job run timeout

jobName

string

Custom name for the job

jarFileLocation

string

Deprecated. Relative or absolute path to the cli-export.jar. Default: %dvserver%\bin\cli-export-1.0\

exportMattables

boolean

Flag indicating whether to export materialized tables

backupFolder

string

Relative or absolute path to the folder to store export scripts

fileNamePattern

string

Pattern to be used in file naming. Default: yyyy-MM-dd-HH_mm_ss_config_backup.sql

May include the following patterns:

  • $(dt): date+time in format yyyy-MM-dd-HH_mm_ss
  • $(uuid): uuid (time-based)
  • $(ut): unixtime

additionalProperties

key-value pairs

Additional properties of the CLI-exporter tool

uuid

string

Custom UUID for the job

以下は、カスタムバックアップジョブを作成するための呼び出しの例です:

CALL "SYSADMIN.createBackupJob"(
"description" => 'A custom backup job',
"parallelRunsAllowed" => 1,
"retryCounter" => 2,
"retryDelay" => 3,
"runTimeout" => 4,
"jobName" => 'csmt-bckp-jb',
"jarFileLocation" => '../bin/cli-export-1.0/cli-export.jar',
"exportMattables" => true,
"backupFolder" => '../custom_backup',
"fileNamePattern" => '$(uuid)_custom_backup.sql',
"additionalProperties" =>('--export-jboss-settings', 'true',),
"uuid" => '7925969c-63cb-11ee-8c99-0242ac120002'
);;

uuid parameter in SYSADMIN.createBackupJob is available since v4.1

jarFileLocation parameter in SYSADMIN.createBackupJob deprecated since v4.10

Editing a Backup Job

バックアップ・ジョブ(デフォルトとカスタムの両方)は、特別なシステム手順で編集できます。 biginteger_jobidを除くすべてのパラメータはオプションです:

CALL "SYSADMIN.editBackupJob"(
"jobid" => biginteger_jobid,
"description" => 'string_description',
"parallelRunsAllowed" => integer_parallelRunsAllowed,
"retryCounter" => integer_retryCounter,
"retryDelay" => integer_retryDelay,
"runTimeout" => integer_runTimeout,
"jobName" => 'string_jobName',
"jarFileLocation" => 'string_jarFileLocation',
"exportMattables" => boolean_exportMattables,
"backupFolder" => 'string_backupFolder',
"fileNamePattern" => 'string_fileNamePattern',
"additionalProperties" => 'string_additionalProperties',
"jobUuid" => 'string_jobUuid'
);;

このプロシージャは以下のパラメータを取ります:

To view the full table, click the expand button in its top right corner

Parameter

Type

Description

jobid

integer

ID of the job to be edited

description

string

Description of the job

parallelRunsAllowed

integer

Number of possible parallel runs allowed for the job*

retryCounter

integer

Number of retry attempts for the job*

retryDelay

integer

Delay between retries*

runTimeout

integer

Job run timeout*

jobName

string

Custom name for the job

jarFileLocation

string

Depricated. Relative or absolute path to the cli-export.jar. Default: %dvserver%\bin\cli-export-1.0\

exportMattables

boolean

Flag indicating whether to export materialized tables

backupFolder

string

Relative or absolute path to the folder to store export scripts

fileNamePattern

string

Pattern to be used in file naming. Default: yyyy-MM-dd-HH_mm_ss_config_backup.sql

May include the following patterns:

  • $(dt): date+time in format yyyy-MM-dd-HH_mm_ss
  • $(uuid): uuid (time-based)
  • $(ut): unixtime

additionalProperties

key-value pairs

Additional properties of the CLI-exporter tool

jobUuid

string

UUID of the job to be edited

The jobId or jobUuid parameter must be specified.

* 詳細はparameters shared by job managing proceduresをご覧ください。

以下はその例です:

CALL "SYSADMIN.editBackupJob"(
"jobid" => 8,
"description" => 'A custom backup job',
"parallelRunsAllowed" => 1,
"retryCounter" => 2,
"retryDelay" => 3,
"runTimeout" => 4,
"jobName" => 'csmt-bckp-jb',
"jarFileLocation" => '../bin/cli-export-1.0/cli-export.jar',
"exportMattables" => true,
"backupFolder" => '../custom_backup',
"fileNamePattern" => '$(uuid)_custom_backup.sql',
"additionalProperties" =>('--export-jboss-settings', 'true',)
);;

jobUuid parameter in SYSADMIN.editBackupJob is available since v4.4

Additional Properties

To view the full table, click the expand button in its top right corner

Option

Default

Description

−−skip−aggr

FALSE

Indicates whether to skip aggregation optimizations or not

−−ds−validation

FALSE

Indicates whether  to validate data sources on import or not. If enabled, data sources are exported with createDatasource/createConnection statements or importDatasource/importConnection otherwise.

Please note that the import will fail if validation is enabled and data source is unreachable

−−opt−validation

FALSE

Indicates whether  to validate optimizations on import or not. If enabled, optimizations are exported with createOptimization statements or importOptimization otherwise.

Please note that it's impossible to export materialized tables state if this validation is enabled

−−export−mattable−state

TRUE

Indicates whether  to export the state of materialized tables or not. Used when new CData Virtuality Server installation uses the same internal Analytical Storage database with materialized tables.

Please note that this option requires the optimization validation to be disabled

−−view−proc−validation

FALSE

Indicates whether  to validate virtual views and procedures on import or not. If enabled, virtual views and procedures are exported by printing definitions directly to export script or wrapping with importView/importProcedure otherwise

−−use−maintenance−mode

FALSE

Indicates whether  to run export in maintenance server mode

−−purge−system−data

FALSE

Indicates whether  to purge the system data or not. If enabled, adds the script to purge the existing data at the beginning of the export script. With this option the following objects will be purged: DataSources, Connections, ProcDefinitions , VirtualSchemas, ViewDefinitions, ScheduleJobs (except cleanup and performance), Schedules (except performance), RecommendedOptimizations, Users, and Roles

−−use−model−file

FALSE

Indicates whether  to use a different file for model export or not. If enabled, separate files will be used for the export of data sources, virtual schemas with views and procedures and the rest

−−export−jboss−settings

FALSE

Indicates whether  to export JBoss settings or not. If enabled, JBoss settings are exported to separate files