Back up services
How you back up a service in your multi-server deployment depends upon the service type:
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 -Z
The background journal
pull
command will perform the checkpoint at the next rotation of the journal on the master.This results in a message about the scheduling of the checkpoint and a file called
stateCKP
being 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
stateCKP
file from the edge or replicaP4ROOT
prior to rotating the journal on the commit or master server.
Second, run p4 admin journal
against the commit or master:
p4 -p commit:1666 admin journal
Rotating journal to journal.40...
Do not use the
-z
flag top4 admin journal
orp4d -jj
This is because rotated commit and master 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 commit or master at the time the edge or replica checkpoint is scheduled. For example, the following counter
command, run against your commit or master 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 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
|