Best way to transfer from users drive to shared drive

729 views
Skip to first unread message

Scott Wilhelm

unread,
Jan 7, 2022, 4:23:21 PM1/7/22
to google-ap...@googlegroups.com
Hello,

What's the current best way to transfer all files from a user's drive to a shared drive?

Thank you,
Scott

Kim Nilsson

unread,
Jan 8, 2022, 9:41:19 AM1/8/22
to GAM for Google Workspace
Make sure one user has access to all content in the entire folder structure (files and folders), preferably owner.
Then have that user move the top folder to the destinations Shared Drive.

I have a script for that, which also logs what happens to a file.

$ cat transfer_folder_to_someone

#!/bin/bash
# Give folder id (1) and username (2)
PATH=/home/kim/gamadv-xtd3:${PATH}

cd /home/kim/gamadv-xtd3

gam print ownership $1 | gam csv - gam user ~Owner add drivefileacl $1 user $2 role editor nodetails
gam user $2 claim ownership $1 | tee -a ~/GAM-activities/transferring-$1-to-$2.txt


However, to avoid breaking links to folders and files you may have in other places, I'd make sure you have access to the new move to Shared Drives beta where folderIds are kept the same. Without it, all folders will be created as new, with new unique folderIds.

Ian Crew

unread,
Jan 9, 2022, 1:52:02 PM1/9/22
to GAM for G Suite
Really useful, thanks @Kim! Does this work if there’s content in the myDrive folder that’s owned by people outside the domain (e.g., at another university)?

Thanks!

Ian

--
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/15807489-6485-4941-a64e-b79b6416b660n%40googlegroups.com.

 

Ian Crew

Solutions Architect
Productivity & Collaboration Services
Berkeley IT

Kim Nilsson

unread,
Jan 9, 2022, 2:08:04 PM1/9/22
to GAM for Google Workspace
The idea is to first move all content of the My Drive into a single folder before running my suggested script.
Like its name it transfers all content in a folder to one user, and My Drive isn't a folder.

Kim Nilsson

unread,
Jan 9, 2022, 2:08:51 PM1/9/22
to GAM for Google Workspace
And, no, you can't steal external people's content.

Ian Crew

unread,
Jan 9, 2022, 2:50:57 PM1/9/22
to google-ap...@googlegroups.com
Yeah, that’s what I feared, which doesn’t work for many of our use cases (sigh). For example, a real-world example from this past week for us, and an extremely common one for us and many other universities:

There’s a research group with participants from multiple universities. They’ve been using a folder tree in MyDrive for years (often prior to the invention of shared drives) and many different participants have created folders and files throughout the years. Some are still around/participating, others may have left over the years. The folks in charge of the research group would like to move (not copy) everything to a Shared Drive for all of the benefits that that entails in terms of long-term maintainability. 

It sounds like there’s really no way to accomplish this at this point. Does that sound right?

Thanks,

Ian

On Jan 9, 2022, at 11:08 AM, Kim Nilsson <there.is.no...@gmail.com> wrote:

And, no, you can't steal external people's content.

--
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.

Kim Nilsson

unread,
Jan 9, 2022, 2:57:46 PM1/9/22
to Google Apps Manager
Silently add all participants to the destination Shared Drive as Managers and just have the person owning the current base folder to the Shared Drive.

Content that can't be moved will remain.
 I think

That content will have to be moved by the real owner. 

If copy had been allowed, you could have just done that and the old stuff could have been deleted afterwards. 
Reply all
Reply to author
Forward
0 new messages