p4 archive
Archive obsolete revisions to an archive depot.
Syntax
p4 [g-opts] archive [-h -n -p -q -t] -D depot FileSpec[revSpec]
Description
Moves the specified revisions into a depot of type
archive
.
When files are moved into an archive depot, their last action is changed
to archive
. Commands that access file content, such as p4 sync
and p4 diff
, skip
archive
revisions, but commands that do not require access
to file content, such as p4
filelog
, continue to report metadata
concerning the archived revisions.
If you want to disable server
locks when running the p4 archive
command, set the value of the the server.locks.archive
configurable to 0
.
Use with caution. The following commands permanently remove file data:
p4 archive -p
p4 obliterate -y
Options
|
Specify an archive depot to which files are to be archived. |
|
Do not archive head revisions. |
|
Do not archive revisions. Instead, report on which revisions would have been archived. |
|
Purge any archives of the specified files named in the archive
depot. (The action for affected revisions is set to
|
|
Quiet mode, which suppresses messages about skipped revisions. |
|
Archive text files (or other revisions stored in delta format,
such as files of type |
|
See Global options. |
Usage Notes
Can File Arguments Use Revision Specifier? | Can File Arguments Use Revision Range? | Minimal Access Level Required |
---|---|---|
Yes |
Yes |
|
- By default, only files stored in full (
+F
) or compressed (+C
) are archived. The files must be in alocal
depot (not aremote
or anotherarchive
depot), and must neither be copied nor branched to (or from) another revision. - To archive files stored in delta format, use the
-t
option. Be aware that there may be a computational cost associated with the manipulation of large numbers of RCS deltas. - You can use
p4 archive -n
for testing purposes before mounting the filesystem associated with the archive depot. Storage for the archive depot must be mounted before running this command without the-n
option. - If a revision is stored in an archive depot, and the stored revision
is accessible to the versioning service, end users can determine which archived revision they might want to be restored by using p4 print:
p4 print -A -o myOutputFile /archive/depot/myFile
This command redirects the contents of the archived file to myOutputFile without restoring the archived file. End users can then request that a Helix Server Administrator use
p4 restore
to restore the file.
Examples
|
|
|
|
To archive files stored in delta format, use the -t
option: |
|
|
Use the |
|
Use the |
|
Use the |
If Helix Server must manipulate a large numbers of RCS deltas, the computational cost might be noticable.
Related Commands
To create a depot |
|
To restore files from an archive depot |
|
To obliterate files without archiving them |