Good Morning,
I know it has been a minute since we have discussed the above scenario; this has a lot to do with trying to get together with the vendor and actually see the data share itself. Ross, I appreciate the fact that we met back in April and we discussed a way to script moving all the files from an external share drive to an internal share drive inside our org.
When I met with the vendor after this meeting it was brought to my attention what they were calling a "share drive" is actually a my drive folder that belongs to one of the users inside the vendors organization. Currently that shared my drive folder has been shared with people inside our school district so our employees have been creating files and storing them in the shared folder structure but they belong to our employees. The trick here is that we want to migrate this all under our Google org; but we want to be careful not to lose the current folder structure.
So I think the way this is going to work, we have to have the vendor's admin move the "my drive" folder and files they can to the share drive the vendor creates inside there google org. (I will refer to this as the external team drive.) They will also need to make sure that our Google Admins have access to this external share as managers. However, because they don't own the files created by people inside our org, I will have to also run a move on this my drive folder to get the documents that belong to our org that is mixed in with the vendors documents. The big concern is that we do not want to lose the folder structure because of the collaboration between the district's math department and the vendor firm that helped create the work books. What makes this difficult is that they don't have a google admin on there side; so they are in the process of hiring someone to help us complete this task; because I don't want the responsibility of working both sides of this fence.
So here is what I am envisioning:
Both the vendor admin and myself would run the following commands:
Vendor firm getting the initial load to the external share drive:
gam redirect stdout .\MoveFilesToSdContractedFirm.txt redirect stderr stdout user <superadmin user> move drivefile <contracted firms my drive ID> teamdriveparentid <External teamdrive ID> mergewithparent duplicatefolders duplicatename duplicatefiles duplicatename copysubfolderpermissions false retainsourcefolders
(Only the first pass) After, we need to exclude "duplicatefolders duplicatename" so we don't duplicate folders over and over if we need to run it a second time.
Then from school district side we would need to run:
gam redirect stdout .\MoveFilesToSdContractedFirm from district.txt redirect stderr stdout user <superadmin user> move drivefile <contracted firms my drive ID> teamdriveparentid <External teamdrive ID> mergewithparent duplicatefiles duplicatename copysubfolderpermissions false retainsourcefolders
I have two concerns: When we run the first command on the contractors side the files in the my drive folder that are owned by our employees GAM is not going to not move them; instead it will create shortcuts. Will this be a concern when I run the 2nd command that will affectively transfer the ownership temporarily to the vendor firm as we move our staffs documents to the external team drive owned by vendor. Also notice that the 2nd command I have excluded "duplicatefolders duplicatename" so that we don't start creating the folders again from our side.
After both of these commands are ran; we should still have a skeleton structure in the original my drive location from the vendor. The only things left should be documents that are not owned by either the vendor or our district org. Mainly, personal gmail accounts or additional orgs. The vendor firm is working to get there staff to correct the documents that were put there with personal accounts. I am trying to give these people grace because I know they are not IT folks and they don't understand our mindset. But I am realizing this is a really deep rabbit hole, that we went down.
Once we have everything in the external share and everyone is pleased with the state of the skeleton folder structure on the original my drive folder. We want to transfer the external share data to a share drive inside our district org to take ownership from the vendor. So at that point we will stand up a new share drive inside our org and run the following commands:
gam redirect csv ./topvenderstuff.csv user <super admin user> print filelist select teamdriveid
<External teamdrive ID> depth 0 fields id,name
** Make sure that you specify depth 0 – failure to do will flatten the file structure.
After we have the above topvenderstuff.csv we can then run the following command to move the files from the vendor share drive to our internal share drive. The teams drive that we specify below will be the target.
gam redirect stdout ./movevenderstuff.txt multiprocess redirect stderr stdout csv topvenderstuff.csv gam user ~Owner update drivefile ~id teamdriveparentid <our internal org team drive ID>
What else do we need to be thinking about?
Thanks,
Ed