[p4] Questions about rotating a journal if its outside of the p4root directory.

Matt Janulewicz perforce-user-forum at forums.perforce.com
Tue Aug 9 10:40:01 PDT 2016


Posted on behalf of forum user 'Matt Janulewicz'.

P4JOURNAL should point to your current live journal in the new location. By
default it should rotate the journal in the same directory if you don't tell
it where to truncate to. If it's creating new journals or rotating them in
your P4ROOT, I'd suspect that the environment variables aren't set. You
could always pass that stuff in on the commandline.

Whenever I suddenly have a new set of db files that are 16k each, I know that
P4ROOT is not set correctly (or at all.)

You can also use configurables for this stuff, which is what we do (we're in
a distributed environment.) There's a setting for where you want to put the
new journals, too (which you could also pass in on the commandline.) Within our
configurables we have these three things to control where the journal is and
where the rotated ones go:

P4ROOT=/p4/1/root (-r) P4JOURNAL=/p4/1/logs/journal (-J)
journalPrefix=/p4/1/checkpoints/p4_1 (configure)  
I believe this would translate to this on the commandline:



Quote
>   > p4d -r /p4/1/root -J /p4/1/logs/journal -jj /p4/1/checkpoints/p4_1    
But, we actually don't do that either. Once you have this stuff set up in
the server's environment correctly, you can just:

> p4 admin journal  
You could also do a 'p4 admin checkpoint' but you should probably get
into the practice of not directly checkpointing your live instance. One day your
db will grow too big and the checkpoint process will lead to too much downtime.
Best to maintain an offline copy of the db (or a live replica) and checkpoint
that.



--
Please click here to see the post in its original format:
  http://forums.perforce.com/index.php?/topic/4901-questions-about-rotating-a-journal-if-its-outside-of-the-p4root-directory


More information about the perforce-user mailing list