Develop > Tailoring > Implementing version control for your tailoring > Parameters to import and export files

Parameters to import and export files

The version control command line tool provides you the following parameters to import and export specific files. In Service Manager, a file is equivalent to a Relational Database Management System (RDBMS) table. For more information, see File.

Parameters to export files

To export Service Manager files, you can run the sm -svc_export command with the following parameters, or add the following parameters in the sm.ini file.

Parameter Description
svc_files

Specifies a list of files to export. Use commas to separate multiple files (no space before or after a comma). Service Manager exports all files in the system if the parameter is not set.

svc_excludefiles Specifies a list of files that you want to exclude from the export operation. Use commas to separate multiple files (no space before or after a comma).
svc_unicode Determines whether the exported XML file names support UTF-8 symbols or not. The default value is 0. If this parameter is set to 1, exported XML file names can contain UTF-8 symbols in Windows.

For example, if you want to export ScriptLibrary and formatctrl data only , add the following line in sm.ini:

svc_files:ScriptLibrary,formatctrl

Parameters to import files

To import Service Manager files, you can run the sm -svc_import command with the following parameters, or add the following parameters in the sm.ini file.

Parameter Description
svc_cleanbuild If the value of this parameter is set to 1, all the files in the svc_rootdir directory are imported; if the value of this parameter is set to 0 or not set, the list of files to import is determined by the svc_files parameter.
svc_files

Specifies a list of files to import. Use commas to separate multiple files (no space before or after a comma).

Note This parameter works only if the svc_cleanbuild parameter is set to 0 or not set.

svc_excludefiles Specifies the list of files that is excluded in the importing operation. Use commas to separate multiple files (no space before or after a comma).
svc_updatedbdict

Imports dbdict changes. Run the following command to import the updated dbdict xml files (such as probsummary.xml) to database:

sm –svc_import –svc_updatedbdict

Note

If there are dbdict changes without this parameter, the system displays some log information in the sm.log file according to different dbdict file names. For example:

dbdict ‘probsummary’ already exists, ignore loading! To update the dbdict, please add option 'svc_updatedbdict'

svc_postimport

Specifies a list of JavaScript interfaces to be invoked after the import operation. Follow these rules when using this parameter:

  • Use semicolons to separate multiple JavaScript interfaces (no space before or after a semicolon).
  • Use parentheses to include parameters of a JavaScript interface (no space before or after parentheses).
  • Use commas to separate multiple parameters of a JavaScript interface (no space before or after a comma).

Note

  • Omit the void parameter of JavaScript. Do not omit the parentheses even if the JavaScript has no parameters.
  • Do not include parentheses, semicolon, and commas in the string parameter of JavaScript.
  • The system will not exclude the double quotation marks or the single quotation marks of the string parameter. For example, if you want to print Hello world, the system will print it with double quotation marks. The principle is verbatim.

For example:

  1. When running the svc_import command between different environments, sometimes the data in the number table and the counter table may not be synchronized. You can add svc_postimport:BaseUtil.synchronizeCountersAndNumbers() to the svc_import command.

  2. To implement multiple JavaScript interfaces:

    svc_postimport:BaseUtil.synchronizeCountersAndNumbers();CustomerLib.customerFunction(Hello world, 1234)

For example, if you want to import only records in the ScriptLibrary and formatctrl folders under the svc_root directory, add the following lines in sm.ini:

svc_cleanbuild:0 
svc_files:ScriptLibrary,formatctrl

Other parameters

Parameter Description
svc_dateformat

Determines the date format of the xml files that are generated when you run the svc_export or svc_import command together with the svc_mode:2 parameter.

Valid if set from

  • Server's operating system command prompt
  • Initialization file (sm.ini)

Requires restart of the Service Manager server?

Yes

Default value

MM/DD/YY

Possible values

YYYY/MM/DD

YY/MM/DD

MM/DD/YYYY

MM/DD/YY

DD/MM/YYYY

DD/MM/YY

Example usage

Command line: sm -httpPort:13080 -sqldb:dbserver -svc_dateformat:MM/DD/YYYY

Initialization file: svc_dateformat:MM/DD/YYYY

Related concepts

Implementing version control for your tailoring

Related tasks

Version control process