BP Tutorial --> Overview --> Concepts --> Performing Backups or Archives --> Performing Restores --> Checking Progress of Operations -------- Overview The bp command starts the menu-based user interface for NetBackup. The bp utility is NetBackup client software that lets you back up, archive, and restore files, directories, or raw partitions that reside on your client system. In NetBackup terminology, the system that needs the backup or restore is the client. The system that manages the storage and retrieval of the backup data is called the NetBackup server. If you are licensed for optional NetBackup database agent software, you also can use bp to invoke scripts that backup and restore databases. Using bp, you browse your file system for files to backup/archive or for database agent scripts to invoke, or you browse the NetBackup database for files to restore. When bp starts, the name of your client and NetBackup master server are shown at the top of the menu. Menu options are described in the help screens for each menu. -------- Concepts User Directed Backup/Archive A user directed backup or archive allows you to select specific files and/or directories to backup and archive. You can search the filesystem to select directories and files to backup or type in file paths to be backed up or archived. After you select files and directories, you can initiate a backup or an archive. In a backup operation, the original file or directory remains on the system; in an archive operation, the original file or directory is removed after the successful backup. User Directed Restores A user directed restore lets you search the NetBackup database for files or directories to restore and then restore those files or directories. You must decide whether to restore from backups or from archives. You also can choose to have a progress log to track the progress of the restore. Migrated Files When NetBackup backs up a migrated file, it backs up only the placeholder for the file. (A migrated file is a file that has been moved to secondary storage by Veritas Storage Migrator for UNIX or Veritas Data Lifecycle Manager. A placeholder is the name and attributes of the migrated file; the placeholder remains on primary storage, usually disk, after the file is migrated to secondary storage.) When NetBackup restores a migrated file, it restores only the placeholder; the file data must be recalled by VSM or DLM so it is available. ------------------------------ Performing Backups or Archives The following procedure explains how to perform a basic backup of files, directories, or raw partitions or to archive files and directories. The main difference between backups and archives is that an archive deletes the designated directories and files from your disk after successfully backing them up. To perform backups of database products, select the appropriate database backup option from the Backup Menu and adjust the other steps in the following process as necessary. 1. Select the b) Backup option. The Backup Menu appears. Check the name in the Master Server field. This field shows the name of the server to which NetBackup will send your backups. You should not have to switch master servers unless the administrator has moved the backups. If the change becomes permanent, the administrator should change your default to reflect the other master server. 2. Select the b) Backup Files and Directories option. The Backup of Files and Directories menu appears. To archive files (that is, remove them from you computer after they are backed up, select a) Archive Files and Directories. 3. Check the Search Path field at the top of the menu to see if it is set to the directory where you want to start the search for the desired files. At start-up, NetBackup sets the Search Path to your current working directory. If necessary, use the p) Change Search Path option to change the search path. 4. Check that the Start Date and End Date fields include the last-modified dates of the files you want to back up. If necessary, use the d) Change Date Range option to change the range of dates, then enter the new start date and new end date. 5. If you want to associate a keyword phrase with the backup, do the following: a. Select k) Change Keyword Phrase. b. Type the keyword phrase, then press Enter. 6. Select the files and directories you want to back up: a. Select s) Select Files and Directories. The selection screen appears, which lets you browse the filesystem to select files and directories to back up. The Selections field shows the number of files/directories selected and Current Path shows the search path (selected in the Backup of Files and Directories menu). The selection arrow pointer (->) points to items in the list; use the option keys shown at the bottom of the screen to move the pointer and select items. Items selected are marked with an asterisk. The options are: Zoom (I)n Changes to the directory indicated; that directory will become the current path and its files and directories will be displayed. (Z)oom Out Changes the current path to the parent directory. (S)elect Adds the indicated item to the selection list; after selecting, an asterisk (*) will mark the item. If the item is selected already, it will be removed from the selection list. (B)ack Displays the previous screen of information. (F)wd Displays the next screen of information. (U)p Moves the pointer up one item in the list. (D)n Moves the pointer down one item in the list. (L)eft Shifts the display to the left. (R)ight Shifts the display to the right. (O)k Exits and returns to the menu. To refresh the screen, press Ctrl+r. If you select a directory, all files and directories below the selected directory will be selected. An asterisk (*) will appear to the left of the selected directory. b. After selecting the files and directories to backup, select (O)k to return to the Backup of Files and Directories menu. 7. To preview the files and directories you have selected to back up: a. Select e) Edit/View Selected Files. A list of the selected files appears. b. Verify that your selections are in the list. Use the Un(S)elect option to remove items. c. Select (O)k to return to the Backup of Files and Directories menu. 8. Start the backup operation: a. Select i) Initiate Backup. b. To write status messages to a progress log, answer y to the "Use a progress log?" message and then press Enter to accept the default (shown in parentheses) or type a new path and press Enter. The operation begins when you press Enter. c. Press any key to return to the Backup of Files and Directories menu. 9. Select the q) Quit Menu option to return to the Main Menu. NetBackup continues the backup operation even if you exit the bp program. ------------------- Performing Restores The following procedure explains how to perform a basic restore of files and directories. To perform restores of database products, select the appropriate database backup option from the Backup Menu and adjust the other steps in the following process as necessary. NetBackup restores files according to the original file pathname. If current files have the same names as backed-up files, you can choose to overwrite the current files (file permissions must allow overwriting). Note: When restoring NetWare backups, set the directory depth to a minimum of 6 to ensure that the backup image is displayed. Note: When restoring raw partitions, ensure that the partition is not mounted and not in use. Also ensure that the device file for the raw partition exists prior to the restore. 1. Choose the r) Restore option from the Main Menu. The Restore Menu appears. 2. Select b) Restore Files and Directories From Backups. The Restore Backups menu appears. 3. Verify that the restore options at the top of the screen are correct: * The Search Path field should be set to the directory in which you want to start the search for backups. At start up, the current path is set to the directory from which you started bp. To change the path, select p) Change Search Path and then enter the new path. * The Start Date and End Date should be set so that backup images from which you want to restore files are selected. To change the range of dates, select d) Change Date Range and then enter the new start date and end date. * The Master Server should be set to the NetBackup Master Server that has the back ups you want to restore. To change the Master Server, select m) Change Master Server and then enter the name of a master server. You should not have to switch master servers unless the administrator has moved the backups. If the change becomes permanent, the administrator should change your default to reflect the other master server. * The Policy Type field should be set to the policy that was used to backup the files. To change the policy type, select y) Change Policy Type and then type the number for the new policy type. * The Source Client and Destination Client should be set to your client. 4. To view the backup images for your client: a. Select l) List Backup Images from the Restore Backups menu. This screen shows the backups created. b. Select ( Q )uit to return to the Restore Backups menu. 5. Select the files and directories you want to restore: a. Select s) Select Files and Directories option from the Restore Backups menu. The selection screen appears, which lets you browse the filesystem to select files and directories to restore. The Selections field shows the number of files/directories selected and Current Path shows the search path (selected in the Restore Backups menu). The selection arrow pointer (->) points to items in the list; use the option keys shown at the bottom of the screen to move the pointer and select items. Items selected are marked with an asterisk. The options are: Zoom (I)n Changes to the directory indicated; that directory will become the current path and its files and directories will be displayed. (Z)oom Out Changes the current path to the parent directory. (S)elect Adds the indicated item to the selection list; after selecting, an asterisk (*) will mark the item. If the item is selected already, it will be removed from the selection list. (B)ack Displays the previous screen of information. (F)wd Displays the next screen of information. (U)p Moves the pointer up one item in the list. (D)n Moves the pointer down one item in the list. (L)eft Shifts the display to the left. (R)ight Shifts the display to the right. (O)k Exits and returns to the menu. To refresh the screen, press Ctrl+r. If you select a directory, all files and directories below the selected directory will be selected. An asterisk (*) will appear to the left of the selected directory. If you are restoring an entire directory and the range of dates includes more than one backup date for files in the directory, NetBackup restores only the most recent backups. To restore earlier versions, you can either select individual files that have the correct backup date or change the start and end dates so only the backups you want to restore are selected. b. After selecting the files and directories to backup, select (O)k to return to the Restore Backups menu. 6. To preview the files and directories you have selected to back up: a. Select e) Edit/View Selected Files. A list of the selected files appears. b. Verify that your selections are in the list. Use the Un(S)elect option to remove items. c. Select (O)k to return to the Restore Backups menu. 7. To restore the items to a different path: Note: This is an optional step, used to restore files to a different path on the same client. Note: You cannot use NetBackup on the master server to redirect restores of a file to a different path on a NetBackup Novell NetWare client. For those clients, you must perform the redirected restore with the user interface on the NetWare client. a. Choose the a) Change Destination Path option from the Restore Backups menu. b. Press Enter to accept the Restore From path. c. Enter the new Restore To path. d. Type y to use the indicated Enter Restore From and Enter Restore To paths on the next restore. e. Press any key to return to the Restore Backups menu. 8. Start the restore operation by selecting i) Initiate Restore. Depending on your selections for restore, some or all of the following options may appear: * To overwrite files if they exist, select y; select n if you do not want that backed up file to replace the existing file. Caution: The overwrite option is ignored during raw partition restores. The device file must exist and the disk partition is overwritten whether this option is set or not. * To Restore directories without crossing mount points, answer y to the "Restore directories without crossing mount points" prompt. * To write status messages to a progress log, answer y to the "Use a progress log?" message and then press Enter to accept the default (shown in parentheses) or type a new path and press Enter. * If you changed the destination path, the "Use destination path substitution?" prompt appears. Type y to use the destination path previously entered or type n to ignore the destination path entered. * If there are links in the path you are searching, NetBackup prompts you to specify whether you want to resolve the links so the paths point to the actual files or directories. To resolve the links, answer y to the "Rename hard links relative to the destination path prompt. If you do not want to resolve links, answer n. NetBackup does not resolve links if you use wildcard characters in the search directory path. Note: If you are restoring system files to a disk other than the current system disk and plan to use the other disk as the system disk with the original file paths when the restore is completed, Symantec recommends that you specify y (yes) when prompted to rename hard links and n (no) when prompted to rename soft links. * To rename soft links, answer y to the "Rename soft links relative to the destination path prompt; otherwise, type n. 9. Press any key to return to the Restore Files menu. 10. Select the q) Quit Menu option to return to the Main Menu. NetBackup continues the backup operation even if you exit the bp program. ------------------------------- Checking Progress of Operations When you start a NetBackup operation, you can have NetBackup create a log file in a directory of your choice and write to this file during the course of the operation. By default, NetBackup creates a log file in your home directory of the form: bplog.bkup.n (for backups) bplog.arch.n (for archives) bplog.rest.n (for restores) Where n is a number that is unique for each file. You can read log files by using the more command or a UNIX file editor. Delete the logs when you no longer need them. Note: Before deleting the log files, verify that they do not contain warnings or error messages.