Jump to content


Recover from backup

Backup recovery

  • Please log in to reply
3 replies to this topic

#1 John Ellwood

John Ellwood

    Newbie

  • Members
  • Pip
  • 3 posts

Posted 11 May 2017 - 06:50 AM

I am trying to recover from backup. (The original machine is dead)

I am using p4d 2012.1.44.2152

I have set up a copy of P4 on a new machine in the same location as the original machine

The backup software has recovered  all the .db and version files.

I can log into P4 from my clients and see all the users, changes list and files in most of P4.

However if I try and switch to a workspace that is using streams It get the following error on the client

Invalid or  missing map type value

If I run P4d with the -v1 switch to see debug out at the time the client tries to use the stream I see the following

invalid flag char '.' (0x2e)
invalid flag char '.' (0x2e)
invalid flag char '.' (0x2e)
no streampath type for '...'

Running

p4d -xv

Does not return any errors.

Is this the result of database corruption or a missing setting on the new install?

The database is not running in unicode mode.

Thanks for any suggestions.

#2 P4Jen

P4Jen

    Advanced Member

  • Staff Moderators
  • 147 posts

Posted 11 May 2017 - 04:14 PM

I suggest restoring from checkpoint and journal, along with a backup of your Perforce depots.

It is likely that your db.* files were corrupted when your original machine died.

Details about how to backup and recover are located here:
  https://www.perforce...ter.backup.html

Hope this helps,
Jen.


#3 John Ellwood

John Ellwood

    Newbie

  • Members
  • Pip
  • 3 posts

Posted 11 May 2017 - 04:16 PM

Thanks for you reply.

I have never run a check point however running

p4d -jrc journal


seems to have fixed the problem.


Regards

John


#4 Matt Janulewicz

Matt Janulewicz

    Advanced Member

  • Members
  • PipPipPip
  • 197 posts
  • LocationSan Francisco, CA

Posted 11 May 2017 - 06:12 PM

View PostJohn Ellwood, on 11 May 2017 - 04:16 PM, said:

I have never run a check point however running

You should start doing that, like today. Right now.

Since dumping checkpoints on a live server takes time and locks the db, at minimum you should consider doing this:

1. Truncate journal daily.
2. Replay journal into second, offline copy of db.
3. Dump a checkpoint of the offline db every so often (we do it weekly.)
4. It's a good idea to keep the checkpoints and truncated journals on a separate host.

Option, but highly encouraged:
5. Remove offline db and rebuild it with latest checkpoint+journals.
6. Swap rebuilt db into live server (stop server, replay live journal into offline db, swap live and offline db, restart server.)

Your database is your lifeblood and you should have more copies of that lying around (in the form of checkpoints) in addition to relying to IT type backups. Steps 5 and 6 keep your database balanced, compressed, streamlined and happy.
-Matt Janulewicz
Staff SCM Engineer, Perforce Administrator
Dolby Laboratories, Inc.
1275 Market St.
San Francisco, CA 94103, USA
majanu@dolby.com





Also tagged with one or more of these keywords: Backup, recovery

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users