Untrashing drive files and emails

3,061 views
Skip to first unread message

Samuel Wibrow

unread,
Apr 2, 2017, 2:26:47 PM4/2/17
to google-ap...@googlegroups.com
Hey!

So we've had a few people leave the company recently and have found that they are deleting their emails and drive files beforehand. Is there already a command to use the Drive and Email untrash function?

If not, can i list all the bin files then untrash each one with the file id?

Many thanks,
Sam

--

Samuel Wibrow
System Administrator



T | +49 (0) 89 - 1222 895 - 0
F | +49 (0) 89 - 1222 895 - 48 
E | samuel...@stylight.com

STYLIGHT.COM
BLOG.STYLIGHT.COM

 Facebook   Twitter   Instagram

Nymphenburger Str. 86, 80636 München, Deutschland.
Geschäftsführer: Maximilian Müller Prokuristen: Dan Ackerson, Andreas Wanderer
Handelsregister Abteilung B 176416, Amtsgericht München

Jay Lee

unread,
Apr 2, 2017, 7:58:27 PM4/2/17
to google-ap...@googlegroups.com
So if the offenders "did it right" then the answer is no. GAM can't undelete mail or files that have been purged from the Trash folder. For that you really need to look at Google Vault. Vault allows you to set retention policies on files which keep them around and available to your organization even after users delete them from Trash.

Supposing they deleted the files and emails but forgot to empty Trash, they can be moved out of Trash with GAM:

gam user gotf...@acme.com modify messages query in:trash removelabel TRASH doit maxtomodify 999999

gam user gotf...@acme.com show filelist query trashed=true id  | gam csv - gam user gotf...@acme.com update drivefile id ~id trashed false

Jay

--
You received this message because you are subscribed to the Google Groups "GAM for G Suite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-manager+unsub...@googlegroups.com.
To post to this group, send email to google-apps-manager@googlegroups.com.
Visit this group at https://groups.google.com/group/google-apps-manager.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-manager/CAMkLzo1yWuE_Hk6R2gx4t%2Bp_WCuX%2Bry8R2yLU8tMu3T%3D135jpA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

+KimNilsson

unread,
Apr 6, 2017, 7:11:11 AM4/6/17
to GAM for G Suite
Also, there's the regular admin routine to restore anything in Drive and Gmail up to 25 days after emptying the trash.

Samuel Landete

unread,
Jun 12, 2017, 6:19:33 AM6/12/17
to GAM for G Suite
I have just used this to restore 7593 files that I had accidentally deleted and could not restore with the admin console - thank you!
To post to this group, send email to google-ap...@googlegroups.com.


Karal Milani

unread,
Oct 11, 2021, 1:17:24 PM10/11/21
to GAM for Google Workspace
Hi Samuel 
I do really appreciate if you let me know how to restore deleted mails out of trash, if possible !?
or do you think I should contact Gsuit support !?

because I did apply delete to a group members
without knowing that one of the staff was added to the group by mistake
and I did not check that 
Reply all
Reply to author
Forward
0 new messages