I'm new to using perforce. I was just copying files to perforce to the server for version control and sharing files. Although those 36 gigabytes of data were gone. All disappeared from my disk, nowhere to be found and reverting did not work. So is there anything I could do to restore my files?
Asked
Active
Viewed 104 times
-1
-
Perhaps you did a `p4 delete` of all your files. If they are still open, you can do `p4 revert` to "un-"delete them. If you have submitted your `p4 delete`, the server still has the old files, you can `p4 sync` back to the older version to get them back. – Bryan Pendleton Dec 17 '18 at 14:06
-
The description is so vague that this question is unlikely to help anyone else. What does "just copying files" mean? Voting to close as unclear. – Andreas Haferburg Mar 05 '19 at 12:26
1 Answers
2
If you submit files to Perforce, the server has safe copies of them, and you can get them back at any time just by running p4 sync
.
End users are not permitted to permanently delete submitted files from a Perforce server, so under most circumstances once you submit something to Perforce it's safe forever.
Normally the administrator of a Perforce server will maintain backups so that even if the server is compromised somehow (e.g. a hardware failure or an admin mistake), the files can be recovered.
Some basic troubleshooting steps:
- Does the server think you already have the files because you deleted them from a synced workspace without opening them for delete? Try
p4 clean
to restore your workspace to the state that you last synced/submitted. - Are the files deleted at the head revision? Try syncing to an older revision.
- Did the files ever make it to the server? Try
p4 files //...
to see a list of all the files on the server.

Samwise
- 68,105
- 3
- 30
- 44
-
I don't think the files never made it to the server. Because in depot it only shows the file structure and nothing inside it. When I tried reverting it said missing file. I don't understand how files get deleted when copying and ends up nowhere to be found?!? – IceYY Dec 17 '18 at 13:17
-
Since I can't see any of what's going on and you didn't try any of my troubleshooting steps I unfortunately can't offer any further advice. I don't know whether the files were submitted, I don't know whether they're open right now, and I don't know what your workspace is synced to. I'd recommend contacting Perforce support (or posting on forums.perforce.com) since clearly a lot of back and forth will be needed in order to get all those pieces of information. – Samwise Dec 17 '18 at 15:48