restoresnapshots CLI command

Use this command to restore data from archives for a specified period. You can also use this command to see the status of or cancel an ongoing restore process. 

Related topic

Syntax

Note

Before you run the command, note the following points:

restoresnapshots -u <username> -w <password> -p <port> -d <hostname> -action <action> -l [locale] -s[Protocol to connect with IT Data Analytics] -retentionDays [number of days]


  • Angle brackets (< >) indicate a variable value that needs to be user defined.

  • Square brackets ([ ]) indicate optional parameters.

The following table describes the parameters used in the syntax:

ParameterDescription
-d
Host name of the Console Server.
-p
Port number of the Console Server.
-u

Admin username of TrueSight IT Data Analytics.

-w

Admin Password of TrueSight IT Data Analytics.

-action

You can specify the action to be executed in the following ways:

  • restore: To restore archive data, specify restore.
    If you use this option, it is mandatory to specify the start date (-startDate) from which the data is to be restored and the end date (-endDate) till which the data is to be restored.
    The date format must be inYYYY-MM-DD format and the date must be from the GMT timezone.
    You can also specify the -force option here. Select this option to force stop the last restore process if it has stopped mid-way.
  • status: To see the status of the ongoing restore process, specify status.
    The status is displayed as a percentage of completion of the restore process.
  • cancel: To cancel the ongoing restore process, specify cancel.
-s

(Optional) Indicates an HTTPS connection.

-l

(Optional) Indicates the locale in which you want to display messages when the command is run.

You can set one of the following locales:

  • English
  • Simplified Chinese
  • German
  • French

By default, the messages are displayed in the locale of the system on which the CLI is run.

The value can be set to one of the following depending on the locale you choose:

  • English: en
  • Simplified Chinese: chs
  • German: de
  • French: fr

Example: If you want to set the locale as Simplified Chinese, you need to specify, l=chs.

-retentionDays

(optional) The number of days for which the restored data is to be retained in live data. 

The default value is 2 days.

Example inputs

The following example provides the input for restoring data for a specified period:

restoresnapshots -u admin -w admin12345 -p 9797 -d localhost -action restore -startDate 2016-10-10 -endDate 2016-12-12 -retentionDays 4

The following example provides the input to get the status of the ongoing restore process:

restoresnapshots -u admin -w admin12345 -p 9797 -d localhost -action status -retentionDays 4

The following example provides the input to cancel the ongoing restore process:

restoresnapshots -u admin -w admin12345 -p 9797 -d localhost -action cancel -retentionDays 4
Was this page helpful? Yes No Submitting... Thank you

Comments