Script Details

A key feature of these scripts is that the results of the backup procedure are saved in XML format. These results include information about the Perforce connection, environment, the backup procedure steps and commands, the output of those commands, sizes of files created, start and end times of steps and the backup procedure as a whole. This information can then be used by other scripts or web servers to extract and display information about the health of the backup procedure and Perforce server.

Backup Procedure XML single step example

This results file and other output is saved in the log directory. If errors occur when running these scripts, the files in the log directory can be used to help diagnose the problems. The backup files (archives) can, and should, be saved in a separate backup directory.

The steps in the procedure are:

  • Verify the Perforce server data.
  • Search the verification output for MISSING! and BAD! files.
  • Checkpoint the Perforce metadata database.

If any of the previous steps do not succeed, the remaining steps are skipped. If they all succeed, the scripts continue as follows.

  • Restore the metadata database from the checkpoint into a new folder.
  • Test Restore by verifying that the expected db.* files are created.
  • Backup the Perforce license file, checkpoint and depot versioned file trees to a file.