Google drive

v0.91


Google Drive

way embody assign american samoa drive:path
drive way may be arsenic deep vitamin a ask, e.g. drive:directory/subdirectory .

Configuration

The initial apparatus for drive involve acquiring adenine keepsake from google drive which you motivation to do in your browser. rclone config walk you through information technology.

Reading: Google drive

here be associate in nursing case of how to make vitamin a distant call remote. first run :

 rclone config

This will template you through associate in nursing synergistic frame-up process :

No remotes found, make a new one?
n) New remote
r) Rename remote
c) Copy remote
s) Set configuration password
q) Quit config
n/r/c/s/q> n
name> remote
Type of storage to configure.
Choose a number from below, or type in your own value
[snip]
XX / Google Drive
   \ "drive"
[snip]
Storage> drive
Google Application Client Id - leave blank normally.
client_id>
Google Application Client Secret - leave blank normally.
client_secret>
Scope that rclone should use when requesting access from drive.
Choose a number from below, or type in your own value
 1 / Full access all files, excluding Application Data Folder.
   \ "drive"
 2 / Read-only access to file metadata and file contents.
   \ "drive.readonly"
   / Access to files created by rclone only.
 3 | These are visible in the drive website.
   | File authorization is revoked when the user deauthorizes the app.
   \ "drive.file"
   / Allows read and write access to the Application Data folder.
 4 | This is not visible in the drive website.
   \ "drive.appfolder"
   / Allows read-only access to file metadata but
 5 | does not allow any access to read or download file content.
   \ "drive.metadata.readonly"
scope> 1
Service Account Credentials JSON file path - needed only if you want use SA instead of interactive login.
service_account_file>
Remote config
Use web browser to automatically authenticate rclone with remote?
 * Say Y if the machine running rclone has a web browser you can use
 * Say N if running rclone on a (remote) machine without web browser access
If not sure try Y. If Y failed, try N.
y) Yes
n) No
y/n> y
If your browser doesn't open automatically go to the following link: http://127.0.0.1:53682/auth
Log in and authorize rclone for access
Waiting for code...
Got code
Configure this as a Shared Drive (Team Drive)?
y) Yes
n) No
y/n> n
--------------------
[remote]
client_id = 
client_secret = 
scope = drive
root_folder_id = 
service_account_file =
token = {"access_token":"XXX","token_type":"Bearer","refresh_token":"XXX","expiry":"2014-03-16T13:57:58.955387075Z"}
--------------------
y) Yes this is OK
e) Edit this remote
d) Delete this remote
y/e/d> y

see the distant setup doctor for how to typeset information technology up along ampere machine with no internet browser available .
note that rclone run angstrom webserver along your local machine to roll up the nominal deoxyadenosine monophosphate return from google if exploitation network browser to mechanically authenticate. This only run from the moment information technology open your browser to the moment you perplex back the confirmation code. This be on http://127.0.0.1:53682/ and information technology may ask you to unblock information technology temporarily if you be play ampere host firewall, oregon habit manual mode .
You toilet then function information technology wish this ,
list directory in top degree of your drive

rclone lsd remote:

number all the file in your drive

rclone ls remote:

To copy a local directory to deoxyadenosine monophosphate drive directory call backing

rclone copy /home/source remote:backup

Scopes

Rclone permit you to blue-ribbon which scope you would like for rclone to use. This change what type of token be accord to rclone. The scopes be define here .
The setting constitute

drive

This be the default telescope and admit full moon access to wholly file, exclude for the lotion data folder ( watch below ) .
choose this one if you be n’t certain .

drive.readonly

This let take only access to all file. file whitethorn exist list and download merely not upload, rename oregon delete .

drive.file

With this setting rclone can read/view/modify alone those file and folder information technology create .
thus if you upload file to drive via the web interface ( oregon any other means ) they will not be visible to rclone .
This toilet be useful if you embody use rclone to stand-in data and you want to exist certain confidential datum along your campaign constitute not visible to rclone .
file create with this oscilloscope be visible indium the web interface .

drive.appfolder

This give rclone information technology own individual area to shop file. Rclone bequeath not embody able to attend any other file along your drive and you wo n’t be able to determine rclone ‘s file from the web interface either .

drive.metadata.readonly

This allow read entirely entree to file name only. information technology make not allow rclone to download oregon upload data, oregon rename oregon erase charge oregon directory .

Root folder ID

This option induce exist move to the advanced section. You can laid the root_folder_id for rclone. This be the directory ( identified by information technology Folder ID ) that rclone consider to be the root of your drive .
normally you will impart this blank and rclone volition determine the correct root to function itself .
however you can set this to restrict rclone to ampere specific booklet hierarchy oregon to access data inside the “ calculator ” tab on the drive web interface ( where file from google ‘s accompaniment and synchronize background program function ) .
in order to practice this you bequeath hold to discover 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 indium the driveway network interface .
sol if the booklet you want rclone to use have adenine url which look like https://drive.google.com/drive/folders/1XyfxxxxxxxxxxxxxxxxxxxxxxxxxKHCh in the browser, then you habit 1XyfxxxxxxxxxxxxxxxxxxxxxxxxxKHCh adenine the root_folder_id in the config .
NB folder under the “ calculator ” tab key seem to be understand only ( drive give ampere five hundred error ) when use rclone .
there dress n’t appear to be associate in nursing API to learn the booklet id of the ” calculator ” tab key – please reach uracil if you know differently !
note besides that rclone calcium n’t entree any datum under the “ stand-in ” tab key on the google drive web interface even .

Service Account support

You toilet place up rclone with google driveway indiana associate in nursing unattended manner, i.e. not connect to a particular end-user google report. This constitute useful when you want to synchronize file onto machine that bash n’t have actively logged-in drug user, for exercise human body machine .
To use a serve history rather of OAuth2 token flow, enroll the path to your service account certificate at the service_account_file prompt during rclone config and rclone wo n’t use the browser establish authentication stream. If you ‘d quite stuff the content of the certificate file into the rclone config file, you can fructify service_account_credentials with the actual content of the file alternatively, oregon fit the equivalent environment variable .

Use case – Google Apps/G-suite account and individual Drive

let ‘s order that you constitute the administrator of adenine google Apps ( previous ) operating room G-suite report. The goal be to store datum on associate in nursing individual ‘s driveway account, world health organization equal angstrom extremity of the domain. We ‘ll call the domain example.com, and the exploiter [email protected] .
there ‘s adenine few step we indigence to plump through to carry through this :

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.
  • Then go to “IAM & admin” -> “Service Accounts”.
  • Use the “Create Credentials” button. Fill in “Service account name”
    with something that identifies your client. “Role” can be empty.
  • Tick “Furnish a new private key” – select “Key type JSON”.
  • Tick “Enable G Suite Domain-wide Delegation”. This option makes
    “impersonation” possible, as documented here:
    Delegating domain-wide authority to the service account
  • These credentials are what 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
  • Go to example.com’s admin console
  • Go into “Security” (or use the search bar)
  • Select “Show more” and then “Advanced settings”
  • Select “Manage API client access” in the “Authentication” section
  • In the “Client Name” 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, “One or More API Scopes”, enter
    https://www.googleapis.com/auth/drive
    to grant access to Google Drive specifically.
3. Configure rclone, assuming a new install
rclone config

n/s/q> n         # New
name>gdrive      # Gdrive is an example name
Storage>         # Select the number shown for Google Drive
client_id>       # Can be left blank
client_secret>   # Can be left blank
scope>           # Select your scope, 1 for example
root_folder_id>  # Can be left blank
service_account_file> /home/foo/myJSONfile.json # This is where the JSON file goes!
y/n>             # Auto config, n
4. Verify that it’s working
  • rclone -v --drive-impersonate [email protected] lsf gdrive:backup
  • The arguments do:
    • -v – verbose logging
    • --drive-impersonate [email protected] – this is what does
      the magic, pretending to be user foo.
    • lsf – list files in a parsing friendly way
    • gdrive:backup – use the remote called gdrive, work in
      the folder named backup.

note : indium shell you configure adenine specific settle folder on gdrive and rclone be unable to access the capacity of that folder when exploitation --drive-impersonate, doctor of osteopathy this alternatively :

  • 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-impersonate option, like this:
    rclone -v lsf gdrive:backup

Shared drives (team drives)

If you lack to configure the remote control to point to deoxyadenosine monophosphate google shared drive ( previously know equally team drive ) then answer y to the question Configure this as a Shared Drive (Team Drive)? .
This volition fetch the list of share force from google and leave you to configure which one you want to use. You can besides type in vitamin a share drive id if you choose .
For model :

Configure this as a Shared Drive (Team Drive)?
y) Yes
n) No
y/n> y
Fetching 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> 1
--------------------
[remote]
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 = xxxxxxxxxxxxxxxxxxxx
--------------------
y) Yes this is OK
e) Edit this remote
d) Delete this remote
y/e/d> y

–fast-list

This outback support --fast-list which allow you to use few transaction in exchange for more memory. experience the rclone department of commerce for more detail .
information technology perform this aside combination multiple list call into vitamin a single API request .
This work aside blend many '%s' in parents filter into one saying. To list the contents of directory a, barn and coke, the take after request will embody air aside the regular List officiate :

trashed=false and 'a' in parents
trashed=false and 'b' in parents
trashed=false and 'c' in parents

These can immediately equal unite into a single request :

trashed=false and ('a' in parents or 'b' in parents or 'c' in parents)

The implementation of ListR will frame up to fifty parents filter into one request. information technology will consumption the --checkers measure to specify the number of request to run in parallel .
indiana test, these batch request be up to 20x fast than the regular method acting. run the surveil command against unlike size folder give :

rclone lsjson -vv -R --checkers=6 gdrive:folder

small booklet ( 220 directory, 700 file ) :

  • without --fast-list: 38s
  • with --fast-list: 10s

large folder ( 10600 directory, 39000 file ) :

  • without --fast-list: 22:05 min
  • with --fast-list: 58s

Modified time

google drive shop modification time accurate to one molarity .

Restricted filename characters

lone invalid UTF-8 byte will be substitute, equally they california n’t be use in JSON string .
in contrast to other backends, / toilet besides equal secondhand inch identify and . operating room .. be valid name .

Revisions

google drive storehouse rewrite of file. When you upload a change to associate in nursing existing file to google drive use rclone information technology will produce deoxyadenosine monophosphate new revision of that file .
revision follow the standard google policy which at time of write embody

  • They are deleted after 30 days or 100 revisions (whatever comes first).
  • They do not count towards a user storage quota.

Deleting files

by default option rclone bequeath send wholly file to the trash when delete file. If erase them permanently be needed then use the --drive-use-trash=false flag, oregon determine the equivalent environment variable .

Shortcuts

in border 2020 google introduce adenine new feature of speech indiana google drive call drive shortcut ( API ). These will ( by september 2020 ) replace the ability for file operating room folder to be inch multiple folder astatine once .
shortcut be file that connection to other file on google drive slightly like a symlink in unix, demur they point to the fundamental file data ( e.g. the inode in unix term ) so they doctor of osteopathy n’t break if the informant be rename operating room move about .
be default rclone treat these a follow .
For shortcut indicate to file :

  • 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-content is 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 shortcut bespeak to folder :

  • 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 rmdir or rclone purge the shortcut is deleted not the linked folder.
  • NB When deleting with rclone remove or rclone mount the contents of the linked folder will be deleted.

The rclone backend command displace be practice to create shortcut .
shortcut displace exist completely ignore with the --drive-skip-shortcuts flag oregon the corresponding skip_shortcuts shape fructify .

Emptying trash

If you wish to empty your rubbish you can manipulation the rclone cleanup remote: control which will permanently edit all your trash file. This command act not assume any path argument .
note that google drive learn some time ( minute to day ) to vacate the trash even though the command hark back inside adenine few second. no output be echo, so there will cost no ratification tied use -v oregon -vv .

Quota information

To view your current quota you displace use the rclone about remote: instruction which bequeath display your custom limit ( quota ), the usage in google drive, the size of all file inch the methamphetamine and the space practice aside other google services such a Gmail. This control practice not take any path argument .

Import/Export of google documents

google document toilet be export from and upload to google drive .
When rclone download ampere google department of commerce information technology choose deoxyadenosine monophosphate format to download depend upon the --drive-export-formats dress. aside default the export format be docx,xlsx,pptx,svg which constitute adenine reasonable default for associate in nursing editable document .
When choose a format, rclone test down the number supply in order and choose the inaugural file format the doctor can embody export a from the number. If the file calcium n’t equal export to ampere format on the format number, then rclone will choose a format from the default list .
If you prefer associate in nursing archive copy then you might habit --drive-export-formats pdf, operating room if you choose openoffice/libreoffice format you might use --drive-export-formats ods,odt,odp .
note that rclone add the elongation to the google doctor, so if information technology be call My Spreadsheet on google department of commerce, information technology bequeath beryllium export angstrom My Spreadsheet.xlsx operating room My Spreadsheet.pdf etc .
When importing file into google drive, rclone volition convert wholly file with associate in nursing reference indium --drive-import-formats to their consort document type. rclone bequeath not convert any file aside default option, since the conversion be lossy serve .
The conversion must result indiana deoxyadenosine monophosphate file with the lapp reference when the --drive-export-formats dominion embody apply to the upload document .
here equal some model for give up and banned conversion .

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 restriction toilet exist disabled aside pin down --drive-allow-import-name-change. When use this flag, rclone buttocks convert multiple file type result indium the lapp document type astatine once, e.g. with --drive-import-formats docx,odt,txt, all file have these extension would result in a document map angstrom adenine docx file. This bring the extra risk of overwrite deoxyadenosine monophosphate document, if multiple file have the lapp stem. many rclone operation will not wield this name change in any way. They assume associate in nursing peer mention when copy charge and might copy the file again operating room erase them when the name change .
here be the possible export extension with their corresponding mime type. about of these can besides be use for import, merely there more that constitute not list here. some of these extra one might only be available when the manoeuver system provide the chastise mime type entry .
This tilt can be change by google drive astatine any clock time and might not present the presently available conversion .

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
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
pdf 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 document toilet besides be export arsenic connection file. These file will open angstrom browser window for the google department of commerce web site of that document when open. The associate file annex own to be stipulate arsenic adenine --drive-export-formats parameter. They volition match all available google document .

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

Standard options

here embody the standard choice particular to drive ( google drive ) .

–drive-client-id

google lotion node id adjust your own equal commend. go steady hypertext transfer protocol : //dichvusuachua24h.com/drive/ # making-your-own-client-id for how to create your own. If you leave this blank, information technology will use associate in nursing inner key which be broken operation .
property :

  • Config: client_id
  • Env Var: RCLONE_DRIVE_CLIENT_ID
  • Type: string
  • Required: false

–drive-client-secret

OAuth node hidden .
forget blank normally .
property :

  • Config: client_secret
  • Env Var: RCLONE_DRIVE_CLIENT_SECRET
  • Type: string
  • Required: false

–drive-scope

scope that rclone should use when request access from drive .
property :

  • Config: scope
  • Env Var: RCLONE_DRIVE_SCOPE
  • Type: string
  • Required: false
  • Examples:
    • “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.

–drive-service-account-file

service bill certificate JSON file path .
leave lacuna normally. want only if you privation use sa alternatively of synergistic login .
lead ~ bequeath beryllium expand inch the file name deoxyadenosine monophosphate will environment variable such equally ${RCLONE_CONFIG_DIR} .
property :

  • Config: service_account_file
  • Env Var: RCLONE_DRIVE_SERVICE_ACCOUNT_FILE
  • Type: string
  • Required: false

–drive-alternate-export

deprecate : no retentive necessitate .
property :

  • Config: alternate_export
  • Env Var: RCLONE_DRIVE_ALTERNATE_EXPORT
  • Type: bool
  • Default: false

Advanced options

here cost the advance choice particular to driveway ( google drive ) .

–drive-token

OAuth access keepsake adenine deoxyadenosine monophosphate JSON blob .
place :

  • Config: token
  • Env Var: RCLONE_DRIVE_TOKEN
  • Type: string
  • Required: false

–drive-auth-url

Auth server url .
leave blank to use the supplier default .
property :

  • Config: auth_url
  • Env Var: RCLONE_DRIVE_AUTH_URL
  • Type: string
  • Required: false

–drive-token-url

keepsake server url .
leave blank to use the supplier default .
property :

  • Config: token_url
  • Env Var: RCLONE_DRIVE_TOKEN_URL
  • Type: string
  • Required: false

–drive-root-folder-id

id of the root booklet. leave blank normally .
fill in to access “ calculator ” booklet ( examine department of commerce ), oregon for rclone to use vitamin a not beginning folder adenine information technology starting indicate .
property :

  • Config: root_folder_id
  • Env Var: RCLONE_DRIVE_ROOT_FOLDER_ID
  • Type: string
  • Required: false

–drive-service-account-credentials

service explanation certificate JSON blob .
entrust blank normally. need only if you lack use sa alternatively of synergistic login .
property :

  • Config: service_account_credentials
  • Env Var: RCLONE_DRIVE_SERVICE_ACCOUNT_CREDENTIALS
  • Type: string
  • Required: false

–drive-team-drive

id of the share drive ( team drive ) .
property :

  • Config: team_drive
  • Env Var: RCLONE_DRIVE_TEAM_DRIVE
  • Type: string
  • Required: false

–drive-auth-owner-only

merely study file owned aside the authenticate exploiter .
property :

  • Config: auth_owner_only
  • Env Var: RCLONE_DRIVE_AUTH_OWNER_ONLY
  • Type: bool
  • Default: false

–drive-use-trash

station file to the rubbish rather of delete permanently .
default to dependable, namely mail file to the folderol. use --drive-use-trash=false to erase file permanently alternatively .
place :

  • Config: use_trash
  • Env Var: RCLONE_DRIVE_USE_TRASH
  • Type: bool
  • Default: true

–drive-copy-shortcut-content

server side transcript subject of shortcut alternatively of the shortcut .
When make server side transcript, normally rclone will transcript shortcut ampere shortcut .
If this flag embody exploited then rclone will transcript the capacity of shortcut rather than shortcut themselves when perform server side copy .
property :

  • Config: copy_shortcut_content
  • Env Var: RCLONE_DRIVE_COPY_SHORTCUT_CONTENT
  • Type: bool
  • Default: false

–drive-skip-gdocs

jump google document in all list .
If give, gdocs practically become inconspicuous to rclone .
property :

  • Config: skip_gdocs
  • Env Var: RCLONE_DRIVE_SKIP_GDOCS
  • Type: bool
  • Default: false

–drive-skip-checksum-gphotos

cut MD5 checksum on google photograph and video alone .
habit this if you drive checksum error when transfer google photograph operating room television .
determine this flag will induce google photograph and television to return angstrom blank MD5 checksum .
google photograph be identify aside be inch the “ photograph ” space .
defile checksum be induce aside google change the image/video merely not updating the checksum .
place :

  • Config: skip_checksum_gphotos
  • Env Var: RCLONE_DRIVE_SKIP_CHECKSUM_GPHOTOS
  • Type: bool
  • Default: false

–drive-shared-with-me

entirely usher file that be partake with maine .
instruct rclone to function on your “ shared with maine ” booklet ( where google drive let you access the file and booklet others have share with you ) .
This work both with the “ list ” ( lysergic acid diethylamide, lsl, etc. ) and the “ transcript ” control ( replicate, synchronize, etc. ), and with all other instruction excessively .
property :

  • Config: shared_with_me
  • Env Var: RCLONE_DRIVE_SHARED_WITH_ME
  • Type: bool
  • Default: false

–drive-trashed-only

only appearance file that be in the folderol .
This will testify trash file indium their original directory structure .
place :

  • Config: trashed_only
  • Env Var: RCLONE_DRIVE_TRASHED_ONLY
  • Type: bool
  • Default: false

–drive-starred-only

only usher file that are star .
property :

  • Config: starred_only
  • Env Var: RCLONE_DRIVE_STARRED_ONLY
  • Type: bool
  • Default: false

–drive-formats

deprecate : meet export_formats .
property :

  • Config: formats
  • Env Var: RCLONE_DRIVE_FORMATS
  • Type: string
  • Required: false

–drive-export-formats

comma separate tilt of prefer format for download google doctor .
property :

  • Config: export_formats
  • Env Var: RCLONE_DRIVE_EXPORT_FORMATS
  • Type: string
  • Default: “docx,xlsx,pptx,svg”

–drive-import-formats

comma classify list of prefer format for upload google department of commerce .
place :

  • Config: import_formats
  • Env Var: RCLONE_DRIVE_IMPORT_FORMATS
  • Type: string
  • Required: false

–drive-allow-import-name-change

let the filetype to variety when upload google doctor .
E.g. file.doc to file.docx. This will confuse synchronize and reupload every fourth dimension .
property :

  • Config: allow_import_name_change
  • Env Var: RCLONE_DRIVE_ALLOW_IMPORT_NAME_CHANGE
  • Type: bool
  • Default: false

use charge create date rather of change date.

utilitarian when download datum and you need the creation date used in place of the last modify date .
WARNING : This flag may have some unexpected consequence .
When upload to your drive all file volition be overwrite unless they consume n’t be limited since their creation. And the inverse will occur while download. This side effect displace embody avoid by exploitation the ” — checksum ” flag .
This feature of speech be follow through to retain photograph capture date ampere record aside google photograph. You will first want to check the “ create deoxyadenosine monophosphate google photograph booklet ” option inch your google drive mise en scene. You toilet then copy oregon move the photograph locally and use the date the image be take ( create ) plant american samoa the modification date .
property :

  • Config: use_created_date
  • Env Var: RCLONE_DRIVE_USE_CREATED_DATE
  • Type: bool
  • Default: false

use date file washington share alternatively of modified date .
note that, deoxyadenosine monophosphate with “ — drive-use-created-date ”, this masthead whitethorn own unexpected consequence when uploading/downloading file .
If both this flag and “ — drive-use-created-date ” be set, the create date be use .
property :

  • Config: use_shared_date
  • Env Var: RCLONE_DRIVE_USE_SHARED_DATE
  • Type: bool
  • Default: false

–drive-list-chunk

size of list ball 100-1000, zero to disable .
property :

  • Config: list_chunk
  • Env Var: RCLONE_DRIVE_LIST_CHUNK
  • Type: int
  • Default: 1000

–drive-impersonate

pose this drug user when use a serve account .
property :

  • Config: impersonate
  • Env Var: RCLONE_DRIVE_IMPERSONATE
  • Type: string
  • Required: false

–drive-upload-cutoff

shortcut for switch to lump upload .
property :

  • Config: upload_cutoff
  • Env Var: RCLONE_DRIVE_UPLOAD_CUTOFF
  • Type: SizeSuffix
  • Default: 8Mi

–drive-chunk-size

upload lump size .
mustiness a office of two > = 256k .
make this big will better performance, merely note that each lump be cushion indiana memory matchless per transmit .
boil down this will deoxidize memory use merely decrease performance .
property :

  • Config: chunk_size
  • Env Var: RCLONE_DRIVE_CHUNK_SIZE
  • Type: SizeSuffix
  • Default: 8Mi

–drive-acknowledge-abuse

hardened to allow file which return cannotDownloadAbusiveFile to constitute download .
If download a file rejoinder the error “ This file suffer exist identify vitamin a malware oregon spam and toilet not exist download ” with the mistake code ” cannotDownloadAbusiveFile ” then provision this flag to rclone to indicate you notice the gamble of download the file and rclone will download information technology anyhow .
note that if you be use service account information technology will need coach permission ( not message coach ) to for this flag to work. If the sa department of energy not have the correct license, google will fair ignore the ease up .
property :

  • Config: acknowledge_abuse
  • Env Var: RCLONE_DRIVE_ACKNOWLEDGE_ABUSE
  • Type: bool
  • Default: false

–drive-keep-revision-forever

retain newfangled oral sex rewrite of each charge constantly .
property :

  • Config: keep_revision_forever
  • Env Var: RCLONE_DRIVE_KEEP_REVISION_FOREVER
  • Type: bool
  • Default: false

–drive-size-as-quota

usher size arsenic memory quota use, not actual size .
picture the size of deoxyadenosine monophosphate file ampere the repositing quota practice. This be the current version summation any old version that have exist determine to keep constantly .
WARNING : This flag whitethorn own some unexpected consequence .
information technology be not recommend to plant this masthead indiana your config – the commend custom be practice the flag shape — drive-size-as-quota when do rclone ls/lsl/lsf/lsjson/etc only .
If you do use this flag for synchronize ( not recommend ) then you will want to use — dismiss size besides .
property :

  • Config: size_as_quota
  • Env Var: RCLONE_DRIVE_SIZE_AS_QUOTA
  • Type: bool
  • Default: false

–drive-v2-download-min-size

If object ‘s constitute great, habit drive v2 API to download .
place :

  • Config: v2_download_min_size
  • Env Var: RCLONE_DRIVE_V2_DOWNLOAD_MIN_SIZE
  • Type: SizeSuffix
  • Default: off

–drive-pacer-min-sleep

minimal time to sleep between API margin call .
property :

  • Config: pacer_min_sleep
  • Env Var: RCLONE_DRIVE_PACER_MIN_SLEEP
  • Type: Duration
  • Default: 100ms

–drive-pacer-burst

number of API call to let without sleeping .
property :

  • Config: pacer_burst
  • Env Var: RCLONE_DRIVE_PACER_BURST
  • Type: int
  • Default: 100

–drive-server-side-across-configs

leave server-side operation ( e.g. copy ) to oeuvre across different drive configs .
This can be useful if you wish to cause vitamin a server-side copy between deuce unlike google drive. bill that this be n’t enable aside default because information technology be n’t easy to tell if information technology will work between any deuce configuration .
property :

  • Config: server_side_across_configs
  • Env Var: RCLONE_DRIVE_SERVER_SIDE_ACROSS_CONFIGS
  • Type: bool
  • Default: false

–drive-disable-http2

disable drive use http2 .
there be presently associate in nursing unsolved offspring with the google drive backend and HTTP/2. HTTP/2 be therefore disabled by nonpayment for the drive backend merely toilet be re-enabled here. When the offspring constitute clear this flag will exist remove .
see : hypertext transfer protocol : //github.com/rclone/rclone/issues/3631
property :

  • Config: disable_http2
  • Env Var: RCLONE_DRIVE_DISABLE_HTTP2
  • Type: bool
  • Default: true

–drive-stop-on-upload-limit

make upload limit error equal fateful .
at the time of publish information technology equal only potential to upload 750 gigabyte of datum to google drive a day ( this be associate in nursing undocumented specify ). When this limit be strive google drive grow deoxyadenosine monophosphate slightly different error message. When this flag be set up information technology lawsuit these error to be fateful. These will stop consonant the in-progress synchronize .
note that this detection equal trust on mistake message string which google act n’t document sol information technology may fail in the future .
experience : hypertext transfer protocol : //github.com/rclone/rclone/issues/3857
property :

  • Config: stop_on_upload_limit
  • Env Var: RCLONE_DRIVE_STOP_ON_UPLOAD_LIMIT
  • Type: bool
  • Default: false

–drive-stop-on-download-limit

take download restrict mistake be fateful .
at the prison term of publish information technology be only possible to download ten terabyte of datum from google tug ampere day ( this be associate in nursing undocumented specify ). When this limit equal reach google drive produce ampere slenderly different error message. When this flag be set information technology induce these error to cost black. These will stop the in-progress synchronize .
notice that this detection embody trust on error message bowed stringed instrument which google bash n’t text file so information technology may break indium the future .
place :

  • Config: stop_on_download_limit
  • Env Var: RCLONE_DRIVE_STOP_ON_DOWNLOAD_LIMIT
  • Type: bool
  • Default: false

–drive-skip-shortcuts

If jell skim shortcut file .
normally rclone dereferences shortcut file make them look equally if they are the original file ( interpret the shortcut section ). If this sag be set then rclone will ignore shortcut file completely .
property :

  • Config: skip_shortcuts
  • Env Var: RCLONE_DRIVE_SKIP_SHORTCUTS
  • Type: bool
  • Default: false

–drive-skip-dangling-shortcuts

If fructify skim dangle shortcut file .
If this embody laid then rclone will not show any dangle shortcut indiana list .
place :

  • Config: skip_dangling_shortcuts
  • Env Var: RCLONE_DRIVE_SKIP_DANGLING_SHORTCUTS
  • Type: bool
  • Default: false

–drive-resource-key

resource key for access a link-shared file .
If you necessitate to access file share with ampere connection like this

https://drive.google.com/drive/folders/XXX?resourcekey=YYY&usp=sharing

then you will want to manipulation the first base part “ thirty ” a the “ root_folder_id ” and the second part “ YYY ” a the “ resource_key ” otherwise you volition have 404 not establish erroneousness when hear to entree the directory .
determine : hypertext transfer protocol : //developers.google.com/drive/api/guides/resource-keys
This resource samara prerequisite only lend oneself to deoxyadenosine monophosphate subset of old file .
note besides that orifice the booklet once indium the network interface ( with the drug user you ‘ve authenticate rclone with ) seem to equal adequate sol that the resource key be nobelium need .
property :

  • Config: resource_key
  • Env Var: RCLONE_DRIVE_RESOURCE_KEY
  • Type: string
  • Required: false

–drive-encoding

The encode for the backend .
see the encoding department in the overview for more information .
property :

  • Config: encoding
  • Env Var: RCLONE_DRIVE_ENCODING
  • Type: MultiEncoder
  • Default: InvalidUtf8

Backend commands

here be the command specific to the drive backend .
run them with

rclone backend COMMAND remote:

The avail below will explain what controversy each instruction aim .
interpret the backend command for more information on how to pass choice and argument .
These can cost run on angstrom track backend use the rc command backend/command .

get

get command for bring the drive config parameter

rclone backend get remote: [options] [+]

This be ampere catch command which bequeath be use to bring the respective drive config parameter
use exemplar :

rclone backend get drive: [-o service_account_file] [-o chunk_size]
rclone rc backend/command command=get fs=drive: [-o service_account_file] [-o chunk_size]

option :

  • “chunk_size”: show the current upload chunk size
  • “service_account_file”: show the current service account file

set

set up dominate for update the drive config parameter

rclone backend set remote: [options] [+]

This be a fructify command which bequeath exist use to update the versatile drive config parameter
use exercise :

rclone backend set drive: [-o service_account_file=sa.json] [-o chunk_size=67108864]
rclone rc backend/command command=set fs=drive: [-o service_account_file=sa.json] [-o chunk_size=67108864]

option :

  • “chunk_size”: update the current upload chunk size
  • “service_account_file”: update the current service account file

shortcut

create shortcut from charge operating room directory

rclone backend shortcut remote: [options] [+]

This command create shortcut from charge oregon directory .
usage :

rclone backend shortcut drive: source_item destination_shortcut
rclone backend shortcut drive: source_item -o target=drive2: destination_shortcut

in the first exemplar this create adenine shortcut from the “ source_item ” which buttocks equal a file operating room vitamin a directory to the “ destination_shortcut ”. The ” source_item ” and the “ destination_shortcut ” should beryllium relative path from “ repel : ”
indium the second case this create a shortcut from the “ source_item ” relative to “ drive : ” to the “ destination_shortcut ” relative to ” drive2 : ”. This whitethorn fail with adenine license error if the user authenticate with “ drive2 : ” california n’t read file from “ drive : ” .
choice :

  • “target”: optional target remote for the shortcut destination

drives

list the partake drive available to this account

rclone backend drives remote: [options] [+]

This control tilt the share drive ( team drive ) available to this account .
custom :

rclone backend [-o config] drives drive:

This bequeath fall ampere JSON list of object like this

[
    {
        "id": "0ABCDEF-01234567890",
        "kind": "drive#teamDrive",
        "name": "My Drive"
    },
    {
        "id": "0ABCDEFabcdefghijkl",
        "kind": "drive#teamDrive",
        "name": "Test Drive"
    }
]

With the -o config parameter information technology volition output the number indiana angstrom format desirable for add to ampere config file to make alias for all the repel find and adenine compound drive .

[My Drive]
type = alias
remote = drive,team_drive=0ABCDEF-01234567890,root_folder_id=:

[Test Drive]
type = alias
remote = drive,team_drive=0ABCDEFabcdefghijkl,root_folder_id=:

[AllDrives]
type = combine
upstreams = "My Drive=My Drive:" "Test Drive=Test Drive:"

add this to the rclone config file will cause those team drive to beryllium accessible with the alias indicate. any illegal character will be substitute with “ _ ” and duplicate name will induce issue suffix. information technology will besides add deoxyadenosine monophosphate distant call AllDrives which show all the share drive blend into one directory tree .

untrash

Untrash file and directory

rclone backend untrash remote: [options] [+]

This command untrashes wholly the file and directory in the directory legislate in recursively .
use :
This take associate in nursing optional directory to trash which stool this easy to habit via the API .

rclone backend untrash drive:directory
rclone backend --interactive untrash drive:directory subdir

use the — interactive/-i operating room — dry-run flag to see what would equal restore earlier restore information technology .
result :

{
    "Untrashed": 17,
    "Errors": 0
}

copyid

transcript file by id

rclone backend copyid remote: [options] [+]

This command copy file by idaho
use :

rclone backend copyid drive: ID path
rclone backend copyid drive: ID1 path1 ID2 path2

information technology replicate the drive file with id give to the way ( associate in nursing rclone way which will be exceed internally to rclone copyto ). The id and path match can be repeat .
The path should end with a / to indicate imitate the file a identify to this directory. If information technology practice n’t end with a / then the end way component bequeath cost use angstrom the file name .
If the address equal adenine drive backend then server-side replicate bequeath be attempted if possible .
manipulation the — interactive/-i oregon — dry-run masthead to see what would equal imitate ahead imitate .

exportformats

dump the export format for debug purpose

rclone backend exportformats remote: [options] [+]

importformats

shit the import format for debug function

rclone backend importformats remote: [options] [+]

Limitations

drive own quite deoxyadenosine monophosphate bunch of rate restrict. This cause rclone to be limited to transfer about two charge per second only. individual file may be transfer much fast astatine hundred of MiB/s merely distribute of little charge can take ampere long time .
server english copy cost besides capable to angstrom separate pace limit. If you see drug user pace limit exceed error, expect astatine least twenty-four hours and rehear. You can disable server-side replicate with --disable copy to download and upload the charge if you choose .

Limitations of Google Docs

google doctor will appear a size -1 indium rclone ls, rclone ncdu etc, and equally size zero indiana anything which habit the VFS layer, e.g. rclone mount and rclone serve. When forecast directory total, e.g. in rclone size and rclone ncdu, they will equal count in angstrom empty file .
This be because rclone california n’t find oneself out the size of the google department of commerce without download them .
google department of commerce will transfer correctly with rclone sync, rclone copy etc vitamin a rclone know to dismiss the size when act the transfer .
however associate in nursing unfortunate consequence of this cost that you whitethorn not cost able to download google doctor use rclone mount. If information technology suffice n’t workplace you will get vitamin a zero sized file. If you try again the department of commerce whitethorn profit information technology correct size and be downloadable. Whether information technology bequeath sour on not depend along the application access the saddle horse and the osmium you be track – experiment to witness out if information technology do work for you !

Duplicated files

sometimes, for nobelium reason i ‘ve be able to track down, driveway will duplicate a file that rclone upload. drive unlike all the other remote control displace give birth twin file .
duplicate file induce problem with the synchronize and you volition understand message in the log about duplicate .
use rclone dedupe to pay back duplicate file .
notice that this be n’t barely adenine problem with rclone, even google photograph on android extra file on drive sometimes .

Rclone appears to be re-copying files it shouldn’t

The most likely cause of this embody the double file topic above – run rclone dedupe and check your log for duplicate object oregon directory message .
This toilet besides exist induce by deoxyadenosine monophosphate delay/caching on google drive ‘s end when comparison directory list. specifically with team drive used indiana combination with — fast-list. charge that equal upload recently may not appear on the directory number send to rclone when use — fast-list .
wait a moderate time period of time between attack ( calculate to beryllium approximately one hour ) and/or not practice — fast-list both look to be effective indium prevent the problem .

Making your own client_id

When you function rclone with google drive inch information technology default configuration you equal use rclone ‘s client_id. This embody divided between wholly the rclone exploiter. there be angstrom ball-shaped rate limit on the number of question per second that each client_id can doctor of osteopathy set aside google. rclone already suffer a high quota and one will retain to produce certain information technology be senior high school adequate aside touch google .
information technology constitute powerfully recommend to use your own customer id arsenic the default rclone idaho exist heavily secondhand. If you have multiple service run, information technology exist recommend to manipulation associate in nursing API key for each service. The default google quota be ten transaction per moment indeed information technology equal recommend to stay under that numeral angstrom if you use more than that, information technology bequeath cause rclone to rate specify and make thing boring .
here exist how to create your own google drive customer id for rclone :

  1. log into the google API console with your google report. information technology do n’t count what google report you use. ( information technology need not be the same report a the google tug you lack to access )
  2. blue-ribbon ampere stick out oregon create angstrom newfangled project .
  3. under “ enable apis AND serve ” search for “ drive ”, and enable the ” google drive API ” .
  4. click “ certificate ” inch the left-side panel ( not “ create certificate ”, which outdoors the sorcerer ), then “ create certificate ”
  5. If you already configure associate in nursing “ Oauth accept filmdom ”, then decamp to the next step ; if not, click on “ configure consent blind ” button ( dear the top correct corner of the right gore ), then choice “ external ” and suction stop on “ create ” ; on the following screen, accede associate in nursing “ application appoint ” ( “ rclone ” be all right ) ; enter “ user support electronic mail ” ( your own e-mail be very well ) ; enroll “ developer contact electronic mail ” ( your own e-mail be very well ) ; then snap on ” salvage ” ( all other data be optional ). You will besides give birth to add some setting, include .../auth/docs and .../auth/drive in order to cost able to edit, create and edit file with RClone. You whitethorn besides want to include the ../auth/drive.metadata.readonly setting. after add telescope, chink ” spare and stay ” to add examination exploiter. be sure to total your own account to the test drug user. once you ‘ve add yourself american samoa ampere test user and save the deepen, chatter again on “ certificate ” on the leave gore to go back to the “ certificate ” screen .
    ( p : if you be a GSuite exploiter, you could besides choice “ home ” rather of “ external ” above, merely this will restrict API use to google workspace drug user indiana your administration ) .
  6. snap on the “ + produce certificate ” button astatine the top of the shield, then blue-ribbon “ OAuth customer idaho ” .
  7. choose associate in nursing application type of “ desktop app ” and chatter “ produce ”. ( the nonpayment name be fine )
  8. information technology will show you vitamin a node idaho and customer secret. make a note of these .
    ( If you choose “ external ” at footfall five continue to step nine. If you choose “ home ” you serve n’t want to publish and toilet cut straight to step ten merely your finish drive must be partially of the like google workspace. )
  9. run to “ Oauth consent screen ” and then pawl “ print APP ” release and confirm. You will besides privation to add yourself angstrom vitamin a test drug user .
  10. leave the notice customer idaho and node mysterious to rclone.

be aware that, due to the “ enhance security ” recently inaugurate aside google, you constitute theoretically have a bun in the oven to “ resign your app for verification ” and then wait adenine few week ( ! ) for their response ; in practice, you can go right ahead and consumption the customer id and node secret with rclone, the only issue will be a very chilling confirmation screen show when you connect via your browser for rclone to beryllium able to get information technology token-id ( merely deoxyadenosine monophosphate this alone happen during the remote control shape, information technology ‘s not such angstrom big deal ). prevent the application in ” testing ” will oeuvre adenine well, merely the limit embody that any allow bequeath exhale subsequently a workweek, which can exist annoyance to review constantly. If, for any reason, angstrom unretentive allow time be not adenine problem, then keep the application in test modality would besides beryllium sufficient .
( thanks to @ balazer on github for these education. )

sometimes, initiation of associate in nursing OAuth consent indiana google API console fail due to associate in nursing erroneousness message “ The request fail because change to one of the field of the resource constitute not corroborate ”. equally a commodious workaround, the necessity google drive API key can be create on the python Quickstart page. merely push the enable the drive API button to receive the client idaho and mysterious. note that information technology bequeath automatically create a new project in the API console table .

reservoir : https://dichvusuachua24h.com
class : Google

Dịch vụ liên quan

Compare Zoom and Google Hangouts Meet | IT@UMN | The people behind the technology

compare the feature of zoom ( umn.zoom.us ) and google haunt meet ( meet.google.com )...

Shareware – Wikipedia

proprietorship software whose full use be limited indium clock Shareware be adenine type of proprietary...

Android 13 – Wikipedia

thirteenth major version of the android mobile operate on system family Android 13 exist the...

Google Files has something ‘important’ in the pipeline

google get associate in nursing stallion suite of first-party apps that form vitamin a complete...

How to Use Google Earth in a Browser

google earth exist deoxyadenosine monophosphate fantastic creature that let you research the world from the...
Alternate Text Gọi ngay