1000 FAQs, 500 tutorials and explanatory videos. Here, there are only solutions!
Import data from kDrive to Google Drive
This guide details how to import Google Drive data using rClone on kDrive Infomaniak.
COMPATIBILITY my kSuite ✗​​ | my kSuite+ ✗​ ✔​= Compatible offer ​| ​✗​= Not available |
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):
- 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
- Enter the password for your session on your computer to start the installation:
- Refer to the official installation guide if necessary.
Configure the remote disk (Google Drive) on rclone
- Once rclone is installed, enter the command
rclone config
.- Refer to the official configuration guide if necessary.
- Then choose to configure a new remote import by answering
n
forNew remote
. - Name the remote disk, for example
gdrive
: - Then choose the type of disk to import by answering
drive
which corresponds to Google Drive among the choices offered.
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 result in request limitations imposed by Google. It is strongly recommended to use your own client ID to avoid these restrictions. <li><strong>Access the </strong><a href="https://console.developers.google.com/" target="_blank"><strong>Google API Console</strong></a> with your Google account.</li>
Create or select a project.
- <li><strong>Enable the Google Drive API</strong> via the button/link "Enable APIs and services".</li>
- Search for the keyword
Drive
and click onGoogle Drive API
: - Click on the Enable button.
- Click on Credentials in the left sidebar (and not on a similar button).
- 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") required:
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.
- Enter a name, for example
- 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
andclient secret code
displayed.
- If "External" was chosen in step 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, since 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.
rclone in the terminal:<li>Indicate to <i>rclone</i> the <code>client_id</code> by copying-pasting the <code>Client ID</code> obtained in step 8 above, same for the secret phrase.</li>
- Then choose the
scope
n°1: - Press the “
Enter
” key to leave theservice_account_file
question blank. - Answer “No”
n
to the question about “advanced configuration”. - Answer “Yes”
y
to the question about connecting via Web Browser:
A web page opens in your Web Browser allowing you to connect to Google and authorize the application you created in step 9 above.
- Once the permissions are granted, you should receive the following message:
- <li>In the terminal, <span>answer “No” </span><code>n</code><span> to the question about “</span><code>Shared Drive (Team Drive)</code><span>”.</span></li>
- Answer “Yes”
y
to the last question:
Configuration of the destination disk (kDrive) on rclone
<p>It is possible to act directly on <a href="https://rclone.org/commands/rclone_config_file/" target="_blank">the configuration file of <i>rclone</i></a> by pasting your kDrive configuration in it in the form of for example:</p>
But here is how to proceed step by step as for the previous configuration:
[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
<li>Still in the terminal, enter <code>n</code> for a new disk configuration and enter the name <code>kDrive</code> to recognize your destination disk:<br/><img height="411" src="https://faq.storage5.infomaniak.com/bae2707f23e257c1ad9cd8e20a4b9ddf90fed124.png" width="298"/></li>
- Then choose the type of disk to import by answering
webdav
which corresponds to a WebDAV configuration among the choices offered.
Enter the following information:
- <li><code>url</code> = direct access to kDrive (refer to <a href="https://faq.infomaniak.com/2409" target="_blank">this other guide</a> regarding the kDrive ID for the connection URL)</li>
vendor
= rclone (option n°6)user
= email address for logging into the Infomaniak user account- Answer “Yes”
y
to the password question, then enter the password:- application password if double authentication is enabled or the one for your Infomaniak user account if you have not enabled 2FA.
- Leave the
bearer_token
blank, then answer “No”n
to the question about “advanced configuration”. - Answer “Yes”
y
to the last question and your 2 disks will appear:
2. Copy data from Google Drive to kDrive
<p>kDrive supports <a href="https://rclone.org/overview/#optional-features" target="_blank">rclone streaming upload</a> 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 <code>Content-Length</code>.</p>
<li>Consult the available options in the <a href="https://rclone.org/drive/" target="_blank">official guide</a> before starting an import, including these important commands:<ul><li><code>--drive-skip-shortcuts</code> to avoid infinite import loops</li><li><code>--drive-shared-with-me</code> to get what has been shared</li><li><code>--drive-acknowledge-abuse</code> to force the download of files blocked by Google</li></ul></li>
Example of a command to start copying your Google Drive to the root of your kDrive:
<p>This will instantly start copying your folders, subfolders, and Google Drive contents to the <strong>personal folder</strong> of your Infomaniak kDrive!</p>
sudo rclone copy gdrive: kDrive:
The Google documents of type Gdocs, Sheets, Slide, etc. are converted to Office formats such as .docx
, .xlsx
, etc. readable directly on kDrive.
Les documents Google de type Gdocs, Sheets, Slide, etc. sont convertis aux formats Office type .docx
, .xlsx
, etc. lisibles sur kDrive directement.