[p4] Backup and restore

Calvin Guan guancalvin at yahoo.ca
Sat Mar 24 20:45:31 PST 2007


Hello group,

I'm not a p4 pro so please bear with me...

We, a small team are using perforce without a fulltime admin. As our database grows, I started to worry about data corruption or harddisk failure after reading some scary crash courses. I do take checkpoint and backup the checkpoint.n, journal.n-1 and the perforce/depot/ but I never have a chance to restore it. I read the p4 admin manual but still want to make sure if I got it right.

Let's say I made a checkpoint on Tue, checkpoint.2 and journal.1 were generated. On Wed, checkpoint.3 and journal.2 were generated. On Sat. the server caught a fire; both depot and db.* are gone(ouch).

If I'd like to restore the server to the most recent backup state(Wed), I'd:
p4d -r $P4ROOT -jr checkpoint.3
and restore the perforce/depot/ taken on Wed.

If for some reason, I'd like to restore the server to Tue, state, I'd:
p4d -r $P4ROOT -jr checkpoint.2
and restore the perforce/depot/ taken on Tue.

It seems to me I don't need the journal.n file in both cases. Is it true that the only time I need to specify a journal file in the "p4d -jr" command is to restore the database to the latest state given that the versioned files and the current journal file are not affected by a crash. If my understanding is correct, then why do I need to backup the journal.n files?

Thanks,
Calvin

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


More information about the perforce-user mailing list