dsssnapshotsave - DSS 6 | Data Source Solutions Documentation
Documentation: dsssnapshotsave - DSS 6 | Data Source Solutions Documentation
dsssnapshotsave
Usage
<b>dsssnapshotsave</b> [<b>-R</b><em>url</em>] [<b>-</b><em>options</em>] <em>hub</em> <em>save_path</em> Save a snapshot of the hub to save_path.
Description
Command dsssnapshotsave saves the snapshot of a hub. Argument save_path indicates a path to save the snapshot to. Hub snapshot is a file that can be used to store all of the data related to a hub and move it from one repository to another.
The main purposes for using a hub snapshot are:
- Troubleshooting. You can share issue cases with co-workers or the Data Source Solutions technical support. The snapshot can then be restored in a test environment for investigating the problem.
- Migration. You can move a copy of a hub from one hub server (machine) to run it on another hub server (machine).
- Backup. You can create a backup of the hub for reporting purposes.
A hub snapshot contains all the data needed for these purposes, i.e. the hub snapshot metadata, information from certain repository tables (e.g. DSS_CHANNEL, DSS_TABLE, DSS_COLUMN, DSS_LOC_GROUP, DSS_ACTION, etc.), and information from the DSS_CONFIG directory (log files, enroll files, capture state files, catalog cache files, etc.).
Options <b>-e</b>, <b>-l</b>, <b>-s</b>, and <b>-t</b> allow to reduce the size of the saved snapshot by trimming off irrelevant data such as too old events, logs, statistical data and definitions. To trim data, a time point is used to cut off data that are generated before that time point. You can also specify to save all or none of the data related to events, logs, statistical data and definitions.
Sometimes a hub snapshot may contain sensitive data that should not be revealed to third parties. In this case, the encryption feature (option **-V**) can be used to redact or encrypt such data in the snapshot.
Options
This section describes the options available for command dsssnapshotsave.
| Parameter | Description |
|---|---|
-cchn |
Save data related to only channel dsssnapshotsave -c mychannel myhub my_hub_snapshot
|
-eevent_trim |
Trim events data. Valid values for
The |
-llog_trim |
Trim log data. Valid values for
The |
-rreason |
Specify a reason to save the snapshot. For example:
dsssnapshotsave -r "Max performance into Snowflake db" myhub hub_snapshot
|
-Rurl |
Remote hub server. Access the hub server running on a remote machine, via the REST interface. This option is required for remote CLI access. When using this option, command dsslogin should be run first, for authentication. For example, the following command saves a hub (e.g., myhub) on a remote hub server to a hub snapshot file (e.g., my_hub_snapshot):dsssnapshotsave -R http://node:port myhub my_hub_snapshot
|
-sstats_trim |
Trim statistical data. Valid values for
The |
-tdefinition_trim |
Trim definition data. Valid values for
The |
-Vaccessmeth |
Manage secret and confidential data visibility. Valid values for
|
Examples
This section provides examples of using the dsssnapshotsave command.
Example 1. Save snapshot of a hub
-
The following command saves a snapshot of a hub (e.g., myhub) to a directory (e.g., /home/myuser/).
dsssnapshotsave myhub /home/myuser/hub_snapshot -
The following command saves a snapshot of a hub (e.g., myhub) with data related only to a specific channel (e.g., mychannel).
dsssnapshotsave -c mychannel myhub hub_snapshot
Example 2. Trim data from a snapshot
-
The following command saves a snapshot of a hub (e.g., myhub) into a file (e.g., snapshot.zip) with the statistical data generated after 2021-04-07T13:35:59Z:
dsssnapshotsave -s 2021-04-07T13:35:59Z myhub snapshot.zip -
The following command saves a snapshot of a hub (e.g., myhub) into a file (e.g., snapshot.zip) and trims off events generated more than 5 days ago:
dsssnapshotsave -e now-5d myhub snapshot.zip -
The following command saves a snapshot of a hub (e.g., myhub) into a file (e.g., snapshot.zip) with definitions generated only today:
dsssnapshotsave -t today myhub snapshot.zip -
The following command saves a snapshot of a hub (e.g., myhub) into a file (e.g., snapshot.zip) without any log data:
dsssnapshotsave -l none myhub snapshot.zip -
The following command saves a snapshot of a hub (e.g., myhub) into a file (e.g., snapshot.zip) with all log data:
dsssnapshotsave -l all myhub snapshot.zip -
The following command saves a snapshot of a hub (e.g., myhub) into a file (e.g., snapshot.zip) including:
-
Events generated for the last 7 days (prior to v6.1.0/52 and v6.1.5/3 - 30 days)
-
Statistical data generated for the last 3 days (prior to v6.1.0/52 and v6.1.5/3 - 30 days)
-
Logs and definitions generated for the last 3 days (prior to v6.1.0/52 and v6.1.5/3 - 7 days)
dsssnapshotsave myhub snapshot.zip
-
Example 3. Apply transport encryption when saving a hub snapshot
The following command saves a snapshot of a hub (e.g., myhub) into a file (e.g., snapshot.zip) and enables encryption for confidential data using a transport encryption key. The key is saved to the enc_key file.
dsssnapshotsave -V @enc_key myhub snapshot.zip