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 chn rather than all channels in the hub. Normally, a hub snapshot contains, among other things, data related to all channels in the hub, such as locations, location groups, tables, table groups, jobs, events, etc. The -c option allows to narrow down the data to only a specific channel (data related to other channels will not be added to the snapshot). At the same time, the snapshot will still contain the list of channel names related to the hub.

For example:
dsssnapshotsave -c mychannel myhub my_hub_snapshot
-eevent_trim

Trim events data.

Valid values for event_trim are:

  • time: trim events data generated before a specified timestamp. Valid time formats for time are:

    • YYYY-MM-DD [HH:MM:SS] (in local time)

    • YYYY-MM-DDTHH:MM:SS+TZD

    • YYYY-MM-DDTHH:MM:SSZ

    • today

    • now[±SECS]

    • an integer (seconds since 1970-01-01 00:00:00 UTC)

  • none: do not include any events in the snapshot
  • all: include all the events in the snapshot

The default time period when option -e is not supplied is 7 days, meaning that events older than 7 days will not be saved to the snapshot. For DSS versions prior to v6.1.0/52 and v6.1.5/3, the default period is 30 days.

-llog_trim

Trim log data.

Valid values for log_trim are:

  • time: trim log data before a specified timestamp. Valid time formats for time are:

    • YYYY-MM-DD [HH:MM:SS] (in local time)

    • YYYY-MM-DDTHH:MM:SS+TZD

    • YYYY-MM-DDTHH:MM:SSZ

    • today

    • now[±SECS]

    • an integer (seconds since 1970-01-01 00:00:00 UTC).

  • none: do not include any log data in the snapshot
  • all: include all the log data in the snapshot

The default time period when option -l is not supplied is 3 days, meaning that log data older than 3 days will not be saved to the snapshot. For DSS versions prior to v6.1.0/52 and v6.1.5/3, the default period is 7 days.

-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 stats_trim are:

  • time: trim statistical data before a specified timestamp. Valid time formats for time are:

    • YYYY-MM-DD [HH:MM:SS] (in local time)

    • YYYY-MM-DDTHH:MM:SS+TZD

    • YYYY-MM-DDTHH:MM:SSZ

    • today

    • now[±SECS]

    • an integer (seconds since 1970-01-01 00:00:00 UTC)

  • none: do not include any statistical data in the snapshot

  • all: include all the statistical data in the snapshot

The default time period when option -s is not supplied is 3 days, meaning that statistical data older than 3 days will not be saved to the snapshot. For DSS versions prior to v6.1.0/52 and v6.1.5/3, the default period is 30 days.

-tdefinition_trim

Trim definition data.

Valid values for definition_trim are:

  • time: trim definition data that was generated before a specified timestamp. Valid time formats for time are:

    • YYYY-MM-DD [HH:MM:SS] (in local time)

    • YYYY-MM-DDTHH:MM:SS+TZD

    • YYYY-MM-DDTHH:MM:SSZ

    • today

    • now[±SECS]

    • an integer (seconds since 1970-01-01 00:00:00 UTC)

  • none: do not include any definition data in the snapshot
  • all: include all the definition data in the snapshot

The defaulttime period when option -t is not supplied is 3 days, meaning that definition data older than 3 days will not be saved to the snapshot. For DSS versions prior to v6.1.0/52 and v6.1.5/3, the default period is 30 days.

-Vaccessmeth

Manage secret and confidential data visibility.

Valid values for accessmeth are:

  • redact: Redact confidential and secret data.
  • storage default: Save confidential and secret data as it is stored in the hub system. Secrets are always stored with wallet encryption, so data in this form should be unintelligible, but can be used if reloaded back into the hub system with the same wallet.
  • @outputfile: Apply transport encryption using the transport encryption key and save the key to a outputfile.
  • @print: Apply transport encryption using the transport encryption key and display the key in command terminal.

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