hvrsnapshotsave
Usage
hvrsnapshotsave [-Rurl] [-options] hub save_path
Save a snapshot of the hub to save_path.
Description
Command hvrsnapshotsave 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 Fivetran 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. HVR_CHANNEL, HVR_TABLE, HVR_COLUMN, HVR_LOC_GROUP, HVR_ACTION, etc.), and information from the HVR_CONFIG directory (log files, enroll files, capture state files, catalog cache files, etc.).
Options -e
, -l
, -s
, and -t
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 hvrsnapshotsave.
Parameter | Description |
---|---|
-cchn | Save data related to only channel hvrsnapshotsave -c mychannel myhubmy_hub_snapshot |
-eevent_trim | Trim events data. Valid values for
|
-llog_trim | Trim log data. Valid values for
|
-rreason | Specify a reason to save the snapshot. For example:
hvrsnapshotsave -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 hvrlogin 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):hvrsnapshotsave -R http://node:port myhub my_hub_snapshot |
-sstats_trim | Trim statistical data. Valid values for
|
-tdefinition_trim | Trim definition data. Valid values for
|
-Vaccessmeth | Manage secret and confidential data visibility. Valid values for
|
Examples
This section provides examples of using the hvrsnapshotsave 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/).
hvrsnapshotsave 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).
hvrsnapshotsave -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:
hvrsnapshotsave -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:
hvrsnapshotsave -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:
hvrsnapshotsave -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:
hvrsnapshotsave -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:
hvrsnapshotsave -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)
hvrsnapshotsave 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.
hvrsnapshotsave -V @enc_key myhub snapshot.zip