The archive command archives a single file, selected files, or all files in a directory and its subdirectories on a server.
Archive files that you want to preserve in their current condition. To release storage space on your workstation, delete files as you archive them using the deletefiles option. Retrieve the archived files to your workstation whenever you need them again.
Use the snapshotroot option with the archive command along with an independent software vendor application that provides a snapshot of a logical volume to associate the data on the local snapshot with the real file space data that is stored on the Tivoli® Storage Manager server. The snapshotroot option does not provide any facilities to take a volume snapshot, only to manage data that is created by a volume snapshot.
AIX® only:
You can enable snapshot-based file archive by using the option snapshotproviderfs=JFS2.
This command is valid for all clients.
.-----------------. V | >>-Archive------ --filespec---+--+------------+---------------->< '- --options-'




For example, if the filespec
is /home/amr/ice.doc /home/amr/fire.doc, then /home and /home/amr might
be archived twice. The file objects ice.doc,
and fire.doc, are archived only once.
For example, if the filespec is C:\proposals\drafts\ice.doc
C:\proposals\drafts\fire.doc, then C:\proposals and C:\proposals\drafts might
be archived twice. The file objects ice.doc and fire.doc are
archived only once.




If you archive a file system,
include a trailing slash (/home/).



There is a limit of 20 operands.
This limit prevents excessive sessions that are caused when wildcards
are expanded by the UNIX shell
command processor. You can prevent shell expansion from causing you
to go over the 20-operand limit by placing quotation marks around
file specifications that contain wildcards ("home/docs/*").



You can use the removeoperandlimit option
to specify that Tivoli Storage Manager removes
the 20-operand limit. If you specify the removeoperandlimit option,
the 20-operand limit is not enforced and is restricted only by available
resources or other operating system limits. For example, remove the
20 operand limit to archive 21 file specifications: selective -removeoperandlimit filespec1 filespec2 ... filespec21
If you archive a file system, include a trailing
slash (C:\).
You can specify as many file specifications
as available resources or other operating system limits allow.| Option | Where to use |
|---|---|
| archmc | Command line only. |
![]() ![]() ![]() ![]() archsymlinkasfile |
![]() ![]() ![]() ![]() Client user-options
file (dsm.opt) or command line. |
![]() autofsrename |
![]() Client options file
(dsm.opt) only. |
changingretries |
Client options file
(dsm.opt) or command line. |
![]() ![]() ![]() ![]() changingretries |
![]() ![]() ![]() ![]() Client system options
file or command line. |
compressalways |
Client options file
(dsm.opt) or command line. |
![]() ![]() ![]() ![]() compressalways |
![]() ![]() ![]() ![]() Client user-options
file (dsm.opt) or command line. |
compression |
Client options file
(dsm.opt) or command line. |
![]() ![]() ![]() ![]() compression |
![]() ![]() ![]() ![]() dsm.sys file within
a server stanza or command line. |
| deletefiles | Command line only. |
| description | Command line only. |
| dirsonly | Command line only. |
![]() ![]() ![]() ![]() encryptiontype |
![]() ![]() ![]() ![]() dsm.sys file within
a server stanza. |
encryptiontype |
Client options file
(dsm.opt). |
![]() ![]() ![]() ![]() encryptkey |
![]() ![]() ![]() ![]() dsm.sys file within
a server stanza. |
encryptkey |
Client options file
(dsm.opt). |
| filelist | Command line only. |
| filesonly | Command line only. |
postsnapshotcmd |
Client options file
(dsm.opt) or with the include.fs option. |
![]() ![]() ![]() ![]() preservelastaccessdate |
![]() ![]() ![]() ![]() Client user-options
file (dsm.opt) or command line. |
preservelastaccessdate |
Client options file
(dsm.opt) or command line. |
presnapshotcmd |
Client options file
(dsm.opt) or with the include.fs option. |
![]() ![]() ![]() ![]() removeoperandlimit |
![]() ![]() ![]() ![]() Command line only. |
skipntpermissions |
Client options file
(dsm.opt) or command line. |
skipntsecuritycrc |
Client options file
(dsm.opt) or command line. |
![]() snapshotcachesize |
![]() Client options file
(dsm.opt) or include.fs option. |
| snapshotroot | Command line only. |
| subdir | Client options file (dsm.opt) or command line. |
| tapeprompt | Client options file (dsm.opt) or command line. |
| v2archive | Command line only. |




Task



Archive a single file that is named budget in
the /home/proj1 directory. Command: archive /home/proj1/budget
Task
Archive a single file that is named budget.jan in
the c:\plan\proj1 directory. Command: archive c:\plan\proj1\budget.jan




Task



Archive all files in the /home/proj1 directory
with a file extension of .txt. Command: archive "/home/proj1/*.txt"
Task
Archive all files in the c:\plan\proj1 directory
with a file extension of .txt. Command: archive c:\plan\proj1\*.txt




Task



Archive all files in the directory tree that is headed by the /home directory. Command: archive -subdir=yes "/home/*"
Task
Archive all files in the c:\ drive. Command: archive -subdir=yes c:\*.*
Task
Archive all files in the Microsoft Dfs
volume, MyDfsVolume. You must specify subdir=yes to
archive all files in the volume. Command: archive \\myserver\mydfsroot\mydfsvolume\*.* -subdir=yes




Task



Assuming that you initiated a snapshot of the /usr file
system and mounted the snapshot as /snapshot/day1,
archive the /usr/dir1/sub1 directory tree from the
local snapshot and manage it on the Tivoli Storage Manager server
under the file space name /usr. Command: dsmc archive /usr/dir1/sub1/ -subdir=yes -snapshotroot=/snapshot/day1
Task
Assuming that you initiated a snapshot of the C:\ drive
and mounted the snapshot as \\florence\c$\snapshots\snapshot.0,
archive the c:\dir1\sub1 directory tree from the
local snapshot and manage it on the Tivoli Storage Manager server
under the file space name C:. Command: dsmc archive c:\dir1\sub1\* -subdir=yes -snapshotroot=\\florence\c$\snapshots\snapshot.0