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 IBM® Storage Protect 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.
Supported Clients
This command is valid for all clients.
Syntax
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.
| 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. |
Examples



Task


Archive a single file that is named budgetin the/home/proj1directory.Command: archive
/home/proj1/budget
Task
Archive a single file that is named budget.janin thec:\plan\proj1directory.Command:
archive c:\plan\proj1\budget.jan


Task


Archive all files in the /home/proj1directory with a file extension of.txt.Command:
archive "/home/proj1/*.txt"
Task
Archive all files in the c:\plan\proj1directory 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 /homedirectory.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 /usrfile system and mounted the snapshot as/snapshot/day1, archive the/usr/dir1/sub1directory tree from the local snapshot and manage it on the IBM Storage Protect 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 thec:\dir1\sub1directory tree from the local snapshot and manage it on the IBM Storage Protect server under the file space nameC:.Command:
dsmc archive c:\dir1\sub1\* -subdir=yes -snapshotroot=\\florence\c$\snapshots\snapshot.0
