JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Sun QFS and Sun Storage Archive Manager 5.3 Reference Manual     Sun QFS and Sun Storage Archive Manager 5.3 Information Library
search filter icon
search icon

Document Information

Preface

1.  User Commands (Man Pages Section 1)

alterfile(1)

archive(1)

dvt(1)

genfile(1)

pdvt(1)

release(1)

request(1)

schproj(1)

sdu(1)

segment(1)

setfa(1)

sfind(1)

sls(1)

squota(1)

ssum(1)

stage(1)

2.  Maintenance Commands (Man Pages Section 1M)

3.  Library Functions (Man Pages Section 3)

4.  Library Functions (Man Pages Section 3X)

5.  File Formats (Man Pages Section 4)

6.  Standards, Environment, and Macros (Man Pages Section 5)

7.  Device and Network Interfaces (Man Pages Section 7)

archive(1)

NAME
     archive - Sets archive attributes and schedules files for
     immediate archiving

SYNOPSIS
     archive [-C] [-I] [-d] [-f] [-n] [-w] [-W] [-c copy_no]
     filename ...

     archive [-C] [-I] [-d] [-f] [-n] [-w] [-W] [-c copy_no] -r
     dirname ...[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.

     -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 dirname  ...
               Recursively archives or sets attributes for files
               contained in the specified dirname and its
               subdirectories.  More than one dirname can be
               specified.

               If used in conjunction with other command line
               options, the -r dirname option must be specified
               prior to any individual files listed (using the
               filename argument), but it must be specified after
               any other individual options.

     filename  ...
               Specifies one or more file names.  If the -r
               dirname option is also specified, individual
               filename arguments must appear after all dirname
               specifications.

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)