SAVE(8)

NAME
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.

SYNOPSIS
save [ -BEiKLnquSVvx ] [ -s server ] [ -c client-name ] [ -N name ] [ -e retention_time ] [ -f dirfile ] [ -b pool ] [ -F file ] [ -I input_file ] [ -g group ] [ -l level ] [ -t date ] [ -m masquerade ] [ -w browse_time ] [ -W width ] [ path ... ]

savepnpc [ -BEiKLnquSVvx ] [ -s server ] [ -c client-name ] [ -N name ] [ -e retention_time ] [ -f dirfile ] [ -b pool ] [ -F file ] [ -I input_file ] [ -g group ] [ -l level ] [ -t date ] [ -m masquerade ] [ -W width ] [ -w browse_time ] [ path ... ]

DESCRIPTION
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 X Window System based nwadmin(8) 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 directory 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.

The directive files (see nsr(5)) encountered in each directory are read by default, and they contain special instructions directing how particular files are to be saved (i.e. compressed, skipped, etc.). These files are named '.nsr'.

Each file in the subdirectory structures specified by the path arguments 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)).

Details about handling media are discussed in nsrmm(8) and nsr_device(5).

savepnpc consists of the same command options as save and behaves just like save. In addition, prior to the actual save on a Networker client, savepnpc performs pre-processing 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. 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 such a format that nsr_getdate() can understand (see nsr_getdate(3)).

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";

The precmd field can be manually modified to contain any number of commands 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 commands are run after the save of the last save set or the timeout condition, whichever comes first.

OPTIONS

-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 multiple host names. It can be used to create multiple index databases for the same physical client. 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 making 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.

-e retention_time
    Sets the date (in nsr_getdate(3) format) when this save set will become recyclable. 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.

-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.

-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 directive files as they are encountered in the subdirectory structures being saved.

-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.

-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 notifications. 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 consulting 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.

-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.

-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 determines the browse date for the save set based on the browse policies in effect. This option allows overriding the existing policies on a save by save basis.

-x  Cross mount points.

-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 generated from the inode information; thus, the data is only read once.

-F file
    Only save files whose change time is newer than the file modification date of file.

-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 additional 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 savetime of the save set created by this backup. This option is meant to be used by the savegrp(8) command in performing automatic 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.

-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 NetWorker servers.)

-W width
    The width used when formatting summary information output.

SEE ALSO
curses(3X), nsr_getdate(3), nwadmin(8), 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)

DIAGNOSTICS

  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 normally.

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 ``Savegroup Completion'' message's Successful section.