Reverse a Drive Data Transfer

434 views
Skip to first unread message

Don Beck

unread,
Jul 29, 2024, 1:30:11 PM7/29/24
to GAM for Google Workspace
We had a user incorrectly have their My Drive transfered over to our admin account.  Need to reverse this and put everything back in the users My Drive.  I've got the transfer ID if that helps and the folder id in the admin account where it lives now.

Thanks
Don

Maj Marshall Giguere

unread,
Jul 29, 2024, 2:18:33 PM7/29/24
to google-ap...@googlegroups.com
Don;

No, there is no "undo" for transfers that I'm aware of.  If the transfer was initiated using a Google data transfer the users entire MyDrive would have been transferred to the target users MyDrive in a sub-folder with the original owners email address as the name.  The simplest possible method would be to move that folder to the original owner's MyDrive.  Suggested readings: https://github.com/taers232c/GAMADV-XTD3/wiki/Users-Drive-Copy-Move#move-with-ownership-change

This is a transfer by ownership, assuming the transfer was done with a Google transfer.  It should move the folder created by the transfer, and its subfolders, to the root directory of the original owner's MyDrive. You will still need to rearrange any subdirectories and files to move them back to their proper locations, and any permissions/sharing will likely have been altered or removed in the initial transfer.

$> gam user <current user> transfer ownership <folderID to move>  user <original user>

NOTE: what you are about to do is fraught with peril.  I would recommend you try some experiments beforehand.  For instance create a folder on the source user's MyDrive and populate it with a file or two, then try this out.  You can then decide whether to proceed with the big one.  I'm sure Ross will have either comments or corrections to my suggestion.

-Marsh


PLEASE NOTE
The information in this E-Mail message is legally privileged and confidential information intended only for the use of the individual(s) named above.  If you, the reader of this message, are not the intended recipient, you are hereby notified that you should not further disseminate, distribute, or forward this E-mail message.  If you have received this E-mail in error, please notify the sender. Thank you!

--
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/9d31a562-a147-4df8-a245-6b735fb2d651n%40googlegroups.com.

Don Beck

unread,
Jul 29, 2024, 4:53:12 PM7/29/24
to GAM for Google Workspace
Ross helped me with this command

gam redirect stdout ./revert.txt redirect stderr stdout user ad...@domain.com transfer drive us...@domain.com select <folder id> targetfolderid root targetuserfoldername "" mergewithtarget orderby folder orderby name preview

with the preview at the end of the command, GAM wrote to the revert.txt file with what it would do.  I reviewed that file and ran again without the preview and it put things back and again wrote to the text file for a log.
The mergwithtarget prevented the transfer from createing a subfolder underneath the users My Drive and put everything back as it was originally

Way to go Ross!!!

Maj Marshall Giguere

unread,
Jul 29, 2024, 9:34:24 PM7/29/24
to google-ap...@googlegroups.com
Don;

Yes, I'm aware.  Ross pointed out that I inadvertently used transfer ownership instead of the "transfer drive" method.  Apologies for the screw-up.  Ross corrected me.  Moving files around in the Workspace world is complex.  I usually try out what I'm planning on my dummy users first, in this case I was the dummy. ;-)

-Marsh

PLEASE NOTE
The information in this E-Mail message is legally privileged and confidential information intended only for the use of the individual(s) named above.  If you, the reader of this message, are not the intended recipient, you are hereby notified that you should not further disseminate, distribute, or forward this E-mail message.  If you have received this E-mail in error, please notify the sender. Thank you!

--
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.
Reply all
Reply to author
Forward
0 new messages