Undelete a shared drive

147 views
Skip to first unread message

Justin H

unread,
Mar 13, 2024, 11:16:31 AM3/13/24
to GAM for Google Workspace
Is it possible to undelete a shared drive via GAM? Or is that restore option only available within the Admin Console?

Ross Scroggs

unread,
Mar 13, 2024, 12:13:27 PM3/13/24
to google-ap...@googlegroups.com
Justin,

There is no API support for this as far as I can tell, thus GAM can't help

Ross

On Wed, Mar 13, 2024 at 8:16 AM Justin H <hen...@vt.edu> wrote:
Is it possible to undelete a shared drive via GAM? Or is that restore option only available within the Admin Console?

--
You received this message because you are subscribed to the Google Groups "GAM for Google Workspace" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-man...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-manager/e098dc41-6252-4f2b-86d2-c0526c8bf070n%40googlegroups.com.


--

Justin H

unread,
Mar 13, 2024, 2:16:36 PM3/13/24
to GAM for Google Workspace
Thank you for that confirmation, Ross. Come on, Google, do better with our API options!!! argh

-Justin

Stewie Evelis

unread,
Nov 5, 2024, 12:37:30 AM11/5/24
to GAM for Google Workspace
Hi Ross,

I am in somewhat a similar situation.

Is it possible to restore the files and folders in a Shared Drive that were deleted just today using Gam?

Thank you in advance!

Stu

Ross Scroggs

unread,
Nov 5, 2024, 2:40:42 PM11/5/24
to google-ap...@googlegroups.com
Was the Shared Drive deleted and just files and folders with it?

Ross



--

Maj. Marshall Giguere

unread,
Nov 5, 2024, 3:10:35 PM11/5/24
to google-ap...@googlegroups.com
AFAIK if you delete a shared drive it is totally and irrevocably gone.  If files and folders have been deleted, but not purged they should be in the drive's trash from which they can be restored.

Justin H

unread,
Nov 5, 2024, 3:23:44 PM11/5/24
to GAM for Google Workspace
You can recover shared drives and their files for up to 25 days via the Admin console, but not via GAM (unless an undelete for shared drives is possible but that would be a recent and new feature TMK). https://support.google.com/a/answer/7376096?   *Make sure you have enough storage quota assigned to the shared drive to be able to restore all your data. Of course you won't know how much was there unless you had other data tracking it. This shared drive UI is severely lacking and quite buggy in a number of ways.

Stewie Evelis

unread,
Nov 5, 2024, 3:32:40 PM11/5/24
to google-ap...@googlegroups.com
Hi Ross,

Just files and folders. I can manually retrieve from trash via the UI but there's dozens of folders with hundreds of files in each so I was wondering if there's a way to revert these back to it's original structure via Gam.

Stewie Evelis

unread,
Nov 5, 2024, 3:33:14 PM11/5/24
to google-ap...@googlegroups.com

Stewie Evelis

unread,
Nov 5, 2024, 3:35:13 PM11/5/24
to google-ap...@googlegroups.com
Hi Maj,

Thanks for letting me know. I was hoping to do this via Gam since there's a lot of files and folders.

Ross Scroggs

unread,
Nov 5, 2024, 3:39:24 PM11/5/24
to google-ap...@googlegroups.com
Stewie,

Send me a Meet/Zoom invitation and we'll investigate.

Ross



--

Ross Scroggs

unread,
Nov 5, 2024, 4:04:38 PM11/5/24
to google-ap...@googlegroups.com

# Get explicitly trashed files on Shared Drive; replace sdma...@domain.com with actual Shared Drive manager

gam config csv_output_row_filter "explicitlyTrashed:boolean:true" redirect csv ./ExplicitlyTrashed.csv user sdma...@domain.com print filelist select teamdriveid <SharedDriveID> query "trashed=True" fields id,name,trashed,explicitlytrashed


# Untrash them

gam redirect stdout ./Untrash.txt multiprocess redirect stderr stdout csv ExplicitlyTrashed.csv gam user "~Owner" untrash drivefile "~id"


Ross

--

Maj. Marshall Giguere

unread,
Nov 5, 2024, 4:12:02 PM11/5/24
to google-ap...@googlegroups.com
Stewie;

As pointed out by Justin you can recover a drive using the admin console, but not with GAM.  It still applies that purged files are unrecoverable.

Maj. Marshall E Giguere

New Hampshire Wing Director of IT

Civil Air Patrol, U.S. Air Force Auxiliary

GoCivilAirPatrol.com

nhwg.cap.gov


Volunteers serving America's communities, saving lives, and shaping futures.



Reply all
Reply to author
Forward
0 new messages