Jump to content


Restore archive files after system crash

backup journal restore crash archive

  • Please log in to reply
4 replies to this topic

#1 choba

choba

    Newbie

  • Members
  • Pip
  • 2 posts

Posted 15 November 2017 - 01:05 PM

Hi,

for some reason the volumes of our perforce server got dismounted tonight, which I guess was the reason for the perforce server to crash. After re-mounting everything, I started the perforce server again and apparently it just created a new, empty server. To restore our current work, I then used our journal file with

p4d -r $P4ROOT -jr journal_file

After that I was able to start the server, connect with P4V and see the depot and pending changelists and everything, but I still can't get latest revisions or see the actual changes in the history. When I try, I get the error message:

Quote

Librarian checkout X failed.
open for read: X,v: No such file or directory

And when I run verify or check P4ROOT/depot/..., most of the files are missing (but not all, at least I see some ,d files).

Is there any way to restore those archive files or something I can do to get the history or at least be able to get revisions? The depot files themselves are still all there.

Thanks,
Tobias

#2 Sambwise

Sambwise

    Advanced Member

  • Members
  • PipPipPip
  • 1037 posts

Posted 15 November 2017 - 05:24 PM

View Postchoba, on 15 November 2017 - 01:05 PM, said:

The depot files themselves are still all there.

It sounds like they aren't, at least not if "there" is the current server root.  :)  I'm pretty sure you restarted your server in a new (empty) directory and that's why you saw an empty server when you first started up -- you'll want to either restart p4d in the correct root directory, or move your depot files over to the new one.

#3 choba

choba

    Newbie

  • Members
  • Pip
  • 2 posts

Posted 16 November 2017 - 11:32 AM

Well, I can open the files in P4V, so they are "there" and can be downloaded (not specific revisions, but the current file). I first started the server without the volumes mounted (because I didn't see they were unmounted), so yeah, it was a new folder.

I just tried creating a new workspace and get the latest revision, but all it got was the empty directories, no files.

#4 P4Jen

P4Jen

    Advanced Member

  • Staff Moderators
  • 151 posts

Posted 16 November 2017 - 06:14 PM

If your server is pointing to the location you used for P4ROOT before the crash and the volumes are now mounted, it sounds like the depot (archive) files might be corrupt.

I recommend restoring them from a backup if you have one.

If you want more assistance with this and you have a support contract with Perforce, or would be able to purchase support, contact:
  support@perforce.com

Cheers,
Jen!

#5 Sambwise

Sambwise

    Advanced Member

  • Members
  • PipPipPip
  • 1037 posts

Posted 16 November 2017 - 06:16 PM

View Postchoba, on 16 November 2017 - 11:32 AM, said:

Well, I can open the files in P4V, so they are "there" and can be downloaded (not specific revisions, but the current file).

I'm pretty sure that just means you had them synced to your client workspace.  If you fail any time you try to get a revision from the server, it means that the server can't find the archive files.

Quote

I first started the server without the volumes mounted (because I didn't see they were unmounted), so yeah, it was a new folder.

Could you mount the volumes and then restart the server with the correct (old) P4ROOT directory?  That seems like the easiest fix.

This statement is a little confusing/concerning:

Quote

And when I run verify or check P4ROOT/depot/..., most of the files are missing (but not all, at least I see some ,d files).

Is there any way to restore those archive files or something I can do to get the history or at least be able to get revisions? The depot files themselves are still all there.

The "depot files" are the files under P4ROOT/depot -- binary files are stored as one .gz per revision within a ",d" directory, and text files are stored as ",v" delta files (multiple revisions can go into one file).  So "the depot files are still there" is not compatible with "most of the files under P4ROOT/depot are missing". If those files are gone, all your old revisions are gone -- these should be getting backed up as part of your normal backup process.  How old is your most recent backup?





Also tagged with one or more of these keywords: backup, journal, restore, crash, archive

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users