p4 verify
Synopsis
Verify that the Perforce versioning service’s archives are intact.
If p4 verify
returns errors, contact Perforce technical support.
Syntax
p4 [g-opts
] verify [-t | -u | -v |
-z] [-m max
-q -s -X -b
batch
N]
file
[revRange
]
...
p4 [g-opts
] verify -S [-t -m
max
-q -X -b N]
file
...
p4 [g-opts
] verify -U
unloadfile
...
p4 [g-opts
] verify -A
archivefiles
...
Description
For each revision of the specified files, p4 verify
reports the
revision specific information and an MD5 digest (fingerprint) of the
revision’s contents. See p4 revisions
for information about
specifying revisions.
The verification process involves opening the file’s archive, reading
it, and verifying that its digest matches the expected value. If the
file can’t be opened, verify reports MISSING
. If the file can be
opened, but does not have the expected contents, p4 verify
reports BAD
.
If invoked without arguments, p4 verify
computes and displays
the MD5 digest of each revision.
Syntax variants offer the following choices:
- Verify a given set of file revisions.
- Verify a given set of shelved file revisions.
- Verify file revisions in the unload depot.
- Verify file revisions in the archive depot.
It is good administrative practice to regularly verify the integrity of your depot files with p4 verify -qz //...
For details, see the Helix Versioning Engine Administrator Guide: Fundamentals.
Verifying shelved files
The verification of shelved files lets you know whether your shelved archives have been lost or damaged.
If a shelf is local to a specific edge server, you must issue the p4
verify -S
command on the edge server where the shelf was created. If
the shelf was promoted, run the p4 verify -S
on the commit
server.
You may also run the p4 verify -S t
command on a replica to
request re-transfer of a shelved archive that is missing or bad.
Re-transferring a shelved archive from the master only works for shelved
archives that are present on the master; that is, for a shelf that was
originally created on the master or that was promoted if it was created
on an edge server.
Verifying archived files
The verification of archived files lets you know whether your archived
files have been damaged; it is a good practice to run a command like the
following before you restore files with the p4 restore
command.
$ p4 verify -A //depot/mysource/...
Options
|
It is possible for files in the archive depot to become corrupted over
time; this option allows you to verify these files before you
restore them with the
//depot/..../source |
|
By default, To disable batching, specify |
|
Limit Use this option with the |
|
Run quietly; report only errors from mismatched digests or unreproducible revisions. |
|
Verify file size as well as digest. The |
|
Verify shelved files. If you specify this option, the only valid
revision specifier is In a distributed installation, this command should be run on the edge server where the shelf was created. If the shelf has been promoted, this command may also be run on the commit server. |
|
For use on replicas only: The In replicated environments, |
|
Store the filesize and MD5 digest of each file in the Perforce
database if no filesize and/or digest has been previously stored.
Subsequent uses of |
|
Verify files in the unload depot. See |
|
Store the MD5 digest of each file in the Perforce database, even if
there’s already a digest stored for that file, overwriting the
existing digest. (The The |
|
Skip files of filetype |
|
Optimizes performance by skipping revisions that have already been computed in the current pass; this option speeds verifications for files that exist via lazy copies. The resulting output might report a lazy copy revision if it is the first revision in the sort order to access a common archive file. This option cannot be used with the |
|
See “Global Options”. |
Usage Notes
Can File Arguments Use Revision Specifier? | Can File Arguments Use Revision Range? | Minimal Access Level Required |
---|---|---|
Yes |
Yes |
|
Examples
p4 verify -S //depot/main/p4/... |
Verifies all shelved files matching the specified path. |
p4 verify -qS //...@=1023548 |
Verifies the shelved files in shelf 1023548 only. |
p4 verify -q //...#head,#head |
Verifies only the head revision of all files in the depot, reporting only on files with problems. |