Google Drive
In CloudMount
Section titled “In CloudMount”- Sign-in happens in your browser. CloudMount uses rclone’s shared client ID unless you set your own, and rclone says that shared ID stops working during 2026: use your own client ID.
- Google Docs, Sheets and Slides open on Android as PDF or Office exports; see Google Docs.
- Duplicate names: Google Drive allows two files with the same name in a folder. rclone can reach only one of them by name, and CloudMount for Windows shows only one.
- Upload quota: Google limits uploads to about 750 GB a day per account.
- Changes made elsewhere show up within about 15 seconds on Windows, through change notifications.
At a glance
Section titled “At a glance”| Capability | Support |
|---|---|
| rclone support tier | Tier 1: Core |
| Checksums | MD5, SHA-1, SHA-256 |
| Modification times | Kept, to 1 ms |
| Case-insensitive names | No |
| Duplicate names allowed | Yes |
| Server-side copy | Yes |
| Server-side move and rename | Yes |
| Folder move and rename | Yes, in one step |
| Free space reporting | Yes |
| Empty folders | Yes |
| Change notifications | Yes |
| Uploads of unknown size | Yes |
| Public links | Yes |
Setup notes
Section titled “Setup notes”In CloudMount you add this drive from the Add drive screen, and the wizard asks for the options listed under Options. The notes below come from rclone’s setup guide.
Scopes
Section titled “Scopes”Rclone allows you to select which scope you would like for rclone to use. This changes what type of token is granted to rclone. The scopes are defined here.
A comma-separated list is allowed e.g. drive.readonly,drive.file.
The scope are
This is the default scope and allows full access to all files, except for the Application Data Folder (see below).
Choose this one if you aren’t sure.
drive.readonly
Section titled “drive.readonly”This allows read only access to all files. Files may be listed and downloaded but not uploaded, renamed or deleted.
drive.file
Section titled “drive.file”With this scope rclone can read/view/modify only those files and folders it creates.
So if you uploaded files to drive via the web interface (or any other means) they will not be visible to rclone.
This can be useful if you are using rclone to backup data and you want to be sure confidential data on your drive is not visible to rclone.
Files created with this scope are visible in the web interface.
drive.appfolder
Section titled “drive.appfolder”This gives rclone its own private area to store files. Rclone will not be able to see any other files on your drive and you won’t be able to see rclone’s files from the web interface either.
drive.metadata.readonly
Section titled “drive.metadata.readonly”This allows read only access to file names only. It does not allow rclone to download or upload data, or rename or delete files or directories.
Root folder ID
Section titled “Root folder ID”This option has been moved to the advanced section. You can set the
root_folder_id for rclone. This is the directory (identified by its
Folder ID) that rclone considers to be the root of your drive.
Normally you will leave this blank and rclone will determine the correct root to use itself.
However you can set this to restrict rclone to a specific folder hierarchy or to access data within the “Computers” tab on the drive web interface (where files from Google’s Backup and Sync desktop program go). However, this is not the easiest method. Instead, you can create a shortcut to a folder in “Computers” and place it in “My Drive.” To do so, right-click the folder, select “Organize”, and then choose “Add shortcut” in the Google Drive web interface. Once you add the shortcut to “My Drive,” rclone will display the folder, allowing you to interact with it. See also Shortcuts.
If, however, you choose to change your root folder, you will have to find the Folder ID of the
directory you wish rclone to display. This will be the last segment
of the URL when you open the relevant folder in the drive web
interface.
So if the folder you want rclone to use has a URL which looks like
https://drive.google.com/drive/folders/1XyfxxxxxxxxxxxxxxxxxxxxxxxxxKHCh
in the browser, then you use 1XyfxxxxxxxxxxxxxxxxxxxxxxxxxKHCh as
the root_folder_id in the config.
NB folders under the “Computers” tab seem to be read only (drive gives a 500 error) when using rclone, but they are also read-only in the Google Drive web interface, likely because this folder is managed by the Google Drive Desktop tool. Top-level folders in “Computers” are read-only, but you can interact with folders contained within them using rclone. These are the folders for which you can create a shortcut as well, as described above.
There doesn’t appear to be an API to discover the folder IDs of the “Computers” tab - please contact us if you know otherwise!
Note also that rclone can’t access any data under the “Backups” tab on the google drive web interface yet.
Service Account support
Section titled “Service Account support”You can set up rclone with Google Drive in an unattended mode, i.e. not tied to a specific end-user Google account. This is useful when you want to synchronise files onto machines that don’t have actively logged-in users, for example build machines.
To use a Service Account instead of OAuth2 token flow, enter the path
to your Service Account credentials at the service_account_file
prompt during rclone config and rclone won’t use the browser based
authentication flow. If you’d rather stuff the contents of the
credentials file into the rclone config file, you can set
service_account_credentials with the actual contents of the file
instead, or set the equivalent environment variable.
Use case - Google Workspace account and individual Drive
Section titled “Use case - Google Workspace account and individual Drive”Let’s say that you are the administrator of a Google Workspace. The goal is to read or write data on an individual’s Drive account, who IS a member of the domain. We’ll call the domain <example.com>, and the user foo@example.com.
There’s a few steps we need to go through to accomplish this:
1. Create a service account for example.com
Section titled “1. Create a service account for example.com”- To create a service account and obtain its credentials, go to the Google Developer Console.
- You must have a project - create one if you don’t and make sure you are on the selected project.
- Then go to “IAM & admin” -> “Service Accounts”.
- Use the “Create Service Account” button. Fill in “Service account name” and “Service account ID” with something that identifies your client.
- Select “Create And Continue”. Step 2 and 3 are optional.
- Click on the newly created service account
- Click “Keys” and then “Add Key” and then “Create new key”
- Choose type “JSON” and click create
- This will download a small JSON file that rclone will use for authentication.
If you ever need to remove access, press the “Delete service account key” button.
2. Allowing API access to example.com Google Drive
Section titled “2. Allowing API access to example.com Google Drive”- Go to example.com’s Workspace Admin Console
- Go into “Security” (or use the search bar)
- Select “Access and data control” and then “API controls”
- Click “Manage domain-wide delegation”
- Click “Add new”
- In the “Client ID” field enter the service account’s “Client ID” - this can be found in the Developer Console under “IAM & Admin” -> “Service Accounts”, then “View Client ID” for the newly created service account. It is a ~21 character numerical string.
- In the next field, “OAuth Scopes”, enter
https://www.googleapis.com/auth/driveto grant read/write access to Google Drive specifically. You can also usehttps://www.googleapis.com/auth/drive.readonlyfor read only access with--drive-scope=drive.readonly. - Click “Authorise”
3. Configure rclone, assuming a new install
Section titled “3. Configure rclone, assuming a new install”rclone config
n/s/q> n # Newname>gdrive # Gdrive is an example nameStorage> # Type driveclient_id> # Can be left blankclient_secret> # Can be left blankscope> # Select the scope use used in step 2root_folder_id> # Can be left blankservice_account_file> /home/foo/myJSONfile.json # Path to the JSON file you downloaded in step 1.y/n> # Auto config, n4. Verify that it’s working
Section titled “4. Verify that it’s working”rclone -v --drive-impersonate foo@example.com lsf gdrive:backup- The arguments do:
-v- verbose logging--drive-impersonate foo@example.com- this is what does the magic, pretending to be user foo.lsf- list files in a parsing friendly waygdrive:backup- use the remote called gdrive, work in the folder named backup.
Note: in case you configured a specific root folder on gdrive and rclone is
unable to access the contents of that folder when using --drive-impersonate,
do this instead:
- in the gdrive web interface, share your root folder with the user/email of the new Service Account you created/selected at step 1
- use rclone without specifying the
--drive-impersonateoption, like this:rclone -v lsf gdrive:backup
Shared drives (team drives)
Section titled “Shared drives (team drives)”If you want to configure the remote to point to a Google Shared Drive
(previously known as Team Drives) then answer y to the question
Configure this as a Shared Drive (Team Drive)?.
This will fetch the list of Shared Drives from google and allow you to configure which one you want to use. You can also type in a Shared Drive ID if you prefer.
For example:
Configure this as a Shared Drive (Team Drive)?y) Yesn) Noy/n> yFetching Shared Drive list...Choose a number from below, or type in your own value 1 / Rclone Test \ "xxxxxxxxxxxxxxxxxxxx" 2 / Rclone Test 2 \ "yyyyyyyyyyyyyyyyyyyy" 3 / Rclone Test 3 \ "zzzzzzzzzzzzzzzzzzzz"Enter a Shared Drive ID> 1Configuration complete.Options:- type: drive- client_id:- client_secret:- token: {"AccessToken":"xxxx.x.xxxxx_xxxxxxxxxxx_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx","RefreshToken":"1/xxxxxxxxxxxxxxxx_xxxxxxxxxxxxxxxxxxxxxxxxxx","Expiry":"2014-03-16T13:57:58.955387075Z","Extra":null}- team_drive: xxxxxxxxxxxxxxxxxxxxKeep this "remote" remote?y) Yes this is OKe) Edit this remoted) Delete this remotey/e/d> y--fast-list
Section titled “--fast-list”This remote supports --fast-list which allows you to use fewer
transactions in exchange for more memory. See the rclone
docs for more details.
It does this by combining multiple list calls into a single API request.
This works by combining many '%s' in parents filters into one expression.
To list the contents of directories a, b and c, the following requests will be
send by the regular List function:
trashed=false and 'a' in parentstrashed=false and 'b' in parentstrashed=false and 'c' in parentsThese can now be combined into a single request:
trashed=false and ('a' in parents or 'b' in parents or 'c' in parents)The implementation of ListR will put up to 50 parents filters into one request.
It will use the --checkers value to specify the number of requests to run in parallel.
In tests, these batch requests were up to 20x faster than the regular method. Running the following command against different sized folders gives:
rclone lsjson -vv -R --checkers=6 gdrive:foldersmall folder (220 directories, 700 files):
- without
--fast-list: 38s - with
--fast-list: 10s
large folder (10600 directories, 39000 files):
- without
--fast-list: 22:05 min - with
--fast-list: 58s
Modification times and hashes
Section titled “Modification times and hashes”Google drive stores modification times accurate to 1 ms.
Hash algorithms MD5, SHA1 and SHA256 are supported. Note, however, that a small fraction of files uploaded may not have SHA1 or SHA256 hashes especially if they were uploaded before 2018.
Restricted filename characters
Section titled “Restricted filename characters”Only Invalid UTF-8 bytes will be replaced, as they can’t be used in JSON strings.
In contrast to other backends, / can also be used in names and .
or .. are valid names.
Revisions
Section titled “Revisions”Google drive stores revisions of files. When you upload a change to an existing file to google drive using rclone it will create a new revision of that file.
Revisions follow the standard google policy which at time of writing was
- They are deleted after 30 days or 100 revisions (whatever comes first).
- They do not count towards a user storage quota.
Deleting files
Section titled “Deleting files”By default rclone will send all files to the trash when deleting
files. If deleting them permanently is required then use the
--drive-use-trash=false flag, or set the equivalent environment
variable.
Shortcuts
Section titled “Shortcuts”In March 2020 Google introduced a new feature in Google Drive called drive shortcuts (API). These will (by September 2020) replace the ability for files or folders to be in multiple folders at once.
Shortcuts are files that link to other files on Google Drive somewhat like a symlink in unix, except they point to the underlying file data (e.g. the inode in unix terms) so they don’t break if the source is renamed or moved about.
By default rclone treats these as follows.
For shortcuts pointing to files:
- When listing a file shortcut appears as the destination file.
- When downloading the contents of the destination file is downloaded.
- When updating shortcut file with a non shortcut file, the shortcut is removed then a new file is uploaded in place of the shortcut.
- When server-side moving (renaming) the shortcut is renamed, not the destination file.
- When server-side copying the shortcut is copied, not the contents of the shortcut.
(unless
--drive-copy-shortcut-contentis in use in which case the contents of the shortcut gets copied). - When deleting the shortcut is deleted not the linked file.
- When setting the modification time, the modification time of the linked file will be set.
For shortcuts pointing to folders:
- When listing the shortcut appears as a folder and that folder will contain the contents of the linked folder appear (including any sub folders)
- When downloading the contents of the linked folder and sub contents are downloaded
- When uploading to a shortcut folder the file will be placed in the linked folder
- When server-side moving (renaming) the shortcut is renamed, not the destination folder
- When server-side copying the contents of the linked folder is copied, not the shortcut.
- When deleting with
rclone rmdirorrclone purgethe shortcut is deleted not the linked folder. - NB When deleting with
rclone removeorrclone mountthe contents of the linked folder will be deleted.
The rclone backend command can be used to create shortcuts.
Shortcuts can be completely ignored with the --drive-skip-shortcuts flag
or the corresponding skip_shortcuts configuration setting.
When rclone lsf --format i lists a file shortcut, the ID field contains the
target file ID followed by the shortcut ID, separated by a tab. This internal
tab is not changed by --separator.
If you have a folder shortcut that points at one of its own parent folders it would lead to an infinite recursion. Rclone detects this, leaves the offending shortcut out of the listing and logs an ERROR, so the rest of the drive can still be copied.
Emptying trash
Section titled “Emptying trash”If you wish to empty your trash you can use the rclone cleanup remote:
command which will permanently delete all your trashed files. This command
does not take any path arguments.
Note that Google Drive takes some time (minutes to days) to empty the trash even though the command returns within a few seconds. No output is echoed, so there will be no confirmation even using -v or -vv.
Quota information
Section titled “Quota information”To view your current quota you can use the rclone about remote:
command which will display your usage limit (quota), the usage in Google
Drive, the size of all files in the Trash and the space used by other
Google services such as Gmail. This command does not take any path
arguments.
Import/Export of google documents
Section titled “Import/Export of google documents”Google documents can be exported from and uploaded to Google Drive.
When rclone downloads a Google doc it chooses a format to download
depending upon the --drive-export-formats setting.
By default the export formats are docx,xlsx,pptx,svg which are a
sensible default for an editable document.
When choosing a format, rclone runs down the list provided in order and chooses the first file format the doc can be exported as from the list. If the file can’t be exported to a format on the formats list, then rclone will choose a format from the default list.
If you prefer an archive copy then you might use --drive-export-formats pdf, or if you prefer openoffice/libreoffice formats you might use
--drive-export-formats ods,odt,odp.
Note that rclone adds the extension to the google doc, so if it is
called My Spreadsheet on google docs, it will be exported as My Spreadsheet.xlsx or My Spreadsheet.pdf etc.
When importing files into Google Drive, rclone will convert all
files with an extension in --drive-import-formats to their
associated document type.
rclone will not convert any files by default, since the conversion
is lossy process.
The conversion must result in a file with the same extension when
the --drive-export-formats rules are applied to the uploaded document.
Here are some examples for allowed and prohibited conversions.
| export-formats | import-formats | Upload Ext | Document Ext | Allowed |
|---|---|---|---|---|
| odt | odt | odt | odt | Yes |
| odt | docx,odt | odt | odt | Yes |
| docx | docx | docx | Yes | |
| odt | odt | docx | No | |
| odt,docx | docx,odt | docx | odt | No |
| docx,odt | docx,odt | docx | docx | Yes |
| docx,odt | docx,odt | odt | docx | No |
This limitation can be disabled by specifying --drive-allow-import-name-change.
When using this flag, rclone can convert multiple files types resulting
in the same document type at once, e.g. with --drive-import-formats docx,odt,txt,
all files having these extension would result in a document represented as a
docx file.
This brings the additional risk of overwriting a document, if multiple files
have the same stem. Many rclone operations will not handle this name change
in any way. They assume an equal name when copying files and might copy the
file again or delete them when the name changes.
Here are the possible export extensions with their corresponding mime types. Most of these can also be used for importing, but there more that are not listed here. Some of these additional ones might only be available when the operating system provides the correct MIME type entries.
This list can be changed by Google Drive at any time and might not represent the currently available conversions.
| Extension | Mime Type | Description |
|---|---|---|
| bmp | image/bmp | Windows Bitmap format |
| csv | text/csv | Standard CSV format for Spreadsheets |
| doc | application/msword | Classic Word file |
| docx | application/vnd.openxmlformats-officedocument.wordprocessingml.document | Microsoft Office Document |
| epub | application/epub+zip | E-book format |
| html | text/html | An HTML Document |
| jpg | image/jpeg | A JPEG Image File |
| json | application/vnd.google-apps.script+json | JSON Text Format for Google Apps scripts |
| md | text/markdown | Markdown Text Format |
| odp | application/vnd.oasis.opendocument.presentation | Openoffice Presentation |
| ods | application/vnd.oasis.opendocument.spreadsheet | Openoffice Spreadsheet |
| ods | application/x-vnd.oasis.opendocument.spreadsheet | Openoffice Spreadsheet |
| odt | application/vnd.oasis.opendocument.text | Openoffice Document |
| application/pdf | Adobe PDF Format | |
| pjpeg | image/pjpeg | Progressive JPEG Image |
| png | image/png | PNG Image Format |
| pptx | application/vnd.openxmlformats-officedocument.presentationml.presentation | Microsoft Office Powerpoint |
| rtf | application/rtf | Rich Text Format |
| svg | image/svg+xml | Scalable Vector Graphics Format |
| tsv | text/tab-separated-values | Standard TSV format for spreadsheets |
| txt | text/plain | Plain Text |
| wmf | application/x-msmetafile | Windows Meta File |
| xls | application/vnd.ms-excel | Classic Excel file |
| xlsx | application/vnd.openxmlformats-officedocument.spreadsheetml.sheet | Microsoft Office Spreadsheet |
| zip | application/zip | A ZIP file of HTML, Images CSS |
Google documents can also be exported as link files. These files will
open a browser window for the Google Docs website of that document
when opened. The link file extension has to be specified as a
--drive-export-formats parameter. They will match all available
Google Documents.
| Extension | Description | OS Support |
|---|---|---|
| desktop | freedesktop.org specified desktop entry | Linux |
| link.html | An HTML Document with a redirect | All |
| url | INI style link file | macOS, Windows |
| webloc | macOS specific XML format | macOS |
Options
Section titled “Options”Standard options
Section titled “Standard options”The wizard asks for these when you add the drive.
client_id
Section titled “client_id”Google Application Client Id Leave blank to use rclone’s shared client_id, or if you are using a service account. The shared client_id is being retired and will stop working during 2026, so creating your own is now strongly recommended. See https://rclone.org/drive/#making-your-own-client-id for how to create your own.
Type: string
client_secret
Section titled “client_secret”Google Application Client Secret Leave blank to use rclone’s shared client_id, or if you are using a service account. If you created your own client_id then enter its client secret here.
Type: string
Comma separated list of scopes that rclone should use when requesting access from drive.
Type: string
Choices:
drive: Full access all files, excluding Application Data Folder.drive.readonly: Read-only access to file metadata and file contents.drive.file: Access to files created by rclone only. These are visible in the drive website. File authorization is revoked when the user deauthorizes the app.drive.appfolder: Allows read and write access to the Application Data folder. This is not visible in the drive website.drive.metadata.readonly: Allows read-only access to file metadata but does not allow any access to read or download file content.
service_account_file
Section titled “service_account_file”Service Account Credentials JSON file path.
Leave blank normally. Needed only if you want use SA instead of interactive login.
Leading ~ will be expanded in the file name as will environment variables such as ${RCLONE_CONFIG_DIR}.
Type: string
Advanced options
Section titled “Advanced options”The wizard shows these under Advanced options. Most drives work without changing any of them.
OAuth Access Token as a JSON blob.
Type: string
auth_url
Section titled “auth_url”Auth server URL.
Leave blank to use the provider defaults.
Type: string
token_url
Section titled “token_url”Token server url.
Leave blank to use the provider defaults.
Type: string
client_credentials
Section titled “client_credentials”Use client credentials OAuth flow.
This will use the OAUTH2 client Credentials Flow as described in RFC 6749.
Note that this option is NOT supported by all backends.
Type: bool · Default: false
root_folder_id
Section titled “root_folder_id”ID of the root folder. Leave blank normally.
Fill in to access “Computers” folders (see docs), or for rclone to use a non root folder as its starting point.
Type: string
service_account_credentials
Section titled “service_account_credentials”Service Account Credentials JSON blob.
Leave blank normally. Needed only if you want use SA instead of interactive login.
Type: string
team_drive
Section titled “team_drive”ID of the Shared Drive (Team Drive).
Type: string
auth_owner_only
Section titled “auth_owner_only”Only consider files owned by the authenticated user.
Type: bool · Default: false
use_trash
Section titled “use_trash”Send files to the trash instead of deleting permanently.
Defaults to true, namely sending files to the trash.
Use --drive-use-trash=false to delete files permanently instead.
Type: bool · Default: true
copy_shortcut_content
Section titled “copy_shortcut_content”Server side copy contents of shortcuts instead of the shortcut.
When doing server side copies, normally rclone will copy shortcuts as shortcuts.
If this flag is used then rclone will copy the contents of shortcuts rather than shortcuts themselves when doing server side copies.
Type: bool · Default: false
skip_gdocs
Section titled “skip_gdocs”Skip google documents in all listings.
If given, gdocs practically become invisible to rclone.
Type: bool · Default: false
show_all_gdocs
Section titled “show_all_gdocs”Show all Google Docs including non-exportable ones in listings.
If you try a server side copy on a Google Form without this flag, you will get this error:
No export formats found for "application/vnd.google-apps.form"However adding this flag will allow the form to be server side copied.
Note that rclone doesn’t add extensions to the Google Docs file names in this mode.
Do not use this flag when trying to download Google Docs - rclone will fail to download them.
Type: bool · Default: false
skip_checksum_gphotos
Section titled “skip_checksum_gphotos”Skip checksums on Google photos and videos only.
Use this if you get checksum errors when transferring Google photos or videos.
Setting this flag will cause Google photos and videos to return a blank checksums.
Google photos are identified by being in the “photos” space.
Corrupted checksums are caused by Google modifying the image/video but not updating the checksum.
Type: bool · Default: false
shared_with_me
Section titled “shared_with_me”Only show files that are shared with me.
Instructs rclone to operate on your “Shared with me” folder (where Google Drive lets you access the files and folders others have shared with you).
This works both with the “list” (lsd, lsl, etc.) and the “copy” commands (copy, sync, etc.), and with all other commands too.
Type: bool · Default: false
trashed_only
Section titled “trashed_only”Only show files that are in the trash.
This will show trashed files in their original directory structure.
Type: bool · Default: false
starred_only
Section titled “starred_only”Only show files that are starred.
Type: bool · Default: false
formats
Section titled “formats”Deprecated: See export_formats.
Type: string
export_formats
Section titled “export_formats”Comma separated list of preferred formats for downloading Google docs.
Type: string · Default: docx,xlsx,pptx,svg
import_formats
Section titled “import_formats”Comma separated list of preferred formats for uploading Google docs.
Type: string
allow_import_name_change
Section titled “allow_import_name_change”Allow the filetype to change when uploading Google docs.
E.g. file.doc to file.docx. This will confuse sync and reupload every time.
Type: bool · Default: false
use_created_date
Section titled “use_created_date”Use file created date instead of modified date.
Useful when downloading data and you want the creation date used in place of the last modified date.
WARNING: This flag may have some unexpected consequences.
When uploading to your drive all files will be overwritten unless they haven’t been modified since their creation. And the inverse will occur while downloading. This side effect can be avoided by using the “–checksum” flag.
This feature was implemented to retain photos capture date as recorded by google photos. You will first need to check the “Create a Google Photos folder” option in your google drive settings. You can then copy or move the photos locally and use the date the image was taken (created) set as the modification date.
Type: bool · Default: false
use_shared_date
Section titled “use_shared_date”Use date file was shared instead of modified date.
Note that, as with “–drive-use-created-date”, this flag may have unexpected consequences when uploading/downloading files.
If both this flag and “–drive-use-created-date” are set, the created date is used.
Type: bool · Default: false
list_chunk
Section titled “list_chunk”Size of listing chunk 100-1000, 0 to disable.
Type: int · Default: 1000
impersonate
Section titled “impersonate”Impersonate this user when using a service account.
Type: string
upload_cutoff
Section titled “upload_cutoff”Cutoff for switching to chunked upload.
Type: SizeSuffix · Default: 8Mi
chunk_size
Section titled “chunk_size”Upload chunk size.
Must a power of 2 >= 256k.
Making this larger will improve performance, but note that each chunk is buffered in memory one per transfer.
Reducing this will reduce memory usage but decrease performance.
Type: SizeSuffix · Default: 8Mi
acknowledge_abuse
Section titled “acknowledge_abuse”Set to allow files which return cannotDownloadAbusiveFile to be downloaded.
If downloading a file returns the error “This file has been identified as malware or spam and cannot be downloaded” with the error code “cannotDownloadAbusiveFile” then supply this flag to rclone to indicate you acknowledge the risks of downloading the file and rclone will download it anyway.
Note that if you are using service account it will need Manager permission (not Content Manager) to for this flag to work. If the SA does not have the right permission, Google will just ignore the flag.
Type: bool · Default: false
keep_revision_forever
Section titled “keep_revision_forever”Keep new head revision of each file forever.
Type: bool · Default: false
size_as_quota
Section titled “size_as_quota”Show sizes as storage quota usage, not actual size.
Show the size of a file as the storage quota used. This is the current version plus any older versions that have been set to keep forever.
WARNING: This flag may have some unexpected consequences.
It is not recommended to set this flag in your config - the recommended usage is using the flag form –drive-size-as-quota when doing rclone ls/lsl/lsf/lsjson/etc only.
If you do use this flag for syncing (not recommended) then you will need to use –ignore size also.
Type: bool · Default: false
v2_download_min_size
Section titled “v2_download_min_size”If Object’s are greater, use drive v2 API to download.
Type: SizeSuffix · Default: off
pacer_min_sleep
Section titled “pacer_min_sleep”Minimum time to sleep between API calls.
Type: Duration · Default: 100ms
pacer_burst
Section titled “pacer_burst”Number of API calls to allow without sleeping.
Type: int · Default: 100
server_side_across_configs
Section titled “server_side_across_configs”Deprecated: use –server-side-across-configs instead.
Allow server-side operations (e.g. copy) to work across different drive configs.
This can be useful if you wish to do a server-side copy between two different Google drives. Note that this isn’t enabled by default because it isn’t easy to tell if it will work between any two configurations.
Type: bool · Default: false
disable_http2
Section titled “disable_http2”Disable drive using http2.
There is currently an unsolved issue with the google drive backend and HTTP/2. HTTP/2 is therefore disabled by default for the drive backend but can be re-enabled here. When the issue is solved this flag will be removed.
See: https://github.com/rclone/rclone/issues/3631
Type: bool · Default: true
stop_on_upload_limit
Section titled “stop_on_upload_limit”Make upload limit errors be fatal.
At the time of writing it is only possible to upload 750 GiB of data to Google Drive a day (this is an undocumented limit). When this limit is reached Google Drive produces a slightly different error message. When this flag is set it causes these errors to be fatal. These will stop the in-progress sync.
Note that this detection is relying on error message strings which Google don’t document so it may break in the future.
See: https://github.com/rclone/rclone/issues/3857
Type: bool · Default: false
stop_on_download_limit
Section titled “stop_on_download_limit”Make download limit errors be fatal.
At the time of writing it is only possible to download 10 TiB of data from Google Drive a day (this is an undocumented limit). When this limit is reached Google Drive produces a slightly different error message. When this flag is set it causes these errors to be fatal. These will stop the in-progress sync.
Note that this detection is relying on error message strings which Google don’t document so it may break in the future.
Type: bool · Default: false
skip_shortcuts
Section titled “skip_shortcuts”If set skip shortcut files.
Normally rclone dereferences shortcut files making them appear as if they are the original file (see the shortcuts section). If this flag is set then rclone will ignore shortcut files completely.
Type: bool · Default: false
skip_dangling_shortcuts
Section titled “skip_dangling_shortcuts”If set skip dangling shortcut files.
If this is set then rclone will not show any dangling shortcuts in listings.
Type: bool · Default: false
resource_key
Section titled “resource_key”Resource key for accessing a link-shared file.
If you need to access files shared with a link like this
https://drive.google.com/drive/folders/XXX?resourcekey=YYY&usp=sharingThen you will need to use the first part “XXX” as the “root_folder_id” and the second part “YYY” as the “resource_key” otherwise you will get 404 not found errors when trying to access the directory.
See: https://developers.google.com/drive/api/guides/resource-keys
This resource key requirement only applies to a subset of old files.
Note also that opening the folder once in the web interface (with the user you’ve authenticated rclone with) seems to be enough so that the resource key is not needed.
Type: string
fast_list_bug_fix
Section titled “fast_list_bug_fix”Work around a bug in Google Drive listing.
Normally rclone will work around a bug in Google Drive when using –fast-list (ListR) where the search “(A in parents) or (B in parents)” returns nothing sometimes. See #3114, #4289 and https://issuetracker.google.com/issues/149522397
Rclone detects this by finding no items in more than one directory when listing and retries them as lists of individual directories.
This means that if you have a lot of empty directories rclone will end up listing them all individually and this can take many more API calls.
This flag allows the work-around to be disabled. This is not recommended in normal use - only if you have a particular case you are having trouble with like many empty directories.
Type: bool · Default: true
metadata_owner
Section titled “metadata_owner”Control whether owner should be read or written in metadata.
Owner is a standard part of the file metadata so is easy to read. But it isn’t always desirable to set the owner from the metadata.
Note that you can’t set the owner on Shared Drives, and that setting ownership will generate an email to the new owner (this can’t be disabled), and you can’t transfer ownership to someone outside your organization.
Type: Bits · Default: read
Choices:
off: Do not read or write the valueread: Read the value onlywrite: Write the value onlyfailok: If writing fails log errors only, don’t fail the transferread,write: Read and Write the value.
metadata_permissions
Section titled “metadata_permissions”Control whether permissions should be read or written in metadata.
Reading permissions metadata from files can be done quickly, but it isn’t always desirable to set the permissions from the metadata.
Note that rclone drops any inherited permissions on Shared Drives and any owner permission on My Drives as these are duplicated in the owner metadata.
Type: Bits · Default: off
Choices:
off: Do not read or write the valueread: Read the value onlywrite: Write the value onlyfailok: If writing fails log errors only, don’t fail the transferread,write: Read and Write the value.
metadata_labels
Section titled “metadata_labels”Control whether labels should be read or written in metadata.
Reading labels metadata from files takes an extra API transaction and will slow down listings. It isn’t always desirable to set the labels from the metadata.
The format of labels is documented in the drive API documentation at https://developers.google.com/drive/api/reference/rest/v3/Label - rclone just provides a JSON dump of this format.
When setting labels, the label and fields must already exist - rclone will not create them. This means that if you are transferring labels from two different accounts you will have to create the labels in advance and use the metadata mapper to translate the IDs between the two accounts.
Type: Bits · Default: off
Choices:
off: Do not read or write the valueread: Read the value onlywrite: Write the value onlyfailok: If writing fails log errors only, don’t fail the transferread,write: Read and Write the value.
metadata_enforce_expansive_access
Section titled “metadata_enforce_expansive_access”Whether the request should enforce expansive access rules.
From Feb 2026 this flag will be set by default so this flag can be used for testing before then.
See: https://developers.google.com/workspace/drive/api/guides/limited-expansive-access
Type: bool · Default: false
encoding
Section titled “encoding”The encoding for the backend.
See the encoding section in the overview for more info.
Type: Encoding · Default: InvalidUtf8
env_auth
Section titled “env_auth”Get IAM credentials from runtime (environment variables or instance meta data if no env vars).
Only applies if service_account_file and service_account_credentials is blank.
Type: bool · Default: false
Choices:
false: Enter credentials in the next step.true: Get GCP IAM credentials from the environment (env vars or IAM).
description
Section titled “description”Description of the remote.
Type: string
Limitations
Section titled “Limitations”Drive has quite a lot of rate limiting. This causes rclone to be limited to transferring about 2 files per second only. Individual files may be transferred much faster at 100s of MiB/s but lots of small files can take a long time.
Server side copies are also subject to a separate rate limit. If you
see User rate limit exceeded errors, wait at least 24 hours and retry.
You can disable server-side copies with --disable copy to download
and upload the files if you prefer.
Limitations of Google Docs
Section titled “Limitations of Google Docs”Google docs will appear as size -1 in rclone ls, rclone ncdu etc,
and as size 0 in anything which uses the VFS layer, e.g. rclone mount
and rclone serve. When calculating directory totals, e.g. in
rclone size and rclone ncdu, they will be counted in as empty
files.
This is because rclone can’t find out the size of the Google docs without downloading them.
Google docs will transfer correctly with rclone sync, rclone copy
etc as rclone knows to ignore the size when doing the transfer.
However an unfortunate consequence of this is that you may not be able
to download Google docs using rclone mount. If it doesn’t work you
will get a 0 sized file. If you try again the doc may gain its
correct size and be downloadable. Whether it will work on not depends
on the application accessing the mount and the OS you are running -
experiment to find out if it does work for you!
Duplicated files
Section titled “Duplicated files”Sometimes, for no reason I’ve been able to track down, drive will duplicate a file that rclone uploads. Drive unlike all the other remotes can have duplicated files.
Duplicated files cause problems with the syncing and you will see messages in the log about duplicates.
Use rclone dedupe to fix duplicated files.
Note that this isn’t just a problem with rclone, even Google Photos on Android duplicates files on drive sometimes.
Rclone appears to be re-copying files it shouldn’t
Section titled “Rclone appears to be re-copying files it shouldn’t”The most likely cause of this is the duplicated file issue above - run
rclone dedupe and check your logs for duplicate object or directory
messages.
This can also be caused by a delay/caching on google drive’s end when
comparing directory listings. Specifically with team drives used in
combination with --fast-list. Files that were uploaded recently may
not appear on the directory list sent to rclone when using --fast-list.
Waiting a moderate period of time between attempts (estimated to be
approximately 1 hour) and/or not using --fast-list both seem to be
effective in preventing the problem.
SHA1 or SHA256 hashes may be missing
Section titled “SHA1 or SHA256 hashes may be missing”All files have MD5 hashes, but a small fraction of files uploaded may not have SHA1 or SHA256 hashes especially if they were uploaded before 2018.
Making your own client_id
Section titled “Making your own client_id”When you use rclone with Google drive in its default configuration you are using rclone’s client_id. This is shared between all the rclone users.
This shared client_id is being retired and will stop working during
2026. To avoid interruption you must create and use your own
client_id, so creating one is now required rather than merely
recommended. New remotes created with rclone config will warn you if
you leave the client_id blank.
Using your own client_id has other benefits too. There is a global rate limit on the number of queries per second that each client_id can do set by Google. If you have multiple services running, it is recommended to use an API key for each service. The default Google quota is 10 transactions per second so it is recommended to stay under that number as if you use more than that, it will cause rclone to rate limit and make things slower.
Here is how to create your own Google Drive client ID for rclone:
-
Log into the Google API Console with your Google account. It doesn’t matter what Google account you use. (It need not be the same account as the Google Drive you want to access)
-
Select a project or create a new project.
-
Under “ENABLE APIS AND SERVICES” search for “Drive”, and enable the “Google Drive API”.
-
Click “Credentials” in the left-side panel (not “Create credentials”, which opens the wizard).
-
If you already configured an “Oauth Consent Screen”, then skip to the next step; if not, click on “CONFIGURE CONSENT SCREEN” button (near the top right corner of the right panel), then click “Get started”. On the next screen, enter an “Application name” (“rclone” is OK); enter “User Support Email” (your own email is OK); Next, under Audience select “External”. Next enter your own contact information, agree to terms and click “Create”. You should now see rclone (or your project name) in a box in the top left of the screen.
(PS: if you are a GSuite user, you could also select “Internal” instead of “External” above, but this will restrict API use to Google Workspace users in your organisation).
You will also have to add some scopes, including
https://www.googleapis.com/auth/docshttps://www.googleapis.com/auth/drivein order to be able to edit, create and delete files with RClone.https://www.googleapis.com/auth/drive.metadata.readonlywhich you may also want to add.
To do this, click Data Access on the left side panel, click “add or remove scopes” and select the three above and press update or go to the “Manually add scopes” text box (scroll down) and enter “https://www.googleapis.com/auth/docs,https://www.googleapis.com/auth/drive,https://www.googleapis.com/auth/drive.metadata.readonly”, press add to table then update.
You should now see the three scopes on your Data access page. Now press save at the bottom!
-
After adding scopes, click Audience. Scroll down and click “+ Add users”. Add yourself as a test user and press save.
-
Go to Overview on the left panel, click “Create OAuth client”. Choose an application type of “Desktop app” and click “Create”. (the default name is fine)
-
It will show you a client ID and client secret. Make a note of these. (If you selected “External” at Step 5 continue to Step 9. If you chose “Internal” you don’t need to publish and can skip straight to Step 10 but your destination drive must be part of the same Google Workspace.)
-
Go to “Audience” and then click “PUBLISH APP” button and confirm. Add yourself as a test user if you haven’t already.
(If the “PUBLISH APP” button is greyed out, Google now requires a homepage URL and a privacy policy URL before publishing, even for a personal single-user app. Go to “Branding” in the left panel, fill in “Application home page” and “Application privacy policy link” - a free GitHub Pages site is fine for these if you don’t have a domain of your own - then “Authorized domains” with the domain you used, and click Save. Return to “Audience” and the “PUBLISH APP” button should now be available.)
-
Provide the noted client ID and client secret to rclone.
-
Run the web-based authorization flow from within
rclone config, by answering “Y” when it asks “Token already configured - replace it?”.
Be aware that, due to the “enhanced security” recently introduced by Google, you are theoretically expected to “submit your app for verification” and then wait a few weeks(!) for their response; in practice, you can go right ahead and use the client ID and client secret with rclone, the only issue will be a very scary confirmation screen shown when you connect via your browser for rclone to be able to get its token-id (but as this only happens during the remote configuration, it’s not such a big deal). Keeping the application in “Testing” will work as well, but the limitation is that any grants will expire after a week, which can be annoying to refresh constantly. If, for whatever reason, a short grant time is not a problem, then keeping the application in testing mode would also be sufficient.
In most cases verification is not actually required. Google exempts a number of app categories from mandatory verification, including:
- Personal Use apps: if the app is for your personal use (fewer than 100 users), you and your limited number of users can keep using it without verification - you will just need to click through the “unverified app” warning screen during sign-in. Verification is only required if you want to grow your user base beyond 100 users.
- Development/Testing/Staging apps: apps in development, testing or staging mode are not subject to verification (but are limited to the 100-user cap and the unverified-app warning until verified).
So for typical personal rclone use you can leave the app unverified, accept the warning screen, and publish it (rather than leaving it in “Testing”) to avoid the weekly grant expiry described above.
(Thanks to @balazer on github for these instructions.)
Sometimes, creation of an OAuth consent in Google API Console fails due to an error message “The request failed because changes to one of the field of the resource is not supported”. As a convenient workaround, the necessary Google Drive API key can be created on the Python Quickstart page. Just push the Enable the Drive API button to receive the Client ID and Secret. Note that it will automatically create a new project in the API Console.