Name
restore
Synopsis
restore [-h] -c CLIENTNAME [-sc SUBCLIENTNAME] [-bk BACKUPSETNAME] [-sp [SOURCEPATH [SOURCEPATH ...]]] [-l RESTOREFILELIST] [-dc DESTCLIENT] [-dp DESTPATH] [-ftime FROMTIME] [-ttime TOTIME] [-i INSTANCENAME] [-a AGENTNAME] [-k KEY] [-tf TOKENFILEPATH] [-of OUTPUTFILEPATH]
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. |
|
-a |
The Commvault agent 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. |
|
-sp |
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. |
|
-k |
The 16-character encryption key. |
|
-tf |
The path to the token file. |
|
-of |
The output file path. |
|
-h,--help |
Displays help. |
Examples
Perform an In-Place Restore Operation
The following command performs an in-place restore operation. In this example, the parameters are listed on the command line.
python3 cvc.py restore -c example_client -bk example_backupset -sc good -sp "/tmp/test" -tf objfile
<?xml version="1.0" ?>
<Task> <JobID>595584</JobID>
</Task>
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.
Note
If you do not provide the destination client name, the client name provided in the command line is considered the destination client.
python3 cvc.py restore -c example_client bk example_backupset -sc good -sp "/tmp/test" -dc example_client_latest -dp "/tmp/test/new" -ftime "2018-01-01 08:00:00"
Restore Job Initiated successfully
<?xml version="1.0" ?>
<Task> <JobID>595584</JobID>
</Task>
Perform a Restore Operation At the Backup Set Level
The following command performs a restore operation at the backup set level. In this example, the parameters are listed on the command line.
python3 cvc.py restore -c example_client -bk example_backupset -sp "/tmp/test"
Restore Operation
In place restore
<?xml version="1.0" ?>
<Task> <JobID>595583</JobID>
</Task>
Restore Initiated Successfully