Loading...

Commvault End-User Command Line (cvc) Interface Example: restore

Name

restore

Synopsis

restore [-h] [-c CLIENTNAME] [-i INSTANCENAME] [-bk BACKUPSETNAME] [-sc SUBCLIENTNAME][-path SOURCEPATH [SOURCEPATH ...] | -l RESTOREFILELIST | -list])[-dc DESTCLIENT] [-dp DESTPATH] [-ftime FROMTIME] [-ttime TOTIME] [-versions VERSIONS] [-uo UNCONDITIONALOVERWRITE {True,False}] [-filter BROWSE_FILTER [BROWSE_FILTER ...]] [path]

Description

Restore the backup.

You can perform the following restore types:

  • In-Place
  • Out-of-Place
  • Point-in-Time

If you want to perform a point-in-time restore, then you must use one of the following options:

  • The from time
  • The to time
  • The from and to time

The table lists the options that the software supports.

Option

Description

-c

The CommCell Console client name.

The software uses the information that is in the computer registry when you do not specify this option.

-i

The CommCell Console instance name.

-bk

The CommCell Console backup set name.

The software uses the DefaultBackupSet when you do not specify this option.

-sc

The CommCell Console subclient name.

The software uses the DefaultBackupSet and the default subclient when you do not specify this option.

-path

The path on the source that contains the data that you want to restore.

-l

The list of files that you want to restore.

-dc

This is the destination client name. You must use this option, or the -dp option when you perform an out-of-place restore operation.

-dp

This is the path on the destination client where you want to restore the data. You must use this option or the -dc option when you perform an out-of-place restore operation.

-ftime

The from time that you specify for a point-in-time restore operations. The format is yyyy-mm-dd hh:mm:ss.

-ttime

The to time that you specify for a point-in-time restore operations. The format is yyyy-mm-dd hh:mm:ss.

-uo

Configure the software to automatically overwrite the data on the destination. Valid values are:

  • True
  • False

-versions

Restore all the versions, or a specific version. The software restores all versions by default. To restore a specific version, set this to the backup versions number that you want to restore, for example, "1".

-list

Dynamic list for the restore operation.

-filter

File name filters for the restore operation.

-h

Displays the help for this command.

Examples

Perform a Browse Operation

The following command performs an browse operation. In this example, the parameters are listed on the command line.

cvc> browse -c example_client -sc good -sp "C:\Users\admin\Desktop\good2"
<?xml version="1.0" ?>
<Task>
  <JobID>589124</JobID>
</Task>
Browse Initiated Successfully Job ID : 589124

Perform an Out-of-Place Restore Operation to a New Folder

The following command performs an out-of-place restore operation. The data is restored to a new path on the source client. In this example, the parameters are listed on the command line.

cvc> restore -c example_client -sc good -sp "C:\Users\admin\Desktop\good2" -dc example_client -dp "C:\Users\admin\Desktop\logs" -ftime "2017-09-23 08:00:00"
Restore Job Initiated successfully
<?xml version="1.0" ?>
<Task>
  <JobID>589132</JobID>
</Task>
Restore Initiated Successfully Job ID : 589132

Perform an Out-of-Place Restore Operation to a New Client

The following command performs an out-of-place restore operation. The data is restored to a new client. In this example, the parameters are listed on the command line.

cvc> restore -c example_client -sc good -sp "/tmp/test" -dc example_client_latest -dp "/tmp/test/new"
Restore Job Initiated successfully
<?xml version="1.0" ?>
<Task>
  <JobID>595584</JobID>
</Task>
Restore Initiated Successfully Job ID : 595584

Perform a Restore Operation That Overwrites the Data on the Destination

The following command performs overwrites the data at the destination. In this example, the parameters are listed on the command line.

cvc> restore -c example_client -sc good -sp "/tmp/test" -outplace True -dc example_client_latest -dp "/tmp/test/new" -uo True
Restore Job Initiated successfully
<?xml version="1.0" ?>
<Task>
  <JobID>595583</JobID>
</Task>
Restore Initiated Successfully Job ID : 595583

Perform a Restore Operation By Using Wildcards

The following command restores all XML files and files with prefix clB in the /test_restore folder, in place. In this example, the parameters are listed on the command line.

cvc> browse -c example_client -sc example_subclient -p /test_restore -filter *.xml clB*

Last modified: 11/28/2018 1:14:30 PM