Knowledge base

1000 FAQs, 500 tutorials and instructional videos. Here, there are only solutions!

Import data to kDrive from Google Drive

This guide details how to import Google Drive data using rClone on kDrive Infomaniak.

 

✘ UNAVAILABLE with
kSuite free / kSuite Standard
my kSuite / my kSuite+ (ik.me, etik.com, ikmail.com) 


 

⚠ Available with:

kSuitefree
 Standard
 Business
 Enterprise
 my kSuite
 my kSuite+
kDriveSolo
 Team
 Pro

 

1. Configure rclone for drive access

 

Install rclone on your computer

There is a version of rclone with a graphical interface (GUI) but it is quite possible to do this via the command line (CLI):

  1. Install rclone from a Terminal type application on your device, by typing the entire following command:
    sudo -v ; curl https://rclone.org/install.sh | sudo bash
  2. Enter the password for your session on your computer to start the installation:

 

Configure the remote disk (Google Drive) on rclone

  1. Once rclone is installed, enter the command rclone config.
  2. Then choose to configure a new remote import by answering n for New remote.
  3. Name the remote disk, for example gdrive:
  4. Then choose the type of disk to import by answering drive which corresponds to Google Drive among the proposed choices.

You then need to authorize the connection to Google Drive from a browser.

By default, rclone uses a shared client ID among all users, which can lead to request limitations imposed by Google. It is strongly recommended to use your own client ID to avoid these restrictions.

  1. Access the Google API Console with your Google account.
  2. Create or select a project.
  3. Enable the Google Drive API via the button/link "Enable APIs and services".
  4. Search for the keyword Drive and click on Google Drive API:
  5. Click on the Enable button.
  6. Click on Credentials in the left sidebar (and not on a similar button).
  7. Click on Configure the OAuth consent screen (if not already done):
    • Enter a name, for example rclone.
    • Select "External" (or "Internal" if you are a Google Workspace user).
    • Under “Data access”, add the scopes ("fields of application") necessary:
      • https://www.googleapis.com/auth/docs,https://www.googleapis.com/auth/drive,https://www.googleapis.com/auth/drive.metadata.readonly
    • Save.
    • Add your email account as a test user under "Audience".
    • Go back to the "Google Auth Platform" section.
  8. Create OAuth credentials:
    • Click on "Create credentials / OAuth client ID".
    • Choose "Desktop app" and leave the default name, then click on the Create button.
    • Keep the client ID and the client secret code displayed.
  9. If "External" was chosen in point 7 above, go back to “Audience” in the left sidebar and click on “Publish the application”.

Due to the "enhanced security" recently introduced by Google, you are theoretically supposed to "submit your application for verification" and wait several weeks for their response.
In practice, you can directly use the client ID and client secret with rclone (read the rest of the guide). The only consequence will be a very intimidating confirmation screen when you log in via your browser to allow rclone to obtain its token-id. However, as this only happens during the initial setup of the remote storage, it is not a major issue.
It is also possible to leave the application in "Test" mode, but in this case, any authorization will expire after a week, which can be cumbersome to renew frequently. If a short validity period does not pose a problem for your use, then keeping the application in test mode may be sufficient.

Go back to rclone in the terminal:

  1. Indicate to rclone the client_id by copying-pasting the Client ID obtained in point 8 above, same for the secret phrase.
  2. Then choose the scope n°1:
  3. Press the “Enter” key to leave the service_account_file question blank.
  4. Answer “No” n to the question about “advanced configuration”.
  5. Answer “Yes” y to the question about connecting via Web browser:
  6. A web page opens in your browser allowing you to connect to Google and authorize the application you created in step 9 above.
  7. Once the permissions are granted, you should receive the following message:
  8. In the terminal, answer “No” n to the question about “Shared Drive (Team Drive)”.
  9. Answer “Yes” y to the last question:

 

Configuration of the destination disk (kDrive) on rclone

It is possible to act directly on the rclone configuration file by pasting your kDrive configuration in it, for example:

[kdrive]
type = webdav
url = https://kDrive_ID_HERE.connect.kdrive.infomaniak.com/
vendor = other
user = user@email.com
pass = PASSWORD_HERE_OR_APP_PASSWORD_IF_2FA

 

But here is how to proceed step by step as for the previous configuration:

  1. Still in the terminal, enter n for a new disk configuration and enter the name kDrive to recognize your destination disk:
  2. Then choose the type of disk to import by answering webdav which corresponds to a WebDAV configuration among the choices offered.
  3. Enter the following information:
    • url = direct access to kDrive (refer to this other guide regarding the kDrive ID for the connection URL)
    • vendor = rclone (option n°6)
    • user = email address to log in to the Infomaniak user account
  4. Answer “Yes” y for the question about the password, then enter the password:
    • application password in case of double authentication activated or the one from your Infomaniak user account if you have not activated 2FA.
  5. Leave the bearer_token blank then answer “No” n to the question about “advanced configuration”.
  6. Answer “Yes” y to the last question and your 2 disks are displayed:

 

2. Copy data from Google Drive to kDrive

kDrive supports rclone streaming upload via WebDAV, up to 50 GB (extendable to 100 GB) to prevent abuse, with automatic error handling if the limit is exceeded without prior specification of the size via Content-Length.

Prerequisites

  • Consult the options available in the official guide before starting an import, particularly these important commands:
    • --drive-skip-shortcuts to avoid infinite import loops
    • --drive-shared-with-me to get what has been shared
    • --drive-acknowledge-abuse to force the download of files blocked by Google

Example of a command to start copying your Google Drive to the root of your kDrive:

sudo rclone copy gdrive: kDrive:

This will instantly start copying your folders, subfolders, and Google Drive contents to the personal folder of your Infomaniak kDrive!

Google documents such as Gdocs, Sheets, Slides, etc. are converted to Office formats like .docx, .xlsx, etc. and are readable directly on kDrive.


Has this FAQ been helpful?