2 messages in com.perforce.perforce-user[p4] Daily backups-Do I need checkpoi...| From | Sent On | Attachments |
|---|---|---|
| Joe Cotellese | 16 Dec 1999 10:33 | |
| Richard Geiger | 16 Dec 1999 11:03 |
| Subject: | [p4] Daily backups-Do I need checkpoints? ![]() |
|---|---|
| From: | Richard Geiger (rm...@netapp.com) |
| Date: | 12/16/1999 11:03:52 AM |
| List: | com.perforce.perforce-user |
I have a question.
We backup the server our depot resides on every night. I told our MIS department to backup the $P4ROOT directory. However, I do not create a checkpoint before each backup. Is it OK for us to just backup the entire directory? Instead is it better to create a checkpoint and backup that file?
Backing up the whole P4ROOT dir should be fine, but *only* if the server is locked or not running, or you insure by some other means that nothing on the server is happening during the backup. Otherwise, you could easily get an inconsistent copy of the depot (the db.* files in particualar).
Running a checkpoint (p4d -jd or -jc) insures that the server is locked while the db.* files are written to the checkpoint.
Having the checkpoint is also useful as the checkpoint file is in an ascii format that makes it useful for debugging or "black magic", if need be. (In practice, we've never had to resort to this, but it's nice knowing it's possible in principle).
The downside is that the server is locked during the checkpoint operation, and nobody can use Perforce while it's running. With a large database, this can be several, or even several tens, of minutes.
In fact, it's been approaching an hour at times for us, so we've just implemented a fast-checkpoint mechanism; because we store our depot on a Network Appliance filer, (which has "snapshots"), we can effectively get the time the server is unavailable for making a checkpoint back down to 10-20 seconds.
If anyone out there is storing their Perforce depot a NetApp filer, and wants details: a script that illustrates the technique can be found in the Perforce Public Depot at
rmg $ p4 files ...
(b4p4: using $P4CLIENT rmg:Perforce:utils; $P4PORT public.perforce.com:1666)
//guest/richard_geiger/utils/snap_checkpoint/snap_checkpoint#2 - edit change
239 (kxtext)
//guest/richard_geiger/utils/snap_checkpoint/snap_checkpoint.html#2 - edit
change 239 (text)
- rmg




