Creating an archive server
To archive a section of a Perforce Server, do the following:
- Obtain a license for the new archive server
- Copy the entire Perforce Server to a new archive server.
Either stop the production server and copy the files over, or take a checkpoint and copy the checkpoint and versioned files over. Make sure your archive server is the same version as your production server. Old versions of Perforce can be obtained from
Steps to copy a server are documented in Moving a Helix Server
- Start the archive server.
- Obliterate everything on that archive server that you do not need.
- Obliterate the archived files on the production server
The result is a new server that contains only the content that you want archived.
To reiterate, archiving requires creating a duplicate copy of your server and then obliterating everything from that archive server that you do not want, leaving you with just the content that you do want.
The most important part of the archiving process is determining which files to obliterate. An efficient method of selecting files to obliterate is by creating a special client workspace dedicated to this purpose.
Speeding up obliterate
For example, on the newly created archive server, to archive the "//depot/OldStuff/..." section of the depot, create a client workspace, such as "archive-tmp" below, with a View that maps the entire depot. Then use exclusionary View mappings to exclude the files you wish to save (archive):
Then on the archive server you can obliterate everything you do not need by providing the entire client workspace as an argument to the p4 obliterate
p4 snap //... //archive-tmp/...
p4 obliterate //archive-tmp/...
p4 obliterate -y //archive-tmp/...
Likewise, on the production server, you can obliterate the now archived data.
p4 snap //... //depot/OldStuff
p4 obliterate //oldStuff/...
p4 obliterate -y //oldStuff/...
This "depot copy and obliterate" approach to archiving is also discussed in "Making Large Depots Smaller
Restoring the archive server
Once you have copied your original server content to an archive server instance, you take a checkpoint of the archive server, compress the depot file contents, and store the checkpoint and depot files on a backup medium.
If you need to recover the archived Perforce Server content for future use, you can rebuild the archive server from checkpoint, restore the compressed depot files, and restart the archive server to browse and use it.
The p4 obliterate
command can permanently remove contents from your Perforce Server based on depot path, date, or a combination of both. For details on usage, see the Perforce Command Reference