Cleaning up Diskspace
Posted 20 September 2018 - 11:11 AM
I'm new to Perforce and have set it up for a project with 4 other work colleagues because a few of us work remotely.
It has been working brilliantly and has been an amazing addition to the project.
The project itself is about 8gb and we have 30gb of server space. The server has quickly filled up with revisions, some of which we no longer need to keep.
I have been through and manually obliterated some of the larger file revisions using the admin GUI but was wondering if there is a way of automating this for all files, so that I only keep 2 revisions and obliterate the rest.
Is there a way to list all files on the depot, sorted by file size?
I looked into the archive command but I'm a bit unsure as to what this does. Will this allow me to store a local copy that I can restore if needed? Can I do this using the P4V UI or do I have to use the command line tools?
Any help/advice on this would be great.
Posted 21 September 2018 - 06:49 PM
You want the +S2 filetype ("Store 2 revisions"). This isn't retroactive, but if you change the filetypes on your existing files then from that point on revisions will be purged from the depot once 2 newer ones have been submitted.
The "archive" command moves the archives to a different depot (an "archive depot"). The idea is that your archive depot lives on cheap/detachable storage (the archived files don't get downloaded to the client, they go to whatever the Map field in the depot is); you can restore the revisions from the archive depot back to the real depot at any point.
It might be technically possible to do this from P4V but I wouldn't recommend it -- it's very difficult to admin Perforce effectively without ever touching a command line, so learn to love the terminal. The documentation for the command line commands (the Command Reference and also "p4 help") is significantly more detailed than the documentation for the GUI ("p4 help" text is generally written by the developer who implemented the feature), so once you shift over to the command line it gets a lot easier to figure out how things work.
Posted 15 October 2018 - 08:16 PM
p4 -ztag -F "%fileSize% %depotFile%" sizes //depot/... | sort -gr
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users