save - save files to long term storage with NetWorker savepnpc - save files to long term storage with NetWorker and performs pre and post processing commands on a NetWorker client.
save [ -BEiKLnquSVvx ] [ -s server ] [ -J storage-node ] [ -c client- name ] [ -N name ] [ -e expiration ] [ -f dirfile ] [ -o save_operations ] [ -b pool ] [ -F file ] [ -I input_file ] [ -g group ] [ -l level ] [ -t date ] [ -m masquerade ] [ -w browse_ time ] [ -y retention_time ] [ -W width ] [ path ... ] savepnpc -s server -g group [ -BEiKLnquSVvx ] [ -J storage-node ] [ -c client-name ] [ -N name ] [ -e expiration ] [ -f dirfile ] [ -b pool ] [ -F file ] [ -I input_file ] [ -l level ] [ -t date ] [ -m masquerade ] [ -w browse_time ] [ -y retention_time ] [ -W width ] [ path ... ]
save saves files, including directories or entire filesystems, to the NetWorker server (see nsr(8)). The progress of a save can be monitored using the Java based NetWorker Management Console program or the curses(3X) based nsrwatch(8) program for other terminal types. The user of this command may retain root privileges if the command's modes are properly set as described in nsr(8). If no path arguments are specified on the command line or via the -I option, the current directory will be saved. save will save a direc- tory by saving all the files and subdirectories it contains, but it will not cross mount points, or follow symbolic links. If the paths to be saved are mounted from a network file server, save instructs the user to run the save on the remote machine or use the -L option. If the path argument is specified on the command line and one of the directories in the path is a symbolic link, the target path of the sym- bolic link will be saved, rather than the symbolic link path itself. Therefore, the target path of the symbolic link must be specified when using the recover(8) command or the nwrecover(8) program to recover the files. The directive files (see nsr(5)) encountered in each directory are read by default, and they contain special instructions directing how partic- ular files are to be saved (i.e. compressed, skipped, etc.). These files are named '.nsr' on UNIX or 'nsr.dir' on Windows. Each file in the subdirectory structures specified by the path argu- ments is encapsulated in a NetWorker save stream. This stream of data is sent to a receiving process (see nsrd(8)) on the NetWorker server, which processes the data, adding entries to the on-line index (see nsrindexd(8)) for each file in the stream, with the data finally ending up on a long term storage media (see nsrmmd(8)). By default, these on- line index entries are stored in the "backup" index namespace. Details about handling media are discussed in nsrmm(8) and nsr_device(5). savepnpc consists of the same command options as save but requires the -g group to run. Apart from running the actual save, it also performs the pre and post processing commands, if any. Prior to the actual save of the first saveset on a NetWorker client, savepnpc performs pre-pro- cessing commands if any exists in the /nsr/res/<grpname>.res file, and at the end of the save of the last save set on the client, the post- processing commands (if any) will be invoked. It is possible to setup multiple clients in a savegroup such that each client can run different pre and post commands. The <grpname>.res file resides on the client machine and is unique to that host. In the condition of failure to run the pre-processing commands, savepnpc aborts itself. All results are logged in /nsr/logs/savepnpc.log file on the client. A timeout condition can be set by the user to indicate at which point in time the post-processing commands need to be run without waiting for all the save sets to be backed up. This timeout attribute resides in the /nsr/res/<grpname>.res file. The timeout should be specified in double quotes, in such a format that nsr_getdate() can understand (see nsr_getdate(3)). Also, abort precmd with group attribute exists in the /nsr/res/<grpname>.res file. This can be set to Yes or No. If set to Yes, the precmd will terminate if the particular savegrp is aborted. If it is set to No, the precmd will run to completion even after the abnormal exit of the savegrp session. An example of /nsr/res/<grpname>.res can be described as: type: savepnpc; precmd: /bin/true; pstcmd: /bin/true, "/bin/sleep 5"; timeout: "12:00pm"; abort precmd with group: No; The precmd field can be manually modified to contain any number of com- mands that are needed to be run at the beginning of the save of the 1st save set. The pstcmd is to hold any commands that are needed to be run at the end of the save of the last save set. The post-processing com- mands are run after the save of the last save set or the timeout condi- tion, whichever comes first. Note that on Windows Networker Clients, the shell should be set to "cmd.exe"and the Shell flag should be set to "/c", for running the precmd and postcmd. This will force the OS to close all the opened File Descriptors and other resources in a timely manner, after the execution of the commands. Also, for both the precmd and the pstcmd, on all Networker Clients, its best to redirect the out- put(stdout and stderr) to another file, to avoid unclosed File Descrip- tors, after the commands have completed executing. An example of precmd and pstcmd for Windows Clients is shown below: precmd: cmd.exe /c start_pre_cmd > pre_result.txt 2>&1 pstcmd: cmd.exe /c start_post_cmd > post_result.txt 2>&1
-b pool Specifies a particular destination pool for the save. -c client-name Specifies the client name for starting the save session. This is useful on clients with multiple network interfaces, and mul- tiple host names. It can be used to create multiple index databases for the same physical client with multiple network interfaces. This does not specify the network interface to use. This is specified in the server network interface attribute of the client resource (see nsr_client(5)). This option can also be used on a cluster when performing manual saves, or in specifying a non-default backup command for scheduled saves. This option directs NetWorker to override the cluster path-ownership rules, saving the path argument(s) as belonging to client-name and mak- ing index entries in the index for client-name instead of using the name of the physical host or virtual host which owns the path, according to the cluster management software. Refer to pathownerignore(5) for more information about path-ownership rules. -e expiration Set the date (in nsr_getdate(3) format) when the saved data will expire. When a save set has an explicit expiration date, the save set remains both browsable and non-recyclable until it expires Thus, the explicitly provided expiration overrides the existing browse and retention times specified in the client pol- icy and the browse and retention times get changed to the expiry time. The "-e exp_time" option cannot be used in conjunction with "-w browse_time" or "-y reten_time". By default, no explicit expiration date is used and the client's longest browse and longest retention policy are used. -f dirfile The file from which to read prototype default directives (see nsr(5)). A dirfile of - causes the default directives to be read from standard input. -o save_operations Save Operations of the form KEYWORD:TOKEN=STATE[;KEY- WORD:TOKEN=STATE;...]". The following form is used to configure VSS saves on Windows 2003. Examples: "vss:*=off" Turn off VSS. "vss:Microsoft Exchange Writer=off" Disable a writer. "vss:C:=off" Disable VSS for a drive. The following forms are specified by savegrp program during scheduled backups. Manual specifications of these forms are not supported. Backup of renamed directories, in the form of: "RENAMED_DIRECTORIES:index_lookup=on" Enables support for the backup of renamed directo- ries. The save program performs a lookup in the client file index to determine whether a directory has been renamed. If a directory has been renamed, all of the files and subdirectories under the directory will be backed up. "RENAMED_DIRECTORIES:index_lookup=off" Disables the backup of renamed directories. Backup of non-ASCII save set names. See nsr_client(5) and the Admin Guide for more information on the forms for non-ASCII names and how to enable or disable support for renamed directories. -g group This option is used by savegrp(8) and savefs(8) to denote the group of the save (see nsr_client(5) and nsr_group(5)) and is used by the NetWorker server to select the specific media pool. -i Ignores any .nsr (UNIX) or nsr.dir (Windows) directive files as they are encountered in the subdirectory structures being saved. -J storage-node-name Specifies which host to use as the storage node for the backup (see nsr_storage_node(5)). -l level The level of the save. This option is used by savegrp(8) and savefs(8) to specify a particular level for a scheduled save, to be stored in media database. This option is ignored by man- ual save command and backup is performed at level adhoc. The level information is not used by save to determine whether a file should be backed up during scheduled backup, but parameter on -t option is used instead. -m masquerade Specifies the tag to precede the summary line. This option is used by savegrp(8) and savefs(8) to aid in savegrp summary noti- fications. savepnpc(8) also uses this tag to identify client operations on the savegrp's work list that should complete before pstclntsave(8) will trigger its post-processing. -n No save. Estimate the amount of data which will be generated by the save, but do not perform the actual save. -q Quiet. Displays only summary information and error messages. -s server Specifies which machine to use as the NetWorker server. -t date The date (in nsr_getdate(3) format) by which files must have been modified for them to be saved. This option is used by savegrp(8) and savefs(8) to perform scheduled saves by consult- ing with the media database to determine the appropriate time value based on the previous saves for the save set and the level of the scheduled save. On Windows, file modification/change time refers to Last Written time, Creation time and the Archive file attribute of a file. All of these are used to determine whether a file needs to be backed up. If the Archive file attribute is set, the file will always be backed up, since some older filesystems may not have the proper file creation time, unless NSR_AVOID_ARCHIVE environ- ment variable is set (to a value other than "no"). -u Stop the save if an error occurs. The save program normally treats errors as warnings and continues to save the rest of the files in the backup. When this option is set, errors will cause save to exit and abort the save. This option is not recommended for general use, although it can be useful when a group of files needs to be backed up as a set. -v Verbose. Causes the save program to provide great detail about the save as it proceeds. -y retention Sets the date (in nsr_getdate(3) format) when the saved data will become recyclable. The special value forever is used to indicate that a volume that never expires (i.e. an archive vol- ume) must be used. By default, the server determines this date for the save set based on the retention policies in effect. This option allows overriding the existing policies on a save by save basis. -w browse_time Sets the date (in nsr_getdate(3) format) after which this save set will no longer be browsable. By default, the server deter- mines the browse date for the save set based on the browse poli- cies in effect. This option allows overriding the existing policies on a save by save basis. -x Cross mount points. This option is only applicable to manual save command. When -x option is specified with a (save set) path, the mount point under this path is crossed and files in the mounted file system are backed up. When -x option is not specified, only the local files and directories of the path are backed up. This option has no effect and is ignored when a mount point (or file/subdirectory path under it) is specified as the (local) path to be backed up for the manual save command, which gener- ally requires the -L option. For example, if /tmp_mnt/pumbaa is a mount point for pum- baa:/space, the following three commands behave differently with the specification of -x option: save -x /tmp_mnt follows mount points, backs up the local files and directories of /tmp_mnt along with files and directories of /tmp_mnt/pumbaa save /tmp_mnt does not cross mount points, only local files and directories of /tmp_mnt are backed up save [-x] /tmp_mnt/pumbaa[/...] when mount point is specified as the (save set) path, "-x" option is ignored and an error message is displayed to indicate "-L" option is required on most platforms For Windows, mount point refers to an alternative path for a mounted volume on the same machine. For example, H:\tmp_mnt\d_drive may be defined as a mount point to the local volume (or drive) D:. -B Force save of all connecting directory information from root ('/') down to the point of invocation. -E Estimate the amount of data which will be generated by the save, then perform the actual save. Note that the estimate is gener- ated from the inode information; thus, the data is only read once. -F file Only save files whose change time is newer than the file modifi- cation date of file. For Windows, see -t option for more information on file change time. -I input_file In addition to taking the paths to save from the command line, read paths to save from the named file. The paths must be listed one per line. If no paths are specified on the command line, then only those paths specified in the file will be saved. -K Does not build connecting directory index entries. -L Local. Saves will be performed from the local NetWorker client, even when files are from a network file server. To recover these files, run recover(8) with the -c client arguments, where client is the name of the NetWorker client that did the save. -LL In addition to treating the backup as a local backup, causes an extra line to be printed at the end of the completion output of the form 'complete savetime=number', where number is the save- time of the save set created by this backup. This option is meant to be used by the savegrp(8) command in performing auto- matic cloning. -N name The symbolic name of this save set. By default, the most common prefix of the path arguments is used as the save set name. If the -N option is used when saving any of the SYSTEM save sets (SYSTEM STATE, SYSTEM FILES, and SYSTEM DB), the path must also be specified and must match the name value assigned with the -N option. -S Allows only save set recovery. This performs the save without creating any index entries. This means that the save set will not be browsable, although save set recovery may be used to recover the data. -V Prevent the OFC mechanism from creating a point-in-time copy of the source volume. (Included for compatibility with NT Net- Worker servers.) -W width The width used when formatting the summary information output. Valid values for width are integer values from 1 to 10000. If the supplied width is too small for the summary to fit in, the width will be silently adjusted upwards as necessary. If the supplied width is larger than the minimum needed, then spaces will be used to pad the summary to the correct width. Note that if no -W argument is supplied then there is no fixed width used, and the summary simply expands to whatever minimum width is nec- essary.
curses(3X), nsr_getdate(3), nsr(5), nsr(8), nsr_client(5), nsr_device(5), nsr_group(5), nsr_service(5), nsrd(8), nsrim(8), nsrindexd(8), nsrmm(8), nsrmmd(8), nsrwatch(8), recover(8), savefs(8), savegrp(8), pathownerignore(5).
Exit Codes 0 Normal exit. This means that a save set was correctly created on the server. Messages about individual file backup failures are warnings, and do not cause abnormal exit. <>0 Abnormal exit. A save set was not correctly created on the server. Messages host: saveset level=level, size time count files. This message (with the appropriate client host name, saveset name, level, total save set size, elapsed time, and file count) is printed whenever save is run by savegrp(8) and exits nor- mally. host: filename: warning Messages of this form are warnings about difficulties backing up individual files. Such messages do not normally cause the save to fail, and therefore may appear in the save output found in the Successful section of the ``Savegroup Completion'' message. path: File index could not be obtained due to <reason>. Contents of this directory may not be properly backed up. There was an error in retrieving an on-line file index record for the path with renamed directory support. Run nsrck (8) and turn off the "Backup renamed directories" attribute in Client resource ( see nsr_client(5)) to re-run the group if the prob- lem persists.
NetWorker 8.0.1 Dec 02, 12 save(8)