Restoring Files and Folders or Directories
Wildcard expressions can be used to restore file system data, to. This function provides the ability to restore files and/or folders/directories that have a common naming convention.
For example, msde2.txt and msj4j.txt.
When restoring directories, if a wildcard pattern that matches the name of a directory was specified, the system restores the directory, but none of the directory's contents. For example, if the wildcard restore string is tem?, the system restores any and all data named with a four-character string starting with the letters t, e, and m. If a directory name satisfies the wild card condition (e.g., sys:\temp) then only the directory would be restored; however, none of the files or any subdirectories contained therein are restored.
Supported Wildcard Expressions
A combination of wildcards in a single expression (e.g., access?.h*) can also be used. If the expression is specified by itself, without a path (*.txt), the system searches for and returns all data within the backup set that satisfies the expression. By preceding the expression with a path, the scope of the restored data can be narrowed. For example, specifying sys:\data\*.txt, would restore only those files and directories within the sys:\data directory with extensions of .txt.
The following Wildcards are supported for the respective agent type:
Mixed Mode Restores
In addition to specifying the data to be restored using the wildcard expressions, the system allows you to also select specific data to restore. This is known as a mixed mode restore. Both the selected data as well as the data that satisfies the wildcard expression(s) is restored, with one important exception. All directories that are to be restored, whether they were specifically named or selected, or merely satisfy the wildcard expression(s) are restored without their content. That is, any directory to be restored is handled in the same way as if the directory was being restored as a result of a wildcard expression.
-
From the CommCell Browser, navigate to Client Computers | <Client> | <Agent>.
-
Right-click the BackupSet and then click All Tasks | Restore.
-
Enter the wildcard characters to specify the patterns for files and folders to be included in the restore.
For example: If you want to restore all .dll files in C drive under folder Test, then specify C:\Test\*.dll
-
In the Destination Client list, select the name of the client computer.
-
Click the Job Initiation tab.
-
Select Immediate from the Job Initiation tab.
-
Click OK.
Restoring Data Using Wildcard Expressions
There are two methods of using wildcard characters to restore data.
Restore - Performing a Browse and Restore Using Browse Filters
This method of restoring data is fast because you do not have to browse the backup data first.
Procedure
-
From the CommCell Browser, expand Client Computers > client > File System.
-
Right-click a backup set, point to All Tasks, and then click Browse and Restore.
The Browse and Restore Options dialog box appears.
-
On the Filter tab, click Add, and then select the File Name filter.
-
In the File Name box, type *.doc to browse all files with the extension .doc.
For information on using wildcards, see Wildcards for Windows File System.
-
Click View Content.
The files that match the name pattern you provided are listed in the Browse window.
-
Click Recover All Selected.
The Recover Options for All Selected Items dialog box appears.
-
Click OK.
Browsing and Restoring Data Using Wildcards
This method of restoring data uses the browse feature. This method is helpful when you are uncertain of the organization of data that you want to restore.
Procedure
-
From the CommCell Browser, expand Client Computers > client > File System.
-
Right-click a backup set, point to All Tasks, and then click Browse and Restore.
The Browse and Restore Options dialog box appears.
-
Select the data that you want to restore, and click Recover All Selected.
The Recover Options for All Selected Items dialog box appears.
-
Click Advanced.
The Advanced Restore Options dialog box appears.
-
On the Paths/Filters tab, under Source Item, click Add.
To restore all *doc files in the C:\Test\ directory, specify C:\Test\*.doc.
For information on using wildcards, see Wildcards for Windows File System.
-
Click OK.
Specifying Source Path for Restore
One of the advanced options available during a restore operation is the ability to specify a source path. Some iDataAgents allow you to choose to detect or ignore regular expressions (wildcard characters) in the specified source path. This allows you to restore files and folders which contain regular expressions in their name (e.g., c:\[test]). This is similar in concept to the use of wildcards in filters, and works according to these guidelines:
-
No-Browse Restore - option is on by default (detect supported regular expressions in specified source path as wildcards); this option can be changed for this type of restore and is the only way to automatically detect regular expressions during restore.
-
Supported Regular Expressions are:
-
* = any number of characters
doc* will find any directory or file name that begins with "doc" (e.g., document, documentation)
-
** = any number of characters across any number of path levels
c:\**\move will find the directory or file named move located at any level under the c: drive (e.g., c:\info\com\move)
-
? = any one character
access? will find any directory or file name that begins with "access" followed by any one character (e.g., access1, access5)
-
[] = any range of characters
[ei]nsure will find any directory or file name that ends with "nsure" and begins either "e" or "i". (e.g., ensure, insure)
[a-z]nsure will find any directory or file name that ends with "nsure" and begins with any letter from "a" though "z". (e.g., ansure, bnsure, cnsure, etc.)
![a] or ^[a] will exclude any directory or file name that begins with "a". (e.g., applications)
-
Testing a Restore Without Restoring Data
Use this procedure to test a restore job without writing to media, applicable for Windows, Unix and Macintosh File System iDataAgents. Testing a restore job allows you to get a list of all files that would be restored without actually restoring them, based on your restore selections and filters.
-
Create a text file on the client that contains a list of all folders/directories to be included in the restore test. The purpose of this map file is to tell the system that you do not want these folders and any data contained within them to actually be restored. Use the following syntax:
"c:\test",""
Note that a Windows-based path is used in the above example. The path portion of the syntax will vary by operating system.
-
Follow the procedure to Restore Data Using a Map File and be sure to select the option to Restore Unmapped Files.
-
After the test restore job has completed, you can find the list of files/objects that would have been restored in a text file called restore.out residing within a subfolder (corresponding to the Job ID Number) of the Job Results directory on the client.
Filter Data from Restore and Recover Operations
Using the Restore/Recover Filter feature, you can specify the files, directories, or file name patterns that you want to filter from the restore data.
Supported Wildcard Characters
The following wildcard characters are supported by the restore filter operation. These characters can be used to broaden the scope of the filter operation:
Wildcard Character |
Definition |
*, |
Any number of characters |
?, |
Any one character |
[] |
Any range or set of characters |
You can also use a combination of wildcards in a single expression (e.g., access?.h*).
-
When you reach the Restore Options (General) dialog box, click Advanced.
-
From the Paths/Filters tab in the Advanced Restore Options dialog box, type the files, directories, or file name patterns that you want to filter in the Filter Paths pane. Use the Add button to specify your filter entries. Each entry must be specified as a complete path and must be a child of the Source Paths pane. Wildcard entries must be expressed as complete paths (e.g. C:\Test\*.dll, or /usr/lib/*.so).
-
Continue restore.