Archive

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 operating systemsAIX® only: You can enable snapshot-based file archive by using the option snapshotproviderfs=JFS2.

Supported Clients

This command is valid for all clients.

Syntax

Read syntax diagramSkip visual syntax diagram
            .-----------------.                   
            V                 |                   
>>-Archive------ --filespec---+--+------------+----------------><
                                 '- --options-'   

Parameters

filespec
Specifies the path and name of the file you want to archive. Use wildcard characters to include a group of files or to include all files in a directory.
To include multiple file specifications, separate eachfilespec parameter with a space character. If multiple file specifications are included, and two or more of the specifications have common parent directories, then it is possible for the common directory objects to be archived more than once. The conditions under which this behavior occurs are runtime-dependent, but the behavior itself has no adverse effects.

AIX operating systemsHP-UX operating systemsLinux operating systemsMac OS X operating systemsOracle Solaris operating systemsFor 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.

Windows operating systemsFor 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 want to avoid including the shared parent directory more than once, use separate, non-overlapping archive commands to archive each file specification.
AIX operating systemsHP-UX operating systemsLinux operating systemsMac OS X operating systemsOracle Solaris operating systemsIf you archive a file system, include a trailing slash (/home/).
AIX operating systemsHP-UX operating systemsLinux operating systemsMac OS X operating systemsOracle Solaris operating systemsThere 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/*").
AIX operating systemsHP-UX operating systemsLinux operating systemsMac OS X operating systemsOracle Solaris operating systemsYou 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
Windows operating systemsIf you archive a file system, include a trailing slash (C:\).
Windows operating systemsYou can specify as many file specifications as available resources or other operating system limits allow.
You can use the filelist option, instead of file specifications, to identify which files to include in this operation. However, these two methods are mutually exclusive. You cannot include file specification parameters and use the filelist option. If the filelist option is specified, any file specifications that are included are ignored.
Table 1. Archive command: Related options
Option Where to use
archmc Command line only.
AIX operating systemsHP-UX operating systemsLinux operating systemsOracle Solaris operating systemsMac OS X operating systemsarchsymlinkasfile AIX operating systemsHP-UX operating systemsLinux operating systemsOracle Solaris operating systemsMac OS X operating systemsClient user-options file (dsm.opt) or command line.
Mac OS X operating systemsWindows operating systemsautofsrename Mac OS X operating systemsWindows operating systemsClient options file (dsm.opt) only.
Windows operating systemschangingretries Windows operating systemsClient options file (dsm.opt) or command line.
AIX operating systemsHP-UX operating systemsLinux operating systemsOracle Solaris operating systemsMac OS X operating systemschangingretries AIX operating systemsHP-UX operating systemsLinux operating systemsOracle Solaris operating systemsMac OS X operating systemsClient system options file or command line.
Windows operating systemscompressalways Windows operating systemsClient options file (dsm.opt) or command line.
AIX operating systemsHP-UX operating systemsLinux operating systemsOracle Solaris operating systemsMac OS X operating systemscompressalways AIX operating systemsHP-UX operating systemsLinux operating systemsOracle Solaris operating systemsMac OS X operating systemsClient user-options file (dsm.opt) or command line.
Windows operating systemscompression Windows operating systemsClient options file (dsm.opt) or command line.
AIX operating systemsHP-UX operating systemsLinux operating systemsOracle Solaris operating systemsMac OS X operating systemscompression AIX operating systemsHP-UX operating systemsLinux operating systemsOracle Solaris operating systemsMac OS X operating systemsdsm.sys file within a server stanza or command line.
deletefiles Command line only.
description Command line only.
dirsonly Command line only.
AIX operating systemsHP-UX operating systemsLinux operating systemsOracle Solaris operating systemsMac OS X operating systemsencryptiontype AIX operating systemsHP-UX operating systemsLinux operating systemsOracle Solaris operating systemsMac OS X operating systemsdsm.sys file within a server stanza.
Windows operating systemsencryptiontype Windows operating systemsClient options file (dsm.opt).
AIX operating systemsHP-UX operating systemsLinux operating systemsOracle Solaris operating systemsMac OS X operating systemsencryptkey AIX operating systemsHP-UX operating systemsLinux operating systemsOracle Solaris operating systemsMac OS X operating systemsdsm.sys file within a server stanza.
Windows operating systemsencryptkey Windows operating systemsClient options file (dsm.opt).
filelist Command line only.
filesonly Command line only.
Windows operating systemspostsnapshotcmd Windows operating systemsClient options file (dsm.opt) or with the include.fs option.
AIX operating systemsHP-UX operating systemsLinux operating systemsOracle Solaris operating systemsMac OS X operating systemspreservelastaccessdate AIX operating systemsHP-UX operating systemsLinux operating systemsOracle Solaris operating systemsMac OS X operating systemsClient user-options file (dsm.opt) or command line.
Windows operating systemspreservelastaccessdate Windows operating systemsClient options file (dsm.opt) or command line.
Windows operating systemspresnapshotcmd Windows operating systemsClient options file (dsm.opt) or with the include.fs option.
AIX operating systemsHP-UX operating systemsLinux operating systemsOracle Solaris operating systemsMac OS X operating systemsremoveoperandlimit AIX operating systemsHP-UX operating systemsLinux operating systemsOracle Solaris operating systemsMac OS X operating systemsCommand line only.
Windows operating systemsskipntpermissions Windows operating systemsClient options file (dsm.opt) or command line.
Windows operating systemsskipntsecuritycrc Windows operating systemsClient options file (dsm.opt) or command line.
AIX operating systemsLinux operating systemssnapshotcachesize AIX operating systemsLinux operating systemsClient 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.

Examples

AIX operating systemsHP-UX operating systemsLinux operating systemsOracle Solaris operating systemsMac OS X operating systemsTask
AIX operating systemsHP-UX operating systemsLinux operating systemsOracle Solaris operating systemsMac OS X operating systemsArchive a single file that is named budget in the /home/proj1 directory.

Command: archive /home/proj1/budget

Windows operating systemsTask
Windows operating systemsArchive a single file that is named budget.jan in the c:\plan\proj1 directory.

Command: archive c:\plan\proj1\budget.jan

AIX operating systemsHP-UX operating systemsLinux operating systemsOracle Solaris operating systemsMac OS X operating systemsTask
AIX operating systemsHP-UX operating systemsLinux operating systemsOracle Solaris operating systemsMac OS X operating systemsArchive all files in the /home/proj1 directory with a file extension of .txt.

Command: archive "/home/proj1/*.txt"

Windows operating systemsTask
Windows operating systemsArchive all files in the c:\plan\proj1 directory with a file extension of .txt.

Command: archive c:\plan\proj1\*.txt

AIX operating systemsHP-UX operating systemsLinux operating systemsOracle Solaris operating systemsMac OS X operating systemsTask
AIX operating systemsHP-UX operating systemsLinux operating systemsOracle Solaris operating systemsMac OS X operating systemsArchive all files in the directory tree that is headed by the /home directory.

Command: archive -subdir=yes "/home/*"

Windows operating systemsTask
Windows operating systemsArchive all files in the c:\ drive.

Command: archive -subdir=yes c:\*.*

Windows operating systemsTask
Windows operating systemsArchive 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

AIX operating systemsHP-UX operating systemsLinux operating systemsOracle Solaris operating systemsMac OS X operating systemsTask
AIX operating systemsHP-UX operating systemsLinux operating systemsOracle Solaris operating systemsMac OS X operating systemsAssuming 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

Windows operating systemsTask
Windows operating systemsAssuming 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