RClone is available for Windows, Mac, and Linux and provides functionality to store and retrieve data from remote sources including UW Google Drive, SFTP, and OneDrive. It is a command line program and is very easy to script with once you have setup the connection.

Installation and Basic Setup

Please note the prompts change quite frequently; the key step is entering drive when prompted for what type of connection and not using auto config.

  1. Download and save the appropriate version from https://rclone.org/downloads/
  2. Open up cmd (Windows) or a terminal (Linux/Mac)
  3. Navigate to where you saved the program
  4. Run "rclone config"
  5. Enter "n" to setup a new connection
  6. Give it a name, for example "netid_gdrive"
  7. Enter "drive" for the type of connection
  8. You can leave client_id and client_secret blank for most connections
  9. Enter "drive" to allow uploading and downloading
  10. For root_folder_id you can leave it blank for access to your entire Google Drive or
  11. Leave service_account_file blank
  12. Don't use advanced setup unless you have a specific problem you are trying to solve.
  13. Select No to auto config. It will now attempt to open a browser window but will also give you a link you can paste in to any browser if you don't have remote graphical access.
  14. If you selected No or a browser window doesn't appear open up the URL in the browser of your choice
  15. IMPORTANT Make sure you log into the correct account; UW Google Drive has unlimited space but personal accounts typically do not. Additionally UW Google Drive is FERPA compliant; personal accounts are not
  16. Enter your authorization code
  17. Enter "no" to configure this as a team drive (unless you are configuring a team drive of course)
  18. Enter "y" to save the configuration
  19. Enter "q" to quit the config. Your connection should now be ready to use. You can test it by running "rclone ls --max-depth 1 netid_gdrive:/" which will show the top level contents of your remote connection

Examples

These examples assume you are in the directory with rclone

  • Simple Upload to Top Level
    ./rclone copy /tmp/test_directory netid_gdrive:/
  • Simple Upload to Specific Directory
    ./rclone copy /backups netid_gdrive:/server/2017-07-24
  • Simple Download to Current Directory
    ./rclone copy netid_gdrive:/import_file.doc ./

Team Drive Setup

- Open up cmd (Windows) or a terminal (Linux/Mac)

  1. Navigate to where you saved the program
  2. Run "rclone config"
  3. Enter "n" to setup a new connection
  4. Give it a name, for example "name_teamdrive"
  5. Enter "drive" for the type of connection
  6. You can leave client_id and client_secret blank for most connections
  7. Enter "drive" to allow uploading and downloading
  8. For root_folder_id you can leave it blank for access to your entire Google Drive or
  9. Leave service_account_file blank
  10. Don't use advanced setup unless you have a specific problem you are trying to solve.
  11. Select No to auto config. It will now attempt to open a browser window but will also give you a link you can paste in to any browser if you don't have remote graphical access.
  12. If you selected No or a browser window doesn't appear open up the URL in the browser of your choice
  13. IMPORTANT Make sure you log into the correct account; UW Google Drive has unlimited space but personal accounts typically do not. Additionally UW Google Drive is FERPA compliant; personal accounts are not
  14. Enter your authorization code
  15. Enter "yes" to configure this as a team drive (unless you are configuring a team drive of course)
  16. Select the number or ID corresponding to the team drive you want to add
  17. Enter "y" to save the configuration
  18. Enter "q" to quit the config. Your connection should now be ready to use. You can test it by running "rclone ls --max-depth 1 name_teamdrive:/" which will show the top level contents of your remote connection

Encrypted Setup

You must have a working rlcone to Google Drive connection setup before setting up an encrypted connection. - Open up cmd (Windows) or a terminal (Linux/Mac)

  1. Navigate to where you saved the program
  2. Run "rclone config"
  3. Enter "n" to setup a new connection
  4. Give it a name, for example netid_gdrive_encrypted
  5. Enter "crypt" for the type of connection
  6. Enter the path it will be stored at; for example "netid_gdrive:/backups"
  7. Select whether you want to encrypt filenames. The advantage is that no one would know what any given file was (ie passport_scan.pdf would appear as gibberish instead). The disadvantage is that you would only be able to use rclone to verify if something was uploaded or not rather than being able to check file names.
  8. Select whether you want to encrypt directory names. Same advantages and disadvantages as above.
  9. Select either "y" to enter your own password or "g" to generate a password. Don't lose the password otherwise the files may be unrecoverable
  10. Select whether or not to enter a salt password; it is optional but makes it more secure. Don't lose the password otherwise the files may be unrecoverable
  11. Enter "y" to save the configuration
  12. Enter "q" to quit the config. Your connection should now be ready to use. You can test it by running "rclone ls --max-depth 1 netid_gdrive_encrypted:/" which will show the top level contents of your remote connection

If you forget the passwords you set here you will only be able to access the files from computers you have already setup the encrypted connections on. If you lose both the password and the configuration from the computers that already have access the files are unrecoverable.

  • comphelp/backups/rclone.txt
  • Last modified: 2018/12/06 16:56
  • by essach