How do I restore a deleted Drive file or folder?
These commands require the Drive CLI and an authorized session in the intended Socra Account.
Normal deletion moves entries to trash. A writer or owner can restore them while they still have access to the Drive. The current release has no permanent-delete action.
List trashed entries in the relevant folder. Replace DRIVE_ID and the folder path:
socra drive ls DRIVE_ID /Notes --deleted only
If has_more is true, repeat the list with --after LAST_ID, using the final ID from that page. Keep the trashed entry's ID and restore it:
socra drive file restore FILE_ID
Restoration fails if another live entry has taken the same name in the destination folder. Resolve that collision before retrying. If a parent folder and its child were trashed separately, restore the parent first and then the child.
Trashing a folder makes its descendants inaccessible. Restoring the folder does not restore children that were separately deleted. Inspect the folder after restoration to confirm the entries you need are available.
A deleted Drive needs its owner's restoration before its files can be accessed:
socra drive restore DRIVE_ID
If an entry cannot be found, check the selected Account, your Drive grant, and whether an ancestor folder is still in trash. An ID alone does not bypass access checks.