accurev archive [ -E <element-type(s)> ] [ -i ] [ -p
<depot> ]
[ -a | -I
<stream-category(s)> ] [ -s
<stream> ]
[ -t
<transaction-range> ] [ -c
<comment> ] [ -R ]
{ [ -Fx ] -l
<list-file> | <element-list> }
The archive command processes versions of one or more file elements, shifting the versions’ container files from
normal status to
archived status. It also moves the container files from the depot’s file storage area to a special
gateway area (located under the depot directory).
archive determines the set of versions to archive as follows:
Using the -i option (in addition to the other options described above) generates an XML-format listing of the final subset, but does not perform any actual archiving work. It is highly recommended that you do this before actually archiving any versions.
•
|
depot — From each stream in the depot, include all versions except the last one (most recently created). This includes dynamic streams, snapshots, and workspace streams.
|
•
|
snapshots — Include versions that are in one or more snapshots, but are not currently active in any dynamic stream.
|
•
|
deactivated — Include versions that are the currently selected versions in one or more dynamic streams, snapshots, or workspace streams that have been deactivated with the remove command.
|
•
|
all — same as -a; allows you combine -a and -I options.
|
•
|
allInHierarchy — Include all versions of a specified element underneath the specified stream hierarchy, except for those versions that are shared with another hierarchy. If no element is specified, all elements in the specified stream hierarchy are included.
|
•
|
unsafe — Include versions that AccuRev would normally prevent you from archiving. This “force” option implies that you realize the potential complications that could arise from archiving these versions.
|
Archive all versions of the element(s), even versions that are currently visible in users’ workspaces and active streams. This option overrides (and is mutually exclusive with) the
-I option.
-t <transaction>[ .
<count> ]
-t <transaction> - <
transaction>[ .<
count> ]
For the archive command, a transaction can be represented in the following ways:
Signals that <list-file> (see the
-l option) is an XML-format file, not a flat text file. Example:
The -Fx option must precede the
-l option on the command line.
Process the elements listed in <list-file>. This must be a text file, with one element name per line. Extra whitespace is not allowed; make sure there are no empty lines and no leading or trailing white space around the filenames. Wildcards are not expanded. There is no provision for comment lines in the file.
Note: In the XML-format listings below, the
v and
r attributes report the virtual version and real version, respectively.
List the versions with element-type binary, created in the current workspace and located below the current working directory, that are eligible for archiving:
> accurev archive -E binary -i -R .
<elements>
<e
location="/pngs/sb/sb_dftgrp_1.png"
v="5/1"
r="5/1"/>
<e
location="/pngs/sb/sb_dftgrp_2.png"
v="5/2"
r="5/2"/>
<e
location="/pngs/sb/sb_dftgrp_2.png"
v="5/1"
r="5/1"/>
<e
location="/pngs/sb/sb_dftgrp_3.png"
v="5/3"
r="5/3"/>
...
</elements>
List the versions of element sb_dragdrop_3.png, created in the current workspace in transactions 1-25, that are eligible for archiving:
> accurev archive -i -t 1-25 sb_dragdrop_3.png
<elements>
<e
location="/pngs/sb/sb_dragdrop_3.png"
v="5/2"
r="5/2"/>
<e
location="/pngs/sb/sb_dragdrop_3.png"
v="5/1"
r="5/1"/>
</elements>
> accurev archive -t 1-25 sb_dragdrop_3.png
*** WARNING! *** WARNING! ***
The archive command removes files from the depot. If you do not back up
the archives created by this command, the files may be lost permanently.
...
Are you sure you want to proceed [yes/no] ? []
yes
Archiving complete.
Make sure you store the archives in a safe place for
future use. Backup is recommended.
The archives were stored to:
Archive dir :
C:/Program Files/AccuRev/storage/depots/img/archive_gateway/out
Machine : biped
Transaction : 33
List the versions of element file_8.txt in the s1 stream hierarchy that will be archived if you specify -I allInHierarchy. Note that versions that are used in another stream hierarchy are not listed and will not be archived. In this example, version v="1/1", r="5/1" is used in stream S2, and so will be excluded from the proposed archive.
> accurev archive -i -I allinhierarchy -s s1 file_8.txt
List the versions of element file_8.txt in the s1 stream hierarchy that will be archived if you specify -I allInHierarchy,unsafe. Note that versions that are used in another stream hierarchy are now listed and will be archived.
> accurev archive -i -I allinhierarchy,unsafe -s s1 file_8.txt
Archiving of Version Container Files of the
AccuRev Administrator’s Guide.