So first of all, you switched servers with no change in operating system,
OS version, or OS bit-ness, right?
This sounds like an ideal time to use your backups. You have backups of
your Perforce data, right? If you don't, make it a high priority
immediately after you recover from this situation. Put it on a regular
schedule that reflects your maximum acceptable data loss and regularly
verify that your backup procedure is working correctly. See the Admin Guide
for best practices on backup.
That aside, you wouldn't need to use "#1,#1", just "#1". That form of
verify only verifies the first revision, which only serves as a reasonable
fast shortcut to verify the whole history for text files, not binary files.
You don't say whether the file in question is binary or text, so make sure
it's a text file before taking the shortcut.
Verify doesn't check the "syntax" of the archive file or of the code in the
revision directly. Rather, it constructs the revision being verified and
compares the MD5 checksum of that revision to the checksum that was stored
in the metadata when it was submitted or, in some cases, when the checksum
was computed separate from submission.
So the submitted file that ended up in your license file, was it submitted
before or after the server switch? If after, the problem may be only with
the FAT table around your license file and not the archive file. However,
in that circumstance, a copy may not give you good data even if it makes
sure you have a good file system integrity.
Advice: Don't use FAT*. It's gotten better, but it's not a very robust file
system.
Original Message:
-----------------
From: Anders Kjærgaard Hansen ***@etiglobal.net
Date: Thu, 1 Oct 2009 15:36:48 +0200
To: ***@upromise.com, perforce-***@perforce.com
Subject: Re: [p4] How do i find corrupt depot files
I actually tried verify on the corrupt file, and didn't get the expected
result.
Or maybe I was typing something wrong.
I will do a full verify soon.
The story short here I guess, I that we had our server on a 2008 R2,
running in vmware. We then experience some trouble with R2, installed a new
2008, and moved the virtual disk to the new server.
In doing this some snapshot broke, and got trashed somehow.
So the things I see know on our server seems to bit a corrupt FAT table or
the like.
A submitted files content has just ended up in our license file.
So I have shut down the server, added a new disk, and are now in the
process of copying all data to the new disk, and will then start to recover.
I expect P4 verify will do the trick in aiding me when it comes to all the
depot files.
I'm not entirely sure here, but if I just run 'p4 verify //...#1,#1'. Will
I then be able to find all files where the actual file is corrupted, e.g.
not valid syntax. The errors I will experience will most likely be
syntax/parse errors, and those will almost always exist in #1. Am I right?
Thanks for your quick replies.
/Anders
-----Original Message-----
From: Michael Delaney [mailto:***@upromise.com]
Sent: Thursday, October 01, 2009 3:10 PM
To: Anders Kjærgaard Hansen
Cc: perforce-***@perforce.com
Subject: Re: [p4] How do i find corrupt depot files
Switched over from what to what?
You can use the 'p4 verify' (see 'p4 help verify') command to check that
the files hashes are as expected.
Post by Anders Kjærgaard HansenHi
I have just found a corrupt file in our depot.
The incident has happened just as we have switched server, and had some
trouble with a snapshot file from a VM image.
Post by Anders Kjærgaard HansenI would very much be able to query our p4 server to go through all files
tonight, and report all files which have problems with its files.
Post by Anders Kjærgaard HansenCan anyone help me with an idea on how to script this, or use an existing
p4 command to scan our depot, and report all files that are corrupt?
Post by Anders Kjærgaard HansenI hope for the best that it is only this one file.
/Anders
_______________________________________________
http://maillist.perforce.com/mailman/listinfo/perforce-user
_______________________________________________
perforce-user mailing list - perforce-***@perforce.com
http://maillist.perforce.com/mailman/listinfo/perforce-user
--------------------------------------------------------------------
mail2web LIVE Free email based on Microsoft® Exchange technology -
http://link.mail2web.com/LIVE