March 26, 2009

What do I replicate to a disaster recovery machine?

What's New

Short simple answer:

The latest checkpoint and the archive files.

Longer, more detailed answer:

You need to make a checkpoint just prior to your replication, and then replicate that along with the archive files for each depot. It is okay if people are still updating the archive files during your replication. Perforce ignores revisions in the archive files that are not in the metadata by design.

If you want low data low at your DR site, then you need to use real time replication on the archive files, and replicate a copy of the journal on a schedule that matches the amount of data loss, in units of time, your team can tolerate.

If you want zero data loss at the DR site, then you will need a replication tool that can replicate the journal in real time as well. You can find such a tool here: http://public.perforce.com/wiki/P4jrep

If you are using a block level real time replication tool, then you should make sure that you only use it on the volume with the archive files. It should not be used on the volume with the journal or the volume with the db files as this will slow your server considerably in our experience.

If you configure your server with three volumes, one for metadata, one for archive files, and one for the journal and logs, and you keep your checkpoints on the same volume as the archive files, then you only need to replicate that one volume to your DR site, along with the journal as necessary to meet your level of data loss requirements.