Note: The information provided below correspond to a restore job using the File System plugin. For information regarding how to restore savesets created using other plugins, please review NetVault CLI Reference Guide.
Consider the following steps when performing a restore:
1. Locate the file
> curl -u admin -k "https://localhost:9200/_cat/indices"
Utilize _search to list the content; the output will be in JSON format:
> curl -u admin -k "https://localhost:9200/index_name/_search"Please notice that Catalog Search must be already installed and the savesets should have been scanned prior to attempt any search. Consider writing a script or command line program to display the list of files from the JSON output.
If the location of the missing file is already known, use nvrestore to list the savesets:
> nvrestore -list2. Create the Restore Selection Set
The nvsetcreate is used to produce the different sets that NetVault uses for a job. For a restore job, the most important one is the selection set that indicates which files need to be restored:
> nvsetcreate -setname singleFile -type RS -client nvclient -plugin "File System" -saveset 1209 -include "/home/user/file.zip" -restoretarget here
-restoretarget indicates the NetVault Client in which the restore will happen
3. Create and submit a restore job
The nvjobcreate is used to generate backup and restore jobs. If no schedule set is specified, the job will run immediately.
> nvjobcreate -jobtitle "Restore of single file" -servername nvserver -type restore -selectionsetname singleFile -submit