Scenario
- There are many files in a Google (Team) Drive, all of which are nested in folders
- All of these folders and their files are deleted by mistake.
- In an attempt to recover the data, the
Restore
button on the Web UI is used - The
Restore
button in the Web UI does not seem to care about the order, and restores files before restoring the folders that contained them. - Thousands of files end up in the root directory of the drive since their folders "don't exist" when being restored from Trash.
What I need:
How can I recover the information about where the files used to reside, in order to patch this correctly?
What I tried:
- Get all of the revisions for one of the files in question with Revisions: list and see there is only 1 result.
- Get the revision information for that revision with Revisions: get
- Realise that the revision information contains nothing about parents.
- Get the file information with Files: get
- Confirm that the head revision meta matches the only revision found in step 1
- See that the file meta shows the parent is the root.
I can't find a way of determining what the original folder was for the trashed and incorrectly restored file.