Jump to content

Determine if files on server should have been deleted by obliterate

  • Please log in to reply
1 reply to this topic

#1 Br.Bill



  • Members
  • PipPip
  • 21 posts

Posted 11 January 2019 - 01:29 AM

Is there any way to determine a list of all the files in the server depots that should have been deleted by obliterate, but weren't?

We have good reason to believe that we have files on the system that are "orphaned" -- having no actual references in the p4db at all.

Looking for a way to report a list of these orphans. That way we could know what files could be safely deleted from the depot.

#2 Sambwise


    Advanced Member

  • Members
  • PipPipPip
  • 681 posts

Posted 11 January 2019 - 03:54 AM

The only way I know of to do this is to run "p4 fstat -Oc" across everything and then cross-reference that with the depot filesystem.  If a depot archive revision isn't referenced by any depot file (as displayed by fstat -Oc) then it should be safe to delete.

Most "orphaned" revisions get that way (I think) via failed submits -- the submit starts to write the new revision, something fails, the user either abandons the change or renumbers it, and that partial submit is never committed or cleaned up.  Obliterate never cleans these up because they aren't associated with any of the submitted revisions that it's purging.

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users