2

From reading the Perforce docs it sounds like only changelists and version history can be backed up. Is it possible to get Perforce to create a backup of files too, so that in the event of loss, through hardware failure for example, a complete set of files could be recovered?

5 Answers 5

4

As far as I understand, no, perforce is not doing that.

The perforce back-up process is two-fold: 1 - You need to back-up the files in the depot, using standard files back-up procedures. The files in the depot are in RCS format, and are called yourfiles.ext,v Those are the "sources" data. AFAIK, something as simple as getting a tar/zip copy of the depot in a safe place regularly is enough (USB key, etc... if you are worry of a server hardware failure). 2 - You need to use the perforce admin checkpoint command to back-up the content of the db files in the perforce depot. This is for all the perforce metadata.

One without the other is useless. So both should be synchronised.

Two things I have learned is that: A - You cannot open the archive files easily without restoring the metadata. I.e. I have not found a "RCS archives reader" tool that can open the perforce files from the backup without perforce itself. I.e. to get the content of one single files of the archive you need to restore the depot, including the metadata. B - the db.* metadata perforce files are using a proprietary DB system and cannot be open with standard db tools (like a SQL client or something)

Best regards,

Thomas

1
  • Thank you for that info, I'll give it a go later on and see if I can restore a backup onto another computer using this method.
    – Macca
    Oct 19, 2009 at 11:07
2

I'm not sure which docs you've been reading, but there's a fairly comprehensive guide in the Admin manual here.

If you are after something fairly simply - i.e. yours is not an industrial strength installation, then there's a few notes here that describes a way to get you backups going quickly and easily in just a few minutes.

0

The Perforce checkpoint is only a backup in so far as you can restore from it. You still need to backup the checkpoint file, and all subfolders of you perforce directory (by default where all depots are stored) where the files actually are to tape, remote storage etc as you would normally do with any backup.

What we have done elsewhere is run the checkpoint script and then add that file and the subfolder to our standard backup script.

0

The manual for the 2009.2 version of perforce server p4d has pretty clear documentation on this topic, see Greg Whitfield's answer above. I'd hyperlink to the last manual, but I don't have enough reputation.

The system administrator's guide pages on replication have more industrial solutions; making hot spares of metadata for no-downtime metadata backups, for example. The replicate command reference clearly explains you want to use 3rd party tools to backup the file data.

0

In 2015 you can use the DVCS feature to clone part/all of your Perforce server to a remote location.

It does require some time to setup but I'm pretty happy with the result. I'm backing up 20TB+ worth of data this way as I write this. ^_^

You must log in to answer this question.