Back up the server
How you back up a server in your multi-server deployment depends on the Type of that server:
| Type | Note |
|---|---|
| Broker |
|
| Proxy |
|
| Server |
|
Taking checkpoints on edge and replica servers
First, run p4 admin checkpoint against the edge or replica:
p4 -p edge:1666 admin checkpoint -ZThe background journal
pullcommand will perform the checkpoint at the next rotation of the journal on the target server The immediately upstream server for replica servers, edge servers, standby servers, proxies and brokers. See also 'upstream server' and 'central server'..This results in a message about the scheduling of the checkpoint and a file called
stateCKPbeing written to the edge or replica server root (P4ROOT) directory containing information about the scheduling of the checkpoint. For example:
Checkpoint scheduled at 1472141783 (2020/03/26 09:16:23 -0700 PDT ); opts:To cancel a scheduled checkpoint, remove the
stateCKPfile from the edge or replicaP4ROOTprior to rotating the journal on the target server.
Second, run p4 admin journal against the target server:
p4 -p commit:1666 admin journalRotating journal to journal.40...
-z flag to p4 admin journal or p4d -jj because rotated target server journals initially need to be uncompressed. Otherwise replication could be adversely affected. Detecting coordinated checkpoint completion
To determine that a coordinated checkpoint has completed, record the journal counter on the target server at the time the edge or replica checkpoint is scheduled. For example, the following counter command, run against your target server, reports the current value of the journal counter on that server. The admin checkpoint command, run on the edge or replica, schedules a checkpoint on that server the next time a journal rotation is detected on the target server (master).
p4 -p commit:1666 counter journal
40
p4 -p edge:1666 admin checkpoint -Z
The 'pull' command will perform the checkpoint at the next rotation
of the journal on the master.
In the example above, the journal counter is reported as 40, which means that the next checkpoint will be 41. To find out whether the checkpoint has completed, use one of the following.
Checkpoint ChecksumWhen a checkpoint completes, an md5 checksum of the checkpoint contents is written alongside the checkpoint: $ ls -l edge1/checkpoint.41* -r--r--r-- 1 bruno staff 11833462 Aug 25 09:59 checkpoint.41 -r--r--r-- 1 bruno staff 55 Aug 25 09:59 checkpoint.41.md5 Look for the writing of the md5 checksum, which means the checkpoint has completed. |
A
|
Checkpoint HistoryThe p4 journals command displays information from the p4 journals -F type=checkpoint -m1 Copy
Once a checkpoint has been scheduled and you know the checkpoint sequence number of the next edge or replica checkpoint, poll the edge or replica using p4 journals for the next checkpoint:
The command returns without providing any output until the checkpoint has completed, at which time you'll see the details of the checkpoint completion in the p4 journals output using the following command:
Copy
If a checkpoint fails, the
might output: Copy
|