Jump to content


Only have back up of depots versioned files. How to put them in new Perforce server on entirely new computer?

depot versioned files new server

  • Please log in to reply
9 replies to this topic

#1 CodeCalibre

CodeCalibre

    Newbie

  • Members
  • Pip
  • 5 posts

Posted 02 October 2014 - 06:09 PM

Hello.

I have a new computer. And I also have a very old copy of a depot with its versioned files. I don't think it has the correct db files that came with it.

I installed the last perforce version I used on that depot on my new fresh computer. The version is P4D/NTX64/2010.2/284433 (2011/01/28).

How do I make it such that the old depot's versioned files I have be accessible again into this new computer?

Please note that I am only a personal user and I am not really good with perforce administration so simple steps on how to do it please. I am okay if information such as change lists and histories will be gone, but it would be great if I can restore that too.

Pardon my English. I hope someone can help me. Those were very important codes to me.

#2 P4Shimada

P4Shimada

    Advanced Member

  • Members
  • PipPipPip
  • 831 posts

Posted 02 October 2014 - 11:03 PM

Hello,

The following Knowledge Base article has step-by-step instructions when transferring work in progress to a new machine:

    http://answers.perfo...ding-Changelist

Let us know if you have any other questions after looking over the instructions.

#3 CodeCalibre

CodeCalibre

    Newbie

  • Members
  • Pip
  • 5 posts

Posted 03 October 2014 - 05:14 AM

View PostP4Shimada, on 02 October 2014 - 11:03 PM, said:

Hello,

The following Knowledge Base article has step-by-step instructions when transferring work in progress to a new machine:

http://answers.perfo...ding-Changelist

Let us know if you have any other questions after looking over the instructions.

I think this is answering a different thing. My problem scenario is different like I've explained above. I have a fresh new computer and with newly installed Perforce on it and I only have a backup copy of the depot's versioned files and tree structure. I don't have pending changelists or anything.

#4 G Barthelemy

G Barthelemy

    Advanced Member

  • Members
  • PipPipPip
  • 65 posts
  • LocationUnited Kingdom

Posted 03 October 2014 - 09:37 AM

View PostCodeCalibre, on 02 October 2014 - 06:09 PM, said:

I have a new computer. And I also have a very old copy of a depot with its versioned files. I don't think it has the correct db files that came with it.

So do you have a db ? How do you determine it is not the correct one ? Is this the empty db created when you run p4d in an empty P4ROOT, or do you have a checkpoint to restore somewhere ?

If you do not have a db (or a db checkpoint) then you will have lost a significant amount of information, such as the revision and integration histories of your files, changelists and other metadata. If that is the case then you are in salvaging mode. My first thought would be to use RCS (which does exist on Windows) to checkout the head revision of each file in a tree on disk somewhere, and then setup a new Perforce server and repository (you might as well go for the latest version) and submit that tree as an initial import, in other words: "start from scratch" with a file base extracted from the existing versioned files using rlog and co.

If you really need more than just the head revision, there is a link between RCS version numbers and Perforce changelists (it's based on the oldChange field, or if it doesn't exist, on change), so based on that information it should be possible to reconstitute some kind of revision (and change) history one layer at a time (say using "p4 reconcile"), but this will likely be inaccurate (e.g. deletes and lazy copies would go missing) and without integration history (so what used to be "integrate" revision actions would become "edit", for example). You'll have to determine whether this is worth the effort. Perhaps Perforce Support have a tool to help with that ?

Good luck !
Guillaume

#5 CodeCalibre

CodeCalibre

    Newbie

  • Members
  • Pip
  • 5 posts

Posted 03 October 2014 - 04:51 PM

View PostG Barthelemy, on 03 October 2014 - 09:37 AM, said:

So do you have a db ? How do you determine it is not the correct one ? Is this the empty db created when you run p4d in an empty P4ROOT, or do you have a checkpoint to restore somewhere ?

If you do not have a db (or a db checkpoint) then you will have lost a significant amount of information, such as the revision and integration histories of your files, changelists and other metadata. If that is the case then you are in salvaging mode. My first thought would be to use RCS (which does exist on Windows) to checkout the head revision of each file in a tree on disk somewhere, and then setup a new Perforce server and repository (you might as well go for the latest version) and submit that tree as an initial import, in other words: "start from scratch" with a file base extracted from the existing versioned files using rlog and co.

If you really need more than just the head revision, there is a link between RCS version numbers and Perforce changelists (it's based on the oldChange field, or if it doesn't exist, on change), so based on that information it should be possible to reconstitute some kind of revision (and change) history one layer at a time (say using "p4 reconcile"), but this will likely be inaccurate (e.g. deletes and lazy copies would go missing) and without integration history (so what used to be "integrate" revision actions would become "edit", for example). You'll have to determine whether this is worth the effort. Perhaps Perforce Support have a tool to help with that ?

Good luck !
Guillaume

Hi Guillaume. Thanks for the reply.
How I know the db are incorrect? Because I made a stupid mistake trying to resurrect it. A trick I did is to install perforce on that folder where my backup is and I can see all db files were overwritten.

Anyway, as long as I can retrieve all the versioned files head revision, I'm happy. I could then use that head revision as my new starting point. I didn't understand the RCS and rlog and co you mentioned.

I will give Perforce Support a shot on this.

#6 CodeCalibre

CodeCalibre

    Newbie

  • Members
  • Pip
  • 5 posts

Posted 03 October 2014 - 05:12 PM

Ugh, it seems I cannot use Perforce Support since I am only a free personal user.

#7 P4Matt

P4Matt

    Advanced Member

  • Members
  • PipPipPip
  • 1383 posts

Posted 03 October 2014 - 05:16 PM

You totally can; free support comes with the 20/20 license.

#8 P4Norman

P4Norman

    Advanced Member

  • Staff
  • 81 posts
  • LocationOakland CA, USA

Posted 03 October 2014 - 07:51 PM

Hi CodeCalibre,

Do you have any backups which include a checkpoint file?

Without a checkpoint file or a functioning db, you are pretty much out of luck.

My "last ditch" suggestion is to use the CVS converter available from the Perforce ftp site,  point it at your perforce archive directory
and it might be able to parse all the RCS files and reconstruct a new server with metadata.

ftp://ftp.perforce.com/perforce/tools/p4convert-cvs/p4convert-cvs.html

ftp://ftp.perforce.com/perforce/tools/p4convert-cvs/p4convert-cvs.zip

I've never done this before, so I don't know how well it will work,  I'm very interested in hearing about the results.

-Norman

#9 CodeCalibre

CodeCalibre

    Newbie

  • Members
  • Pip
  • 5 posts

Posted 04 October 2014 - 06:51 PM

View PostP4Norman, on 03 October 2014 - 07:51 PM, said:

Hi CodeCalibre,

Do you have any backups which include a checkpoint file?

Without a checkpoint file or a functioning db, you are pretty much out of luck.

My "last ditch" suggestion is to use the CVS converter available from the Perforce ftp site,  point it at your perforce archive directory
and it might be able to parse all the RCS files and reconstruct a new server with metadata.

ftp://ftp.perforce.com/perforce/tools/p4convert-cvs/p4convert-cvs.html

ftp://ftp.perforce.com/perforce/tools/p4convert-cvs/p4convert-cvs.zip

I've never done this before, so I don't know how well it will work,  I'm very interested in hearing about the results.

-Norman

Hi Norman.

Thanks for your reply. That certainly is quite unusual. I have to admit to you that I don't like where this is going. I haven't tried that.

I got lucky today. Apparently, I was able to find the old computer that has the server and depot. I was able to access there and made a checkpoint and journal, and made a new backup. Now I use that properly backed up copy instead of the one I originally had. (I actually have the Perforce Server and depot on an external drive and share it on my mac computer and windows computer)

So to confirm, to make a backup, I would only need the versioned files, the checkpoint, and the journal right? I don't necessarily have to backup the db.* files because the checkpoint and journal should be able to recreate them?

#10 p4laurette

p4laurette

    Advanced Member

  • Members
  • PipPipPip
  • 40 posts

Posted 06 October 2014 - 06:55 PM

Hi CodeCalibre,

That is correct, to do a backup, you should take a checkpoint which will also truncate the journal and then back up the checkpoint, journal and versioned files.  It is also recommended that you verify the version files.  You can find more information here:  http://www.perforce....ter.backup.html





Also tagged with one or more of these keywords: depot, versioned, files, new server

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users