To archive files, you need to specifically select the files to archive. You can select the files by using a file specification or by choosing them from a directory tree.
Your administrator might have set up schedules to archive certain files on your workstation automatically. See Chapter 5. "Automating ADSM Tasks" for information on checking and running the schedules available to you. The following sections cover how to archive files without using a schedule.
To archive a file or a group of files, follow these steps:
Follow these steps to select only the files that match your search criteria:
This section discusses some advanced considerations for archiving files. You do not need to understand this information in order to use ADSM for basic work.
You can use the ARCHIVE command to archive files. Use wildcards to archive more than one file at a time. You can archive all the files in a directory, and you can use the SUBDIR=YES option to include files in all subdirectories under that directory in the archive. You can also use the DELETEFILES option if you want ADSM to delete the files from your local workstation after they are archived and committed to ADSM storage.
For example, to archive the files in the /home/jones/proj directory and the files in its subdirectories, use:
dsmc archive /home/jones/proj/ -subdir=yes -deletefiles
You can use more than one file specification on the ARCHIVE command. For example, to archive the /home/jones/h1.doc and /home/jones/test.doc files, use:
dsmc archive /home/jones/h1.doc /home/jones/test.doc
Use the description option to assign a description to the archive:
dsmc archive /home/jones/h1.doc -description="Chapter 1, first version"
When the ARCHIVE command completes, ADSM provides you with statistics similar to those shown in the GUI's Archive Status window. Similar statistics are produced by the incremental and selective commands. These also show up in the schedule log for scheduled commands. See Archive for more information about the ARCHIVE command.
When you archive a file, ADSM saves standard UNIX access permissions assigned to the file. Depending on your operating system, it also saves extended permissions. For example, for files on an AIX workstation, ADSM saves access control lists.
If you are a user, and you archive a file to which you have read access, you own the archived copy of the file. You are the only user who can retrieve the archived file unless you grant access to another user.
When you archive a symbolic link, ADSM archives the file to which the symbolic link points. It does not archive path information for the directory.
If you archive a symbolic link that points to a directory, ADSM archives the files contained in the directory (and its subdirectories if the SUBDIR option is set to yes) under the name of the symbolic link.
When you archive a file that contains a hard link to another file, ADSM stores both the link information and the data file on the ADSM server.
When you retrieve a file that contains hard link information, ADSM attempts to reestablish the links. If only one of the hard-linked files is still on your workstation, and you retrieve both files, ADSM retrieves both files and hard-links the retrieved files.
The one exception to this procedure occurs if you archive two files that are hard-linked together, and then break the connection between them on your workstation. The two files then contain separate data files. If you retrieve the two files from the ADSM server, ADSM respects the current file system and does not restore the hard link.
Problems can occur if you archive only one file of a hard-linked pair. For example, files texta and textb contain a hard link to each other. You archive texta, and then edit textb and make some changes. If you retrieve texta, the changes you made to textb are lost.
To ensure that hard-linked files remain synchronized, always archive all files that have hard links to each other at the same time, and retrieve those same files together.
You can delete archive copies if you decide you no longer need them. Unlike backup versions, you can delete individual archive copies without deleting the entire file space. To delete an archive copy:
If you are using commands, you can delete archive copies with the DELETE ARCHIVE command.
For example, to delete the file /home/jones/t.exe, use:
dsmc delete archive /home/jones/t.exe