Skip Headers
Oracle Hierarchical Storage Manager and QFS Software Command Reference
Section 1: User Commands
Release 6.1.1
E70305-03

NAME

archive - Sets archive attributes and schedules files for immediate archiving

SYNOPSIS

archive [-C] [-I] [-d] [-f] [-i input_file] [-n] [-w] [-W] [-c copy_no] [-r] [filename …]

AVAILABILITY

SUNWsamfs

DESCRIPTION

The archive command sets archive attributes on files and directories. It also specifies archiving for one or more files.

By default, a file is archived some time after its creation. Your site's default archiving operation is configured by the system administrator. If neither the -d nor the -n options are specified, files are marked to be archived immediately.

When archive attributes are set on a directory, all files or directories subsequently created in that directory inherit those attributes.

OPTIONS

This command accepts the following arguments:

-C

Specifies concurrent archiving, which means that a file can be archived even if opened for write. The archive time is regulated by the modification time. By default, archiving is disallowed while a file is opened for write. Note that NFS files are not opened and are concurrently archived by default.

Concurrent archiving is useful for databases, however caution is advised because archiving can occur while the file is being modified. This can result in wasted media.

-I

Support inconsistent archive copies. This means that an archive copy can be created even if the file is modified while it is being copied to the media. By default, the archive copy is disallowed if the file is inconsistent, that is, if the file is modified while it was being copied to the media. Note, the file cannot be staged if the copy is marked inconsistent; however, after a samfsrestore, the inconsistent flag is removed from the archive copy and the file can be staged.

Inconsistent archiving is useful for databases, however caution is advised because it a file can be staged from an inconsistent copy after the file is restored using samfsrestore.

-d

Resets the archive attributes on a file to the default attributes. When this option is specified, attributes are first reset to the default, and then all other attribute-setting options are processed. The only action taken is that attributes are reset. No archiving is performed.

-f

Suppresses error messages.

-i input_file

The name of a file containing file names to be processed. Every file named in the input file must be on a separate line; leading and trailing white space is removed. If the input file name is specified as a single dash (`-') standard input is read. This option cannot be used when file names are specified on the command line. If the -r option is specified its behavior is applied to all files in the input file.

-n

Disables archiving for a file. This option specifies that a file never be archived. Only a superuser can set this attribute on a file. When this option is specified, the only action taken is that the attribute is set.

This option cannot be specified for a file that has the checksum use attribute set. This attribute is set by using the ssum (1) command -u option. For more information on ssum (1), see the ssum (1) man page.

If the archiver file system examination method has been set to scandirs, setting this option on a directory will prevent the archiver from examining the directory, and all of its subdirectories. This behavior should only be used for directory trees that have all archive copies made for all files. And, no changes should be made to any of the subdirectories or files.

-w

Waits for a file to have at least 1 archive copy before completing. This option cannot be specified on the command line in conjunction with the -W, -d, or -n options. Note that it may take a long time for a file to be archived.

Note that when archiving many files at once (such as with archive -r -w .) the "-w" option causes each file to be completely archived before the archive request for the next file is issued. In order to get the best performance in this situation, do the following:

archive -r . archive -r -w .

-W

Waits for a file to have all its required archive copies before completing. This option cannot be specified on the command line in conjunction with the -w, -d, or -n options. Note that it may take a long time for a file to be archived.

Note that when archiving many files at once (such as with archive -r -W .) the "-W" option causes each file to be completely archived before the archive request for the next file is issued. In order to get the best performance in this situation, do the following:

archive -r . archive -r -W .

-c copy_no

Specify 1, 2, 3, or 4 for copy_no. If one or more -c options are specified, only those archive copies (copies 1, 2, 3, or 4) are affected. The -c option may only be used with the -w and -r options.

If used without any other options (or just the -r option), archive copy copy_no will be made immediately.

If used with the -w option, (with or without the -r option), the command will wait for the archive copy copy_no to be made.

-r

Recursively archives or sets attributes for files contained in the supplied file name(s) and their subdirectories. Symbolic links that are encountered when this option is in effect are not traversed.

filename  …

Specifies one or more file names. Specifying file names is mutually exclusive with the -i option. If a single file name is specified as a single dash (`-') archive reads the list of files from standard input.

EXAMPLES

The following command resets all attributes to the default settings on all files in the current directory and all files in subdirectories beneath:

archive -d -r .

SEE ALSO

ssum (1), stage (1), release (1).