
You can archive data when you want to preserve copies of files in their current state, either for later use or for historical or legal purposes.
You can archive a single file, a group of files, or all the files in a directory or subdirectory. After you archive a file, you can delete the original file from your workstation. Use the archive command to archive files.
The following table shows examples of how to use the archive command to archive objects.
| Task | Command | Considerations |
|---|---|---|
| Archive all files in the c:\plan\proj1 directory with a file extension of .txt. | dsmc archive c:\plan\proj1\*.txt | Use wildcards to archive more than one file at a time. |
| Archive all files in the c:\small\testdir directory and delete the files on your workstation. | dsmc archive c:\small\testdir\* -deletefiles | Retrieve the archived files to your workstation whenever you need them again. For more information about the deletefiles option, see Deletefiles. |
| Archive the c:\proj1\h1.doc file and the c:\proj2\h2.doc file | dsmc archive c:\proj1\h1.doc c:\proj2\h2.doc | You can specify as many files to be archived as the resources and operating system limits permit. Separate the files to be archived with a space. For more information about the filelist option, see Filelist. |
| Archive a list of files in the c:\filelist.txt file. | dsmc archive -filelist=c:\filelist.txt | Use the filelist option to process a list of files. For more information about the filelist option, see Filelist. |
| Archive the a:\ch1.doc file and assign a description to the archive. | dsmc archive a:\ch1.doc -description="Chapter 1, first version" | If you do not specify a description with the archive command, the default is Archive Date:x, where x is the current system date. For more information about the description option, see Description. |
| Archive all the files in the d:\proj directory and its subdirectories. | dsmc archive d:\proj\ -subdir=yes | For more information about the subdir option, see Subdir. |
| Use the v2archive option with the archive command to archive only files in the c:\relx\dir1 directory. | dsmc archive c:\relx\dir1\ -v2archive | Tivoli® Storage Manager archives only files in the c:\relx\dir1 directory. Directories that exist in the path are not processed. For more information about the v2archive option, see V2archive. |
| Use the archmc option with the archive command to specify the available management class for the policy domain to which you want to bind your archived files. | dsmc archive –archmc=RET2YRS c:\plan \proj1\ budget.jan\* | For more information about the archmc option, see Archmc. For more information about management classes, see Storage management policies . |
| Assume that you initiated a snapshot of the C:\ drive and mounted the snapshot as the logical volume \\florence\c$\snapshots\ snapshot.0. You 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:\. |
|
For more information, see Snapshotroot. |