Export to a File with Properties¶
To export the metadata of one Server to import it on other Servers that run in different environments, we recommend using the option “export with properties”. This option generates two files:
A file that contains the VQL statements of all the elements of the database. The values of the parameters that depend on the environment are variables instead of the actual values. For example, in the
CREATE DATASOURCE JDBC
statement the value of the parameterDATABASEURI
is${databases.admin.datasources.jdbc.internet_ds.DATABASEURI}
instead of the URI of the database.And, a file that contains the values of the variables. The name of this file is the same as the first file but with the extension
.properties
. For example,databases.admin.datasources.jdbc.internet_ds.DATABASEURI= jdbc:mysql://acme:3306/incidents_center
To export to a file with properties you can use:
The Administration Tool: in the “Export” (or “Export database”) dialog, select the Include properties file check box.
The
export
script: pass the parameter-P includeProperties=yes
.
Then, you have to edit the values of the properties file to match the configuration of the target environment: change URLs of the JDBC data sources, user names and passwords, etc.
In this properties file, the passwords are encrypted. So, when you
change the value of a property that is a password, you need to enter its
encrypted value. Use the command ENCRYPT_PASSWORD
to obtain the
password encrypted.
For example, execute this from the VQL Shell:
ENCRYPT_PASSWORD 'my_password' FOR_PROPERTIES_FILE
With the FOR_PROPERTIES_FILE
option, this command generates the password with certain characters escaped, as needed in these properties files. If you are going to use the result of this command on a dialog of the administration tool, do not add this option.
Regarding this process, you only have to change the properties file. Do not modify the file that contains the VQL statements. Afterward, import these files into the target Server.
To import the VQL file with properties, you can use:
The Administration Tool: in the “Import” dialog select the Use properties check box and enter the path to the properties file in the Properties file box.
The
import
script: pass the parameter--properties-file <path to the properties file>
.
The following table lists the parameters whose value is replaced with a variable, when exporting them to a file with properties.
Element Type |
Name of the parameter in the Administration Tool |
VQL Parameter |
---|---|---|
BAPI data sources |
System name |
SYSTEMNAME |
Host |
HOSTNAME |
|
Client ID |
CLIENTID |
|
System number |
SYSTEMNUMBER |
|
User name |
USERNAME |
|
Password |
USERPASSWORD and USERPASSWORD ENCRYPTED |
|
Custom data sources |
When exporting a Custom data source, the Server replaces with variables every parameter that represents a route (LOCAL, HTTP or FTP). These variables are the same as for the ROUTE clause of the Delimited File (DF), JSON and XML data sources (see table Parameters whose value is stored as a variable when exporting with a properties file (2): data routes) |
ROUTE |
Delimited file (DF) data sources |
Data route (see table Parameters whose value is stored as a variable when exporting with a properties file (2): data routes) |
ROUTE |
JDBC data sources |
DB URI Login Password |
DATABASEURI USERNAME USERPASSWORD and USERPASSWORD ENCRYPTED |
JMS Listeners |
VDP database |
VDPDATABASE |
VDP user name |
VDPUSER |
|
Destination |
DESTINATION |
|
Reply to |
REPLYTO |
|
User name |
USER |
|
Password |
PASSWORD and PASSWORD ENCRYPTED |
|
Specific configuration for each JMS Vendor |
PROPERTIES |
|
JSON data sources |
Data route (see table Parameters whose value is stored as a variable when exporting with a properties file (2): data routes) |
ROUTE |
LDAP data sources |
Server URI |
URI |
Login |
USERNAME |
|
Password |
USERPASSWORD and USERPASSWORD ENCRYPTED |
|
Multidimensional data sources: Mondrian, Microsoft data sources: SQL Server Analysis and Generic |
XMLA URI |
XMLAURI |
Login |
USERNAME |
|
Password |
USERPASSWORD and USERPASSWORD ENCRYPTED |
|
Multidimensional data sources: SAP BW (BAPI) and SAP BI (BAPI) |
System name |
SYSTEMNAME |
Host |
HOSTNAME |
|
Client ID |
CLIENTID |
|
System number |
SYSTEMNUMBER |
|
Password |
USERPASSWORD and USERPASSWORD ENCRYPTED |
|
ODBC data sources |
DSN (when the connection type is DSN) |
DSN |
File Path (when the connection type is Direct) |
DATABASEURI |
|
Driver (when the connection type is Direct) |
||
Login |
USERNAME |
|
Password |
USERPASSWORD and USERPASSWORD ENCRYPTED |
|
XML data sources |
Data route (see table Parameters whose value is stored as a variable when exporting with a properties file (2): data routes) |
DTD |
Data route (see table Parameters whose value is stored as a variable when exporting with a properties file (2): data routes) |
SCHEMA |
|
Web service data sources |
WSDL |
WSDLURI |
End point (only when the Specify option button is selected) |
ENDPOINT URI |
|
Login |
USER |
|
Password |
PASSWORD |
|
Domain (only when the “Authentication” option HTTP NTLM is selected) |
DOMAIN |
|
Proxy host |
PROXY (HOST) |
|
Proxy port |
PROXY (PORT) |
|
Proxy login |
PROXY (USER) |
|
Proxy password |
PROXY (PASSWORD) and PROXY (PASSWORD ENCRYPTED) |
|
Automatic proxy configuration URI |
PACURI |
|
Server configuration |
When exporting the metadata of the entire Server,
its settings are also exported in the form of SET
and When you export to a file with properties, the values of these clauses are stored in the properties file |
|
Users |
When you export to a file with properties, the parameters’ values of the CREATE USER statements are stored in the properties file. |
Element type |
Name of the parameter in the Administration Tool |
VQL Parameter |
---|---|---|
Local data route (the file is located in the local file system) |
Local path |
ROUTE LOCAL |
Decrypt input filter |
DECRYPT PASSWORD |
|
HTTP client data route (the file is retrieved using an HTTP connection) |
URL |
ROUTE HTTP |
Login |
USER |
|
Password |
PASSWORD |
|
Domain (only when the NTLM option is selected in the “Authentication” list) |
DOMAIN |
|
Proxy host |
PROXY (HOST) |
|
Proxy port |
PROXY (PORT) |
|
Proxy login |
PROXY (USER) |
|
Proxy password |
PROXY (PASSWORD) and PROXY (PASSWORD ENCRYPTED) |
|
Automatic proxy configuration URI |
PACURI |
|
Decrypt input filter |
DECRYPT PASSWORD |
|
FTP / SFTP / FTPS Client data route |
Login |
ROUTE FTP |
Password |
||
URL |
||
Decrypt input filter |
DECRYPT PASSWORD |
Exporting with “metadata_export” Role¶
Users with the ‘metadata_export’ role can export an element if they have granted the METADATA
privilege (instead of requiring WRITE
or ADMIN
privileges), but the generated VQL will meet the following characteristics:
Regarding DESC VQL DATABASE sentences:
The command only will be allowed if the user has
METADATA
privilege on the database. If the user does not have METADATA privilege on the database the command will fail.JMS listeners will be included only if the user is the creator of the listener or has
ADMIN
privilege on the database. This behavior did not change.If includeProperties option is set to true, placeholders will be returned in the VQL but the value for those properties will not be returned.
If includeProperties option is set to false, the environment-specific properties will be returned with the value
********
.
Regarding DESC VQL command for elements:
If the user has
METADATA
privilege on the element (or database) the command will be executed.If includeDependencies option is set to true:
With includeProperties set to true:
Returned VQL will include placeholder for all environment-specific properties.
The environment-specific properties of the elements in which the user has
WRITE
privilege will be returned.
With include properties set to false:
The environment-specific properties of the elements in which the user has
WRITE
privilege will be returned.The environment-specific properties of the elements in which the user has
METADATA
privilege will not be returned.
If includeDependencies option is set to false:
If includeProperties option is set to true, placeholders will be returned in the VQL but the value for those properties will not be returned.
If includeProperties option is set to false, the environment-specific properties will be returned with the value
********
.