DEV Community

David Jiang
David Jiang

Posted on

Setting up rclone mount in Windows with GSuite Drive

1. Download and Install Prerequisites

  1. Download rclone and NSSM in to C:\rclone
  2. Download and install WinFsp

2. Set Up your Personal Google Drive Client ID

  1. Log into the Google API Console
  2. Select a project or create a new project.
  3. Under "ENABLE APIS AND SERVICES" search for "Drive", and enable the "Google Drive API".
  4. Click "Credentials" in the left-side panel
  5. Click on the "+ CREATE CREDENTIALS" button at the top of the screen, then select "OAuth client ID".
  6. Choose an application type of "Desktop app"
  7. Keep client ID and client secret for the next step

3. Configure rclone

  1. Navigate to C:\rclone and run .\rclone.exe config

n/r/c/s/q> n
name> gdrive
Storage> drive
client_id> Enter Client ID from #2.7
client_secret> Enter Client Secret from #2.7
scope> 1
root_folder_id>
service_account_file>
y/n>
y/n>
y/n>
y/e/d>
e/n/d/r/c/s/q>q

  1. mv ~\.config\rclone\rclone.conf .

4. Configure NSSM to run rclone mount on start up

  1. Open PowerShell as Administrator
  2. Navigate to C:\rclone
  3. .\nssm.exe install rclone
  4. Select rclone.exe for Application > Path
  5. Enter the following for Appplication > Arguments mount --vfs-cache-mode writes --log-level INFO --config "C:\rclone\rclone.conf" --log-file "C:\rclone\rclone.log" gdrive: G:
  6. Start the service .\nssm.exe start rclone

5. Backing up local files to GDrive

  1. To copy local directory to remote .\rclone.exe copy 'B:\Photos\' gdrive:Photos -v
  2. To sync local directory to remote .\rclone.exe sync 'B:\Photos\' gdrive:Photos -v
  3. Compare Local and remote .\rclone.exe check 'B:\Photos\' gdrive:Photos

Top comments (0)