Network drive migration to G Drive

Hi,

(I want to preface this with an apology if i'm posting in the incorrect forum for something like this, and if there is a guide I may have missed it.)

I'm trying to migrate files from our local server to Google Drive.

We currently have a server that allows users store their files onto a home drive, (H:) in this case. We want to make the process of moving all of their files from this drive to the cloud (Google Drive). Rclone is one of the tools that I'm exploring...

I don't have much experience with this tool... I was able to run the command line tool, create a remote for myself and use rclone copy to back everything up from a test H: drive and into that respective account's Google Drive, the process was simple.

However now I need to think of how I can run this process automatically for individual users who log into their desktop, either with a script that they can run from desktop and it drops all of their H: drive files into a folder called 'backup' in their Google Drive, or possibly using a google service account to impersonate the users (this would have to be able to execute in bulk due to high number of accounts).

Please let me know your thoughts.

I run in a single user environment and never really thought much from a corporate 'non technical' user kind of sense.

The challenge I think would be authentication as you really want to use the right user, but the user has to authenticate like any other Google App as I don't think you can 'preload' that authentication.

Is the use case that you have a local computer/laptop and you want to copy those files to GDrive using rclone?

The challenge I think would be authentication as you really want to use the right user, but the user has to authenticate like any other Google App as I don't think you can 'preload' that authentication.

That was my thought as well. Dont know if it is possible in rclone to script for user to generate their own token once ran (via powershell or .bat / etc.).

Is the use case that you have a local computer/laptop and you want to copy those files to GDrive using rclone?

The users have a home drive located on our network (H:), they have access to it from any workstation that they log into on our domain. I want the user to be able to log in, have a script run that could create a remote for them, they authenticate, and then it uses rclone copy to copy over the entire H: drive into their google drive.

it seems simple enough in theory, I just don't know if it's possible to do it this way with rclone.

It seems quite do-able to me.

You can automate create of config files with rclone config create - this will prompt the user at the right time to log in with the browser.

You could then kick off an rclone copy H:\ drive:HDrive automatically.

1 Like

Thanks for the tip!
I'll do some testing next week and see what we can conjure up.

You could possibly centralize the process by using a service account and user impersonation, instead of relying on each user and upload directly from the server.

I thought the big hoopla as of late was reduced quotas and such for service accounts. I don't use them myself but thought that was a thing.

When impersonating you use the users quota.

1 Like

I seem to be on the right path...
I created the .bat file with the following script--

cd C:\Users\Public\rclone
rclone config create HDrive drive env_auth true
pause
rclone copy H:\ drive:HDrive
@ echo off
pause

here is the error I get--
2020/09/25 12:31:54 Failed to create file system for "drive:H_Drive": didn't find section in config file

When I check the config file in .rclone I do see the entry for H_Drive so i'm not sure where it's pointing to.

That would be your remote name so you can use "HDrive:" instead of the drive:HDrive. Bit confusing at first!

1 Like

It works!!

cd C:\Folder\rclone
rclone config create H_Drive drive env_auth true
rclone copy H: H_Drive:home_backup -P
@echo off
echo [[[  TRANSFER COMPLETE  ]]]
pause

Now I just need to figure out how I want to deploy it... Thank you all !!!

Any reason to not centralize it? Isn't it a bit of a risk leaving it to the individual users?

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.