github.com/10XDev/rclone@v1.52.3-0.20200626220027-16af9ab76b2a/docs/content/docs.md (about) 1 --- 2 title: "Documentation" 3 description: "Rclone Usage" 4 --- 5 6 Configure 7 --------- 8 9 First, you'll need to configure rclone. As the object storage systems 10 have quite complicated authentication these are kept in a config file. 11 (See the `--config` entry for how to find the config file and choose 12 its location.) 13 14 The easiest way to make the config is to run rclone with the config 15 option: 16 17 rclone config 18 19 See the following for detailed instructions for 20 21 * [1Fichier](/fichier/) 22 * [Alias](/alias/) 23 * [Amazon Drive](/amazonclouddrive/) 24 * [Amazon S3](/s3/) 25 * [Backblaze B2](/b2/) 26 * [Box](/box/) 27 * [Cache](/cache/) 28 * [Chunker](/chunker/) - transparently splits large files for other remotes 29 * [Citrix ShareFile](/sharefile/) 30 * [Crypt](/crypt/) - to encrypt other remotes 31 * [DigitalOcean Spaces](/s3/#digitalocean-spaces) 32 * [Dropbox](/dropbox/) 33 * [FTP](/ftp/) 34 * [Google Cloud Storage](/googlecloudstorage/) 35 * [Google Drive](/drive/) 36 * [Google Photos](/googlephotos/) 37 * [HTTP](/http/) 38 * [Hubic](/hubic/) 39 * [Jottacloud / GetSky.no](/jottacloud/) 40 * [Koofr](/koofr/) 41 * [Mail.ru Cloud](/mailru/) 42 * [Mega](/mega/) 43 * [Memory](/memory/) 44 * [Microsoft Azure Blob Storage](/azureblob/) 45 * [Microsoft OneDrive](/onedrive/) 46 * [OpenStack Swift / Rackspace Cloudfiles / Memset Memstore](/swift/) 47 * [OpenDrive](/opendrive/) 48 * [Pcloud](/pcloud/) 49 * [premiumize.me](/premiumizeme/) 50 * [put.io](/putio/) 51 * [QingStor](/qingstor/) 52 * [Seafile](/seafile/) 53 * [SFTP](/sftp/) 54 * [SugarSync](/sugarsync/) 55 * [Tardigrade](/tardigrade/) 56 * [Union](/union/) 57 * [WebDAV](/webdav/) 58 * [Yandex Disk](/yandex/) 59 * [The local filesystem](/local/) 60 61 Usage 62 ----- 63 64 Rclone syncs a directory tree from one storage system to another. 65 66 Its syntax is like this 67 68 Syntax: [options] subcommand <parameters> <parameters...> 69 70 Source and destination paths are specified by the name you gave the 71 storage system in the config file then the sub path, eg 72 "drive:myfolder" to look at "myfolder" in Google drive. 73 74 You can define as many storage paths as you like in the config file. 75 76 Subcommands 77 ----------- 78 79 rclone uses a system of subcommands. For example 80 81 rclone ls remote:path # lists a remote 82 rclone copy /local/path remote:path # copies /local/path to the remote 83 rclone sync /local/path remote:path # syncs /local/path to the remote 84 85 The main rclone commands with most used first 86 87 * [rclone config](/commands/rclone_config/) - Enter an interactive configuration session. 88 * [rclone copy](/commands/rclone_copy/) - Copy files from source to dest, skipping already copied. 89 * [rclone sync](/commands/rclone_sync/) - Make source and dest identical, modifying destination only. 90 * [rclone move](/commands/rclone_move/) - Move files from source to dest. 91 * [rclone delete](/commands/rclone_delete/) - Remove the contents of path. 92 * [rclone purge](/commands/rclone_purge/) - Remove the path and all of its contents. 93 * [rclone mkdir](/commands/rclone_mkdir/) - Make the path if it doesn't already exist. 94 * [rclone rmdir](/commands/rclone_rmdir/) - Remove the path. 95 * [rclone rmdirs](/commands/rclone_rmdirs/) - Remove any empty directories under the path. 96 * [rclone check](/commands/rclone_check/) - Check if the files in the source and destination match. 97 * [rclone ls](/commands/rclone_ls/) - List all the objects in the path with size and path. 98 * [rclone lsd](/commands/rclone_lsd/) - List all directories/containers/buckets in the path. 99 * [rclone lsl](/commands/rclone_lsl/) - List all the objects in the path with size, modification time and path. 100 * [rclone md5sum](/commands/rclone_md5sum/) - Produce an md5sum file for all the objects in the path. 101 * [rclone sha1sum](/commands/rclone_sha1sum/) - Produce a sha1sum file for all the objects in the path. 102 * [rclone size](/commands/rclone_size/) - Return the total size and number of objects in remote:path. 103 * [rclone version](/commands/rclone_version/) - Show the version number. 104 * [rclone cleanup](/commands/rclone_cleanup/) - Clean up the remote if possible. 105 * [rclone dedupe](/commands/rclone_dedupe/) - Interactively find duplicate files and delete/rename them. 106 * [rclone authorize](/commands/rclone_authorize/) - Remote authorization. 107 * [rclone cat](/commands/rclone_cat/) - Concatenate any files and send them to stdout. 108 * [rclone copyto](/commands/rclone_copyto/) - Copy files from source to dest, skipping already copied. 109 * [rclone genautocomplete](/commands/rclone_genautocomplete/) - Output shell completion scripts for rclone. 110 * [rclone gendocs](/commands/rclone_gendocs/) - Output markdown docs for rclone to the directory supplied. 111 * [rclone listremotes](/commands/rclone_listremotes/) - List all the remotes in the config file. 112 * [rclone mount](/commands/rclone_mount/) - Mount the remote as a mountpoint. 113 * [rclone moveto](/commands/rclone_moveto/) - Move file or directory from source to dest. 114 * [rclone obscure](/commands/rclone_obscure/) - Obscure password for use in the rclone.conf 115 * [rclone cryptcheck](/commands/rclone_cryptcheck/) - Check the integrity of a crypted remote. 116 * [rclone about](/commands/rclone_about/) - Get quota information from the remote. 117 118 See the [commands index](/commands/) for the full list. 119 120 Copying single files 121 -------------------- 122 123 rclone normally syncs or copies directories. However, if the source 124 remote points to a file, rclone will just copy that file. The 125 destination remote must point to a directory - rclone will give the 126 error `Failed to create file system for "remote:file": is a file not a 127 directory` if it isn't. 128 129 For example, suppose you have a remote with a file in called 130 `test.jpg`, then you could copy just that file like this 131 132 rclone copy remote:test.jpg /tmp/download 133 134 The file `test.jpg` will be placed inside `/tmp/download`. 135 136 This is equivalent to specifying 137 138 rclone copy --files-from /tmp/files remote: /tmp/download 139 140 Where `/tmp/files` contains the single line 141 142 test.jpg 143 144 It is recommended to use `copy` when copying individual files, not `sync`. 145 They have pretty much the same effect but `copy` will use a lot less 146 memory. 147 148 Syntax of remote paths 149 ---------------------- 150 151 The syntax of the paths passed to the rclone command are as follows. 152 153 ### /path/to/dir 154 155 This refers to the local file system. 156 157 On Windows only `\` may be used instead of `/` in local paths 158 **only**, non local paths must use `/`. 159 160 These paths needn't start with a leading `/` - if they don't then they 161 will be relative to the current directory. 162 163 ### remote:path/to/dir 164 165 This refers to a directory `path/to/dir` on `remote:` as defined in 166 the config file (configured with `rclone config`). 167 168 ### remote:/path/to/dir 169 170 On most backends this is refers to the same directory as 171 `remote:path/to/dir` and that format should be preferred. On a very 172 small number of remotes (FTP, SFTP, Dropbox for business) this will 173 refer to a different directory. On these, paths without a leading `/` 174 will refer to your "home" directory and paths with a leading `/` will 175 refer to the root. 176 177 ### :backend:path/to/dir 178 179 This is an advanced form for creating remotes on the fly. `backend` 180 should be the name or prefix of a backend (the `type` in the config 181 file) and all the configuration for the backend should be provided on 182 the command line (or in environment variables). 183 184 Here are some examples: 185 186 rclone lsd --http-url https://pub.rclone.org :http: 187 188 To list all the directories in the root of `https://pub.rclone.org/`. 189 190 rclone lsf --http-url https://example.com :http:path/to/dir 191 192 To list files and directories in `https://example.com/path/to/dir/` 193 194 rclone copy --http-url https://example.com :http:path/to/dir /tmp/dir 195 196 To copy files and directories in `https://example.com/path/to/dir` to `/tmp/dir`. 197 198 rclone copy --sftp-host example.com :sftp:path/to/dir /tmp/dir 199 200 To copy files and directories from `example.com` in the relative 201 directory `path/to/dir` to `/tmp/dir` using sftp. 202 203 Quoting and the shell 204 --------------------- 205 206 When you are typing commands to your computer you are using something 207 called the command line shell. This interprets various characters in 208 an OS specific way. 209 210 Here are some gotchas which may help users unfamiliar with the shell rules 211 212 ### Linux / OSX ### 213 214 If your names have spaces or shell metacharacters (eg `*`, `?`, `$`, 215 `'`, `"` etc) then you must quote them. Use single quotes `'` by default. 216 217 rclone copy 'Important files?' remote:backup 218 219 If you want to send a `'` you will need to use `"`, eg 220 221 rclone copy "O'Reilly Reviews" remote:backup 222 223 The rules for quoting metacharacters are complicated and if you want 224 the full details you'll have to consult the manual page for your 225 shell. 226 227 ### Windows ### 228 229 If your names have spaces in you need to put them in `"`, eg 230 231 rclone copy "E:\folder name\folder name\folder name" remote:backup 232 233 If you are using the root directory on its own then don't quote it 234 (see [#464](https://github.com/rclone/rclone/issues/464) for why), eg 235 236 rclone copy E:\ remote:backup 237 238 Copying files or directories with `:` in the names 239 -------------------------------------------------- 240 241 rclone uses `:` to mark a remote name. This is, however, a valid 242 filename component in non-Windows OSes. The remote name parser will 243 only search for a `:` up to the first `/` so if you need to act on a 244 file or directory like this then use the full path starting with a 245 `/`, or use `./` as a current directory prefix. 246 247 So to sync a directory called `sync:me` to a remote called `remote:` use 248 249 rclone sync ./sync:me remote:path 250 251 or 252 253 rclone sync /full/path/to/sync:me remote:path 254 255 Server Side Copy 256 ---------------- 257 258 Most remotes (but not all - see [the 259 overview](/overview/#optional-features)) support server side copy. 260 261 This means if you want to copy one folder to another then rclone won't 262 download all the files and re-upload them; it will instruct the server 263 to copy them in place. 264 265 Eg 266 267 rclone copy s3:oldbucket s3:newbucket 268 269 Will copy the contents of `oldbucket` to `newbucket` without 270 downloading and re-uploading. 271 272 Remotes which don't support server side copy **will** download and 273 re-upload in this case. 274 275 Server side copies are used with `sync` and `copy` and will be 276 identified in the log when using the `-v` flag. The `move` command 277 may also use them if remote doesn't support server side move directly. 278 This is done by issuing a server side copy then a delete which is much 279 quicker than a download and re-upload. 280 281 Server side copies will only be attempted if the remote names are the 282 same. 283 284 This can be used when scripting to make aged backups efficiently, eg 285 286 rclone sync remote:current-backup remote:previous-backup 287 rclone sync /path/to/files remote:current-backup 288 289 Options 290 ------- 291 292 Rclone has a number of options to control its behaviour. 293 294 Options that take parameters can have the values passed in two ways, 295 `--option=value` or `--option value`. However boolean (true/false) 296 options behave slightly differently to the other options in that 297 `--boolean` sets the option to `true` and the absence of the flag sets 298 it to `false`. It is also possible to specify `--boolean=false` or 299 `--boolean=true`. Note that `--boolean false` is not valid - this is 300 parsed as `--boolean` and the `false` is parsed as an extra command 301 line argument for rclone. 302 303 Options which use TIME use the go time parser. A duration string is a 304 possibly signed sequence of decimal numbers, each with optional 305 fraction and a unit suffix, such as "300ms", "-1.5h" or "2h45m". Valid 306 time units are "ns", "us" (or "µs"), "ms", "s", "m", "h". 307 308 Options which use SIZE use kByte by default. However, a suffix of `b` 309 for bytes, `k` for kBytes, `M` for MBytes, `G` for GBytes, `T` for 310 TBytes and `P` for PBytes may be used. These are the binary units, eg 311 1, 2\*\*10, 2\*\*20, 2\*\*30 respectively. 312 313 ### --backup-dir=DIR ### 314 315 When using `sync`, `copy` or `move` any files which would have been 316 overwritten or deleted are moved in their original hierarchy into this 317 directory. 318 319 If `--suffix` is set, then the moved files will have the suffix added 320 to them. If there is a file with the same path (after the suffix has 321 been added) in DIR, then it will be overwritten. 322 323 The remote in use must support server side move or copy and you must 324 use the same remote as the destination of the sync. The backup 325 directory must not overlap the destination directory. 326 327 For example 328 329 rclone sync /path/to/local remote:current --backup-dir remote:old 330 331 will sync `/path/to/local` to `remote:current`, but for any files 332 which would have been updated or deleted will be stored in 333 `remote:old`. 334 335 If running rclone from a script you might want to use today's date as 336 the directory name passed to `--backup-dir` to store the old files, or 337 you might want to pass `--suffix` with today's date. 338 339 See `--compare-dest` and `--copy-dest`. 340 341 ### --bind string ### 342 343 Local address to bind to for outgoing connections. This can be an 344 IPv4 address (1.2.3.4), an IPv6 address (1234::789A) or host name. If 345 the host name doesn't resolve or resolves to more than one IP address 346 it will give an error. 347 348 ### --bwlimit=BANDWIDTH_SPEC ### 349 350 This option controls the bandwidth limit. Limits can be specified 351 in two ways: As a single limit, or as a timetable. 352 353 Single limits last for the duration of the session. To use a single limit, 354 specify the desired bandwidth in kBytes/s, or use a suffix b|k|M|G. The 355 default is `0` which means to not limit bandwidth. 356 357 For example, to limit bandwidth usage to 10 MBytes/s use `--bwlimit 10M` 358 359 It is also possible to specify a "timetable" of limits, which will cause 360 certain limits to be applied at certain times. To specify a timetable, format your 361 entries as `WEEKDAY-HH:MM,BANDWIDTH WEEKDAY-HH:MM,BANDWIDTH...` where: 362 `WEEKDAY` is optional element. 363 It could be written as whole world or only using 3 first characters. 364 `HH:MM` is an hour from 00:00 to 23:59. 365 366 An example of a typical timetable to avoid link saturation during daytime 367 working hours could be: 368 369 `--bwlimit "08:00,512 12:00,10M 13:00,512 18:00,30M 23:00,off"` 370 371 In this example, the transfer bandwidth will be every day set to 512kBytes/sec at 8am. 372 At noon, it will raise to 10Mbytes/s, and drop back to 512kBytes/sec at 1pm. 373 At 6pm, the bandwidth limit will be set to 30MBytes/s, and at 11pm it will be 374 completely disabled (full speed). Anything between 11pm and 8am will remain 375 unlimited. 376 377 An example of timetable with `WEEKDAY` could be: 378 379 `--bwlimit "Mon-00:00,512 Fri-23:59,10M Sat-10:00,1M Sun-20:00,off"` 380 381 It mean that, the transfer bandwidth will be set to 512kBytes/sec on Monday. 382 It will raise to 10Mbytes/s before the end of Friday. 383 At 10:00 on Sunday it will be set to 1Mbyte/s. 384 From 20:00 at Sunday will be unlimited. 385 386 Timeslots without weekday are extended to whole week. 387 So this one example: 388 389 `--bwlimit "Mon-00:00,512 12:00,1M Sun-20:00,off"` 390 391 Is equal to this: 392 393 `--bwlimit "Mon-00:00,512Mon-12:00,1M Tue-12:00,1M Wed-12:00,1M Thu-12:00,1M Fri-12:00,1M Sat-12:00,1M Sun-12:00,1M Sun-20:00,off"` 394 395 Bandwidth limits only apply to the data transfer. They don't apply to the 396 bandwidth of the directory listings etc. 397 398 Note that the units are Bytes/s, not Bits/s. Typically connections are 399 measured in Bits/s - to convert divide by 8. For example, let's say 400 you have a 10 Mbit/s connection and you wish rclone to use half of it 401 - 5 Mbit/s. This is 5/8 = 0.625MByte/s so you would use a `--bwlimit 402 0.625M` parameter for rclone. 403 404 On Unix systems (Linux, macOS, …) the bandwidth limiter can be toggled by 405 sending a `SIGUSR2` signal to rclone. This allows to remove the limitations 406 of a long running rclone transfer and to restore it back to the value specified 407 with `--bwlimit` quickly when needed. Assuming there is only one rclone instance 408 running, you can toggle the limiter like this: 409 410 kill -SIGUSR2 $(pidof rclone) 411 412 If you configure rclone with a [remote control](/rc) then you can use 413 change the bwlimit dynamically: 414 415 rclone rc core/bwlimit rate=1M 416 417 ### --buffer-size=SIZE ### 418 419 Use this sized buffer to speed up file transfers. Each `--transfer` 420 will use this much memory for buffering. 421 422 When using `mount` or `cmount` each open file descriptor will use this much 423 memory for buffering. 424 See the [mount](/commands/rclone_mount/#file-buffering) documentation for more details. 425 426 Set to `0` to disable the buffering for the minimum memory usage. 427 428 Note that the memory allocation of the buffers is influenced by the 429 [--use-mmap](#use-mmap) flag. 430 431 ### --check-first ### 432 433 If this flag is set then in a `sync`, `copy` or `move`, rclone will do 434 all the checks to see whether files need to be transferred before 435 doing any of the transfers. Normally rclone would start running 436 transfers as soon as possible. 437 438 This flag can be useful on IO limited systems where transfers 439 interfere with checking. 440 441 Using this flag can use more memory as it effectively sets 442 `--max-backlog` to infinite. This means that all the info on the 443 objects to transfer is held in memory before the transfers start. 444 445 ### --checkers=N ### 446 447 The number of checkers to run in parallel. Checkers do the equality 448 checking of files during a sync. For some storage systems (eg S3, 449 Swift, Dropbox) this can take a significant amount of time so they are 450 run in parallel. 451 452 The default is to run 8 checkers in parallel. 453 454 ### -c, --checksum ### 455 456 Normally rclone will look at modification time and size of files to 457 see if they are equal. If you set this flag then rclone will check 458 the file hash and size to determine if files are equal. 459 460 This is useful when the remote doesn't support setting modified time 461 and a more accurate sync is desired than just checking the file size. 462 463 This is very useful when transferring between remotes which store the 464 same hash type on the object, eg Drive and Swift. For details of which 465 remotes support which hash type see the table in the [overview 466 section](/overview/). 467 468 Eg `rclone --checksum sync s3:/bucket swift:/bucket` would run much 469 quicker than without the `--checksum` flag. 470 471 When using this flag, rclone won't update mtimes of remote files if 472 they are incorrect as it would normally. 473 474 ### --compare-dest=DIR ### 475 476 When using `sync`, `copy` or `move` DIR is checked in addition to the 477 destination for files. If a file identical to the source is found that 478 file is NOT copied from source. This is useful to copy just files that 479 have changed since the last backup. 480 481 You must use the same remote as the destination of the sync. The 482 compare directory must not overlap the destination directory. 483 484 See `--copy-dest` and `--backup-dir`. 485 486 ### --config=CONFIG_FILE ### 487 488 Specify the location of the rclone config file. 489 490 Normally the config file is in your home directory as a file called 491 `.config/rclone/rclone.conf` (or `.rclone.conf` if created with an 492 older version). If `$XDG_CONFIG_HOME` is set it will be at 493 `$XDG_CONFIG_HOME/rclone/rclone.conf`. 494 495 If there is a file `rclone.conf` in the same directory as the rclone 496 executable it will be preferred. This file must be created manually 497 for Rclone to use it, it will never be created automatically. 498 499 If you run `rclone config file` you will see where the default 500 location is for you. 501 502 Use this flag to override the config location, eg `rclone 503 --config=".myconfig" .config`. 504 505 ### --contimeout=TIME ### 506 507 Set the connection timeout. This should be in go time format which 508 looks like `5s` for 5 seconds, `10m` for 10 minutes, or `3h30m`. 509 510 The connection timeout is the amount of time rclone will wait for a 511 connection to go through to a remote object storage system. It is 512 `1m` by default. 513 514 ### --copy-dest=DIR ### 515 516 When using `sync`, `copy` or `move` DIR is checked in addition to the 517 destination for files. If a file identical to the source is found that 518 file is server side copied from DIR to the destination. This is useful 519 for incremental backup. 520 521 The remote in use must support server side copy and you must 522 use the same remote as the destination of the sync. The compare 523 directory must not overlap the destination directory. 524 525 See `--compare-dest` and `--backup-dir`. 526 527 ### --dedupe-mode MODE ### 528 529 Mode to run dedupe command in. One of `interactive`, `skip`, `first`, `newest`, `oldest`, `rename`. The default is `interactive`. See the dedupe command for more information as to what these options mean. 530 531 ### --disable FEATURE,FEATURE,... ### 532 533 This disables a comma separated list of optional features. For example 534 to disable server side move and server side copy use: 535 536 --disable move,copy 537 538 The features can be put in any case. 539 540 To see a list of which features can be disabled use: 541 542 --disable help 543 544 See the overview [features](/overview/#features) and 545 [optional features](/overview/#optional-features) to get an idea of 546 which feature does what. 547 548 This flag can be useful for debugging and in exceptional circumstances 549 (eg Google Drive limiting the total volume of Server Side Copies to 550 100GB/day). 551 552 ### -n, --dry-run ### 553 554 Do a trial run with no permanent changes. Use this to see what rclone 555 would do without actually doing it. Useful when setting up the `sync` 556 command which deletes files in the destination. 557 558 ### --expect-continue-timeout=TIME ### 559 560 This specifies the amount of time to wait for a server's first 561 response headers after fully writing the request headers if the 562 request has an "Expect: 100-continue" header. Not all backends support 563 using this. 564 565 Zero means no timeout and causes the body to be sent immediately, 566 without waiting for the server to approve. This time does not include 567 the time to send the request header. 568 569 The default is `1s`. Set to `0` to disable. 570 571 ### --error-on-no-transfer ### 572 573 By default, rclone will exit with return code 0 if there were no errors. 574 575 This option allows rclone to return exit code 9 if no files were transferred 576 between the source and destination. This allows using rclone in scripts, and 577 triggering follow-on actions if data was copied, or skipping if not. 578 579 NB: Enabling this option turns a usually non-fatal error into a potentially 580 fatal one - please check and adjust your scripts accordingly! 581 582 ### --header ### 583 584 Add an HTTP header for all transactions. The flag can be repeated to 585 add multiple headers. 586 587 If you want to add headers only for uploads use `--header-upload` and 588 if you want to add headers only for downloads use `--header-download`. 589 590 This flag is supported for all HTTP based backends even those not 591 supported by `--header-upload` and `--header-download` so may be used 592 as a workaround for those with care. 593 594 ``` 595 rclone ls remote:test --header "X-Rclone: Foo" --header "X-LetMeIn: Yes" 596 ``` 597 598 ### --header-download ### 599 600 Add an HTTP header for all download transactions. The flag can be repeated to 601 add multiple headers. 602 603 ``` 604 rclone sync s3:test/src ~/dst --header-download "X-Amz-Meta-Test: Foo" --header-download "X-Amz-Meta-Test2: Bar" 605 ``` 606 607 See the GitHub issue [here](https://github.com/rclone/rclone/issues/59) for 608 currently supported backends. 609 610 ### --header-upload ### 611 612 Add an HTTP header for all upload transactions. The flag can be repeated to add 613 multiple headers. 614 615 ``` 616 rclone sync ~/src s3:test/dst --header-upload "Content-Disposition: attachment; filename='cool.html'" --header-upload "X-Amz-Meta-Test: FooBar" 617 ``` 618 619 See the GitHub issue [here](https://github.com/rclone/rclone/issues/59) for 620 currently supported backends. 621 622 ### --ignore-case-sync ### 623 624 Using this option will cause rclone to ignore the case of the files 625 when synchronizing so files will not be copied/synced when the 626 existing filenames are the same, even if the casing is different. 627 628 ### --ignore-checksum ### 629 630 Normally rclone will check that the checksums of transferred files 631 match, and give an error "corrupted on transfer" if they don't. 632 633 You can use this option to skip that check. You should only use it if 634 you have had the "corrupted on transfer" error message and you are 635 sure you might want to transfer potentially corrupted data. 636 637 ### --ignore-existing ### 638 639 Using this option will make rclone unconditionally skip all files 640 that exist on the destination, no matter the content of these files. 641 642 While this isn't a generally recommended option, it can be useful 643 in cases where your files change due to encryption. However, it cannot 644 correct partial transfers in case a transfer was interrupted. 645 646 ### --ignore-size ### 647 648 Normally rclone will look at modification time and size of files to 649 see if they are equal. If you set this flag then rclone will check 650 only the modification time. If `--checksum` is set then it only 651 checks the checksum. 652 653 It will also cause rclone to skip verifying the sizes are the same 654 after transfer. 655 656 This can be useful for transferring files to and from OneDrive which 657 occasionally misreports the size of image files (see 658 [#399](https://github.com/rclone/rclone/issues/399) for more info). 659 660 ### -I, --ignore-times ### 661 662 Using this option will cause rclone to unconditionally upload all 663 files regardless of the state of files on the destination. 664 665 Normally rclone would skip any files that have the same 666 modification time and are the same size (or have the same checksum if 667 using `--checksum`). 668 669 ### --immutable ### 670 671 Treat source and destination files as immutable and disallow 672 modification. 673 674 With this option set, files will be created and deleted as requested, 675 but existing files will never be updated. If an existing file does 676 not match between the source and destination, rclone will give the error 677 `Source and destination exist but do not match: immutable file modified`. 678 679 Note that only commands which transfer files (e.g. `sync`, `copy`, 680 `move`) are affected by this behavior, and only modification is 681 disallowed. Files may still be deleted explicitly (e.g. `delete`, 682 `purge`) or implicitly (e.g. `sync`, `move`). Use `copy --immutable` 683 if it is desired to avoid deletion as well as modification. 684 685 This can be useful as an additional layer of protection for immutable 686 or append-only data sets (notably backup archives), where modification 687 implies corruption and should not be propagated. 688 689 ## --leave-root ### 690 691 During rmdirs it will not remove root directory, even if it's empty. 692 693 ### --log-file=FILE ### 694 695 Log all of rclone's output to FILE. This is not active by default. 696 This can be useful for tracking down problems with syncs in 697 combination with the `-v` flag. See the [Logging section](#logging) 698 for more info. 699 700 Note that if you are using the `logrotate` program to manage rclone's 701 logs, then you should use the `copytruncate` option as rclone doesn't 702 have a signal to rotate logs. 703 704 ### --log-format LIST ### 705 706 Comma separated list of log format options. `date`, `time`, `microseconds`, `longfile`, `shortfile`, `UTC`. The default is "`date`,`time`". 707 708 ### --log-level LEVEL ### 709 710 This sets the log level for rclone. The default log level is `NOTICE`. 711 712 `DEBUG` is equivalent to `-vv`. It outputs lots of debug info - useful 713 for bug reports and really finding out what rclone is doing. 714 715 `INFO` is equivalent to `-v`. It outputs information about each transfer 716 and prints stats once a minute by default. 717 718 `NOTICE` is the default log level if no logging flags are supplied. It 719 outputs very little when things are working normally. It outputs 720 warnings and significant events. 721 722 `ERROR` is equivalent to `-q`. It only outputs error messages. 723 724 ### --use-json-log ### 725 726 This switches the log format to JSON for rclone. The fields of json log 727 are level, msg, source, time. 728 729 ### --low-level-retries NUMBER ### 730 731 This controls the number of low level retries rclone does. 732 733 A low level retry is used to retry a failing operation - typically one 734 HTTP request. This might be uploading a chunk of a big file for 735 example. You will see low level retries in the log with the `-v` 736 flag. 737 738 This shouldn't need to be changed from the default in normal operations. 739 However, if you get a lot of low level retries you may wish 740 to reduce the value so rclone moves on to a high level retry (see the 741 `--retries` flag) quicker. 742 743 Disable low level retries with `--low-level-retries 1`. 744 745 ### --max-backlog=N ### 746 747 This is the maximum allowable backlog of files in a sync/copy/move 748 queued for being checked or transferred. 749 750 This can be set arbitrarily large. It will only use memory when the 751 queue is in use. Note that it will use in the order of N kB of memory 752 when the backlog is in use. 753 754 Setting this large allows rclone to calculate how many files are 755 pending more accurately, give a more accurate estimated finish 756 time and make `--order-by` work more accurately. 757 758 Setting this small will make rclone more synchronous to the listings 759 of the remote which may be desirable. 760 761 Setting this to a negative number will make the backlog as large as 762 possible. 763 764 ### --max-delete=N ### 765 766 This tells rclone not to delete more than N files. If that limit is 767 exceeded then a fatal error will be generated and rclone will stop the 768 operation in progress. 769 770 ### --max-depth=N ### 771 772 This modifies the recursion depth for all the commands except purge. 773 774 So if you do `rclone --max-depth 1 ls remote:path` you will see only 775 the files in the top level directory. Using `--max-depth 2` means you 776 will see all the files in first two directory levels and so on. 777 778 For historical reasons the `lsd` command defaults to using a 779 `--max-depth` of 1 - you can override this with the command line flag. 780 781 You can use this command to disable recursion (with `--max-depth 1`). 782 783 Note that if you use this with `sync` and `--delete-excluded` the 784 files not recursed through are considered excluded and will be deleted 785 on the destination. Test first with `--dry-run` if you are not sure 786 what will happen. 787 788 ### --max-duration=TIME ### 789 790 Rclone will stop scheduling new transfers when it has run for the 791 duration specified. 792 793 Defaults to off. 794 795 When the limit is reached any existing transfers will complete. 796 797 Rclone won't exit with an error if the transfer limit is reached. 798 799 ### --max-transfer=SIZE ### 800 801 Rclone will stop transferring when it has reached the size specified. 802 Defaults to off. 803 804 When the limit is reached all transfers will stop immediately. 805 806 Rclone will exit with exit code 8 if the transfer limit is reached. 807 808 ### --cutoff-mode=hard|soft|cautious ### 809 810 This modifies the behavior of `--max-transfer` 811 Defaults to `--cutoff-mode=hard`. 812 813 Specifying `--cutoff-mode=hard` will stop transferring immediately 814 when Rclone reaches the limit. 815 816 Specifying `--cutoff-mode=soft` will stop starting new transfers 817 when Rclone reaches the limit. 818 819 Specifying `--cutoff-mode=cautious` will try to prevent Rclone 820 from reaching the limit. 821 822 ### --modify-window=TIME ### 823 824 When checking whether a file has been modified, this is the maximum 825 allowed time difference that a file can have and still be considered 826 equivalent. 827 828 The default is `1ns` unless this is overridden by a remote. For 829 example OS X only stores modification times to the nearest second so 830 if you are reading and writing to an OS X filing system this will be 831 `1s` by default. 832 833 This command line flag allows you to override that computed default. 834 835 ### --multi-thread-cutoff=SIZE ### 836 837 When downloading files to the local backend above this size, rclone 838 will use multiple threads to download the file (default 250M). 839 840 Rclone preallocates the file (using `fallocate(FALLOC_FL_KEEP_SIZE)` 841 on unix or `NTSetInformationFile` on Windows both of which takes no 842 time) then each thread writes directly into the file at the correct 843 place. This means that rclone won't create fragmented or sparse files 844 and there won't be any assembly time at the end of the transfer. 845 846 The number of threads used to download is controlled by 847 `--multi-thread-streams`. 848 849 Use `-vv` if you wish to see info about the threads. 850 851 This will work with the `sync`/`copy`/`move` commands and friends 852 `copyto`/`moveto`. Multi thread downloads will be used with `rclone 853 mount` and `rclone serve` if `--vfs-cache-mode` is set to `writes` or 854 above. 855 856 **NB** that this **only** works for a local destination but will work 857 with any source. 858 859 **NB** that multi thread copies are disabled for local to local copies 860 as they are faster without unless `--multi-thread-streams` is set 861 explicitly. 862 863 **NB** on Windows using multi-thread downloads will cause the 864 resulting files to be [sparse](https://en.wikipedia.org/wiki/Sparse_file). 865 Use `--local-no-sparse` to disable sparse files (which may cause long 866 delays at the start of downloads) or disable multi-thread downloads 867 with `--multi-thread-streams 0` 868 869 ### --multi-thread-streams=N ### 870 871 When using multi thread downloads (see above `--multi-thread-cutoff`) 872 this sets the maximum number of streams to use. Set to `0` to disable 873 multi thread downloads (Default 4). 874 875 Exactly how many streams rclone uses for the download depends on the 876 size of the file. To calculate the number of download streams Rclone 877 divides the size of the file by the `--multi-thread-cutoff` and rounds 878 up, up to the maximum set with `--multi-thread-streams`. 879 880 So if `--multi-thread-cutoff 250MB` and `--multi-thread-streams 4` are 881 in effect (the defaults): 882 883 - 0MB..250MB files will be downloaded with 1 stream 884 - 250MB..500MB files will be downloaded with 2 streams 885 - 500MB..750MB files will be downloaded with 3 streams 886 - 750MB+ files will be downloaded with 4 streams 887 888 ### --no-check-dest ### 889 890 The `--no-check-dest` can be used with `move` or `copy` and it causes 891 rclone not to check the destination at all when copying files. 892 893 This means that: 894 895 - the destination is not listed minimising the API calls 896 - files are always transferred 897 - this can cause duplicates on remotes which allow it (eg Google Drive) 898 - `--retries 1` is recommended otherwise you'll transfer everything again on a retry 899 900 This flag is useful to minimise the transactions if you know that none 901 of the files are on the destination. 902 903 This is a specialized flag which should be ignored by most users! 904 905 ### --no-gzip-encoding ### 906 907 Don't set `Accept-Encoding: gzip`. This means that rclone won't ask 908 the server for compressed files automatically. Useful if you've set 909 the server to return files with `Content-Encoding: gzip` but you 910 uploaded compressed files. 911 912 There is no need to set this in normal operation, and doing so will 913 decrease the network transfer efficiency of rclone. 914 915 ### --no-traverse ### 916 917 The `--no-traverse` flag controls whether the destination file system 918 is traversed when using the `copy` or `move` commands. 919 `--no-traverse` is not compatible with `sync` and will be ignored if 920 you supply it with `sync`. 921 922 If you are only copying a small number of files (or are filtering most 923 of the files) and/or have a large number of files on the destination 924 then `--no-traverse` will stop rclone listing the destination and save 925 time. 926 927 However, if you are copying a large number of files, especially if you 928 are doing a copy where lots of the files under consideration haven't 929 changed and won't need copying then you shouldn't use `--no-traverse`. 930 931 See [rclone copy](/commands/rclone_copy/) for an example of how to use it. 932 933 ### --no-unicode-normalization ### 934 935 Don't normalize unicode characters in filenames during the sync routine. 936 937 Sometimes, an operating system will store filenames containing unicode 938 parts in their decomposed form (particularly macOS). Some cloud storage 939 systems will then recompose the unicode, resulting in duplicate files if 940 the data is ever copied back to a local filesystem. 941 942 Using this flag will disable that functionality, treating each unicode 943 character as unique. For example, by default é and é will be normalized 944 into the same character. With `--no-unicode-normalization` they will be 945 treated as unique characters. 946 947 ### --no-update-modtime ### 948 949 When using this flag, rclone won't update modification times of remote 950 files if they are incorrect as it would normally. 951 952 This can be used if the remote is being synced with another tool also 953 (eg the Google Drive client). 954 955 ### --order-by string ### 956 957 The `--order-by` flag controls the order in which files in the backlog 958 are processed in `rclone sync`, `rclone copy` and `rclone move`. 959 960 The order by string is constructed like this. The first part 961 describes what aspect is being measured: 962 963 - `size` - order by the size of the files 964 - `name` - order by the full path of the files 965 - `modtime` - order by the modification date of the files 966 967 This can have a modifier appended with a comma: 968 969 - `ascending` or `asc` - order so that the smallest (or oldest) is processed first 970 - `descending` or `desc` - order so that the largest (or newest) is processed first 971 - `mixed` - order so that the smallest is processed first for some threads and the largest for others 972 973 If the modifier is `mixed` then it can have an optional percentage 974 (which defaults to `50`), eg `size,mixed,25` which means that 25% of 975 the threads should be taking the smallest items and 75% the 976 largest. The threads which take the smallest first will always take 977 the smallest first and likewise the largest first threads. The `mixed` 978 mode can be useful to minimise the transfer time when you are 979 transferring a mixture of large and small files - the large files are 980 guaranteed upload threads and bandwidth and the small files will be 981 processed continuously. 982 983 If no modifier is supplied then the order is `ascending`. 984 985 For example 986 987 - `--order-by size,desc` - send the largest files first 988 - `--order-by modtime,ascending` - send the oldest files first 989 - `--order-by name` - send the files with alphabetically by path first 990 991 If the `--order-by` flag is not supplied or it is supplied with an 992 empty string then the default ordering will be used which is as 993 scanned. With `--checkers 1` this is mostly alphabetical, however 994 with the default `--checkers 8` it is somewhat random. 995 996 #### Limitations 997 998 The `--order-by` flag does not do a separate pass over the data. This 999 means that it may transfer some files out of the order specified if 1000 1001 - there are no files in the backlog or the source has not been fully scanned yet 1002 - there are more than [--max-backlog](#max-backlog-n) files in the backlog 1003 1004 Rclone will do its best to transfer the best file it has so in 1005 practice this should not cause a problem. Think of `--order-by` as 1006 being more of a best efforts flag rather than a perfect ordering. 1007 1008 ### --password-command SpaceSepList ### 1009 1010 This flag supplies a program which should supply the config password 1011 when run. This is an alternative to rclone prompting for the password 1012 or setting the `RCLONE_CONFIG_PASS` variable. 1013 1014 The argument to this should be a command with a space separated list 1015 of arguments. If one of the arguments has a space in then enclose it 1016 in `"`, if you want a literal `"` in an argument then enclose the 1017 argument in `"` and double the `"`. See [CSV encoding](https://godoc.org/encoding/csv) 1018 for more info. 1019 1020 Eg 1021 1022 --password-command echo hello 1023 --password-command echo "hello with space" 1024 --password-command echo "hello with ""quotes"" and space" 1025 1026 See the [Configuration Encryption](#configuration-encryption) for more info. 1027 1028 See a [Windows PowerShell example on the Wiki](https://github.com/rclone/rclone/wiki/Windows-Powershell-use-rclone-password-command-for-Config-file-password). 1029 1030 ### -P, --progress ### 1031 1032 This flag makes rclone update the stats in a static block in the 1033 terminal providing a realtime overview of the transfer. 1034 1035 Any log messages will scroll above the static block. Log messages 1036 will push the static block down to the bottom of the terminal where it 1037 will stay. 1038 1039 Normally this is updated every 500mS but this period can be overridden 1040 with the `--stats` flag. 1041 1042 This can be used with the `--stats-one-line` flag for a simpler 1043 display. 1044 1045 Note: On Windows until [this bug](https://github.com/Azure/go-ansiterm/issues/26) 1046 is fixed all non-ASCII characters will be replaced with `.` when 1047 `--progress` is in use. 1048 1049 ### -q, --quiet ### 1050 1051 This flag will limit rclone's output to error messages only. 1052 1053 ### --retries int ### 1054 1055 Retry the entire sync if it fails this many times it fails (default 3). 1056 1057 Some remotes can be unreliable and a few retries help pick up the 1058 files which didn't get transferred because of errors. 1059 1060 Disable retries with `--retries 1`. 1061 1062 ### --retries-sleep=TIME ### 1063 1064 This sets the interval between each retry specified by `--retries` 1065 1066 The default is `0`. Use `0` to disable. 1067 1068 ### --size-only ### 1069 1070 Normally rclone will look at modification time and size of files to 1071 see if they are equal. If you set this flag then rclone will check 1072 only the size. 1073 1074 This can be useful transferring files from Dropbox which have been 1075 modified by the desktop sync client which doesn't set checksums of 1076 modification times in the same way as rclone. 1077 1078 ### --stats=TIME ### 1079 1080 Commands which transfer data (`sync`, `copy`, `copyto`, `move`, 1081 `moveto`) will print data transfer stats at regular intervals to show 1082 their progress. 1083 1084 This sets the interval. 1085 1086 The default is `1m`. Use `0` to disable. 1087 1088 If you set the stats interval then all commands can show stats. This 1089 can be useful when running other commands, `check` or `mount` for 1090 example. 1091 1092 Stats are logged at `INFO` level by default which means they won't 1093 show at default log level `NOTICE`. Use `--stats-log-level NOTICE` or 1094 `-v` to make them show. See the [Logging section](#logging) for more 1095 info on log levels. 1096 1097 Note that on macOS you can send a SIGINFO (which is normally ctrl-T in 1098 the terminal) to make the stats print immediately. 1099 1100 ### --stats-file-name-length integer ### 1101 By default, the `--stats` output will truncate file names and paths longer 1102 than 40 characters. This is equivalent to providing 1103 `--stats-file-name-length 40`. Use `--stats-file-name-length 0` to disable 1104 any truncation of file names printed by stats. 1105 1106 ### --stats-log-level string ### 1107 1108 Log level to show `--stats` output at. This can be `DEBUG`, `INFO`, 1109 `NOTICE`, or `ERROR`. The default is `INFO`. This means at the 1110 default level of logging which is `NOTICE` the stats won't show - if 1111 you want them to then use `--stats-log-level NOTICE`. See the [Logging 1112 section](#logging) for more info on log levels. 1113 1114 ### --stats-one-line ### 1115 1116 When this is specified, rclone condenses the stats into a single line 1117 showing the most important stats only. 1118 1119 ### --stats-one-line-date ### 1120 1121 When this is specified, rclone enables the single-line stats and prepends 1122 the display with a date string. The default is `2006/01/02 15:04:05 - ` 1123 1124 ### --stats-one-line-date-format ### 1125 1126 When this is specified, rclone enables the single-line stats and prepends 1127 the display with a user-supplied date string. The date string MUST be 1128 enclosed in quotes. Follow [golang specs](https://golang.org/pkg/time/#Time.Format) for 1129 date formatting syntax. 1130 1131 ### --stats-unit=bits|bytes ### 1132 1133 By default, data transfer rates will be printed in bytes/second. 1134 1135 This option allows the data rate to be printed in bits/second. 1136 1137 Data transfer volume will still be reported in bytes. 1138 1139 The rate is reported as a binary unit, not SI unit. So 1 Mbit/s 1140 equals 1,048,576 bits/s and not 1,000,000 bits/s. 1141 1142 The default is `bytes`. 1143 1144 ### --suffix=SUFFIX ### 1145 1146 When using `sync`, `copy` or `move` any files which would have been 1147 overwritten or deleted will have the suffix added to them. If there 1148 is a file with the same path (after the suffix has been added), then 1149 it will be overwritten. 1150 1151 The remote in use must support server side move or copy and you must 1152 use the same remote as the destination of the sync. 1153 1154 This is for use with files to add the suffix in the current directory 1155 or with `--backup-dir`. See `--backup-dir` for more info. 1156 1157 For example 1158 1159 rclone sync /path/to/local/file remote:current --suffix .bak 1160 1161 will sync `/path/to/local` to `remote:current`, but for any files 1162 which would have been updated or deleted have .bak added. 1163 1164 ### --suffix-keep-extension ### 1165 1166 When using `--suffix`, setting this causes rclone put the SUFFIX 1167 before the extension of the files that it backs up rather than after. 1168 1169 So let's say we had `--suffix -2019-01-01`, without the flag `file.txt` 1170 would be backed up to `file.txt-2019-01-01` and with the flag it would 1171 be backed up to `file-2019-01-01.txt`. This can be helpful to make 1172 sure the suffixed files can still be opened. 1173 1174 ### --syslog ### 1175 1176 On capable OSes (not Windows or Plan9) send all log output to syslog. 1177 1178 This can be useful for running rclone in a script or `rclone mount`. 1179 1180 ### --syslog-facility string ### 1181 1182 If using `--syslog` this sets the syslog facility (eg `KERN`, `USER`). 1183 See `man syslog` for a list of possible facilities. The default 1184 facility is `DAEMON`. 1185 1186 ### --tpslimit float ### 1187 1188 Limit HTTP transactions per second to this. Default is 0 which is used 1189 to mean unlimited transactions per second. 1190 1191 For example to limit rclone to 10 HTTP transactions per second use 1192 `--tpslimit 10`, or to 1 transaction every 2 seconds use `--tpslimit 1193 0.5`. 1194 1195 Use this when the number of transactions per second from rclone is 1196 causing a problem with the cloud storage provider (eg getting you 1197 banned or rate limited). 1198 1199 This can be very useful for `rclone mount` to control the behaviour of 1200 applications using it. 1201 1202 See also `--tpslimit-burst`. 1203 1204 ### --tpslimit-burst int ### 1205 1206 Max burst of transactions for `--tpslimit` (default `1`). 1207 1208 Normally `--tpslimit` will do exactly the number of transaction per 1209 second specified. However if you supply `--tps-burst` then rclone can 1210 save up some transactions from when it was idle giving a burst of up 1211 to the parameter supplied. 1212 1213 For example if you provide `--tpslimit-burst 10` then if rclone has 1214 been idle for more than 10*`--tpslimit` then it can do 10 transactions 1215 very quickly before they are limited again. 1216 1217 This may be used to increase performance of `--tpslimit` without 1218 changing the long term average number of transactions per second. 1219 1220 ### --track-renames ### 1221 1222 By default, rclone doesn't keep track of renamed files, so if you 1223 rename a file locally then sync it to a remote, rclone will delete the 1224 old file on the remote and upload a new copy. 1225 1226 If you use this flag, and the remote supports server side copy or 1227 server side move, and the source and destination have a compatible 1228 hash, then this will track renames during `sync` 1229 operations and perform renaming server-side. 1230 1231 Files will be matched by size and hash - if both match then a rename 1232 will be considered. 1233 1234 If the destination does not support server-side copy or move, rclone 1235 will fall back to the default behaviour and log an error level message 1236 to the console. Note: Encrypted destinations are not supported 1237 by `--track-renames`. 1238 1239 Note that `--track-renames` is incompatible with `--no-traverse` and 1240 that it uses extra memory to keep track of all the rename candidates. 1241 1242 Note also that `--track-renames` is incompatible with 1243 `--delete-before` and will select `--delete-after` instead of 1244 `--delete-during`. 1245 1246 ### --track-renames-strategy (hash,modtime) ### 1247 1248 This option changes the matching criteria for `--track-renames` to match 1249 by any combination of modtime, hash, size. Matching by size is always enabled 1250 no matter what option is selected here. This also means 1251 that it enables `--track-renames` support for encrypted destinations. 1252 If nothing is specified, the default option is matching by hashes. 1253 1254 ### --delete-(before,during,after) ### 1255 1256 This option allows you to specify when files on your destination are 1257 deleted when you sync folders. 1258 1259 Specifying the value `--delete-before` will delete all files present 1260 on the destination, but not on the source *before* starting the 1261 transfer of any new or updated files. This uses two passes through the 1262 file systems, one for the deletions and one for the copies. 1263 1264 Specifying `--delete-during` will delete files while checking and 1265 uploading files. This is the fastest option and uses the least memory. 1266 1267 Specifying `--delete-after` (the default value) will delay deletion of 1268 files until all new/updated files have been successfully transferred. 1269 The files to be deleted are collected in the copy pass then deleted 1270 after the copy pass has completed successfully. The files to be 1271 deleted are held in memory so this mode may use more memory. This is 1272 the safest mode as it will only delete files if there have been no 1273 errors subsequent to that. If there have been errors before the 1274 deletions start then you will get the message `not deleting files as 1275 there were IO errors`. 1276 1277 ### --fast-list ### 1278 1279 When doing anything which involves a directory listing (eg `sync`, 1280 `copy`, `ls` - in fact nearly every command), rclone normally lists a 1281 directory and processes it before using more directory lists to 1282 process any subdirectories. This can be parallelised and works very 1283 quickly using the least amount of memory. 1284 1285 However, some remotes have a way of listing all files beneath a 1286 directory in one (or a small number) of transactions. These tend to 1287 be the bucket based remotes (eg S3, B2, GCS, Swift, Hubic). 1288 1289 If you use the `--fast-list` flag then rclone will use this method for 1290 listing directories. This will have the following consequences for 1291 the listing: 1292 1293 * It **will** use fewer transactions (important if you pay for them) 1294 * It **will** use more memory. Rclone has to load the whole listing into memory. 1295 * It *may* be faster because it uses fewer transactions 1296 * It *may* be slower because it can't be parallelized 1297 1298 rclone should always give identical results with and without 1299 `--fast-list`. 1300 1301 If you pay for transactions and can fit your entire sync listing into 1302 memory then `--fast-list` is recommended. If you have a very big sync 1303 to do then don't use `--fast-list` otherwise you will run out of 1304 memory. 1305 1306 If you use `--fast-list` on a remote which doesn't support it, then 1307 rclone will just ignore it. 1308 1309 ### --timeout=TIME ### 1310 1311 This sets the IO idle timeout. If a transfer has started but then 1312 becomes idle for this long it is considered broken and disconnected. 1313 1314 The default is `5m`. Set to `0` to disable. 1315 1316 ### --transfers=N ### 1317 1318 The number of file transfers to run in parallel. It can sometimes be 1319 useful to set this to a smaller number if the remote is giving a lot 1320 of timeouts or bigger if you have lots of bandwidth and a fast remote. 1321 1322 The default is to run 4 file transfers in parallel. 1323 1324 ### -u, --update ### 1325 1326 This forces rclone to skip any files which exist on the destination 1327 and have a modified time that is newer than the source file. 1328 1329 This can be useful when transferring to a remote which doesn't support 1330 mod times directly (or when using `--use-server-modtime` to avoid extra 1331 API calls) as it is more accurate than a `--size-only` check and faster 1332 than using `--checksum`. 1333 1334 If an existing destination file has a modification time equal (within 1335 the computed modify window precision) to the source file's, it will be 1336 updated if the sizes are different. If `--checksum` is set then 1337 rclone will update the destination if the checksums differ too. 1338 1339 If an existing destination file is older than the source file then 1340 it will be updated if the size or checksum differs from the source file. 1341 1342 On remotes which don't support mod time directly (or when using 1343 `--use-server-modtime`) the time checked will be the uploaded time. 1344 This means that if uploading to one of these remotes, rclone will skip 1345 any files which exist on the destination and have an uploaded time that 1346 is newer than the modification time of the source file. 1347 1348 ### --use-mmap ### 1349 1350 If this flag is set then rclone will use anonymous memory allocated by 1351 mmap on Unix based platforms and VirtualAlloc on Windows for its 1352 transfer buffers (size controlled by `--buffer-size`). Memory 1353 allocated like this does not go on the Go heap and can be returned to 1354 the OS immediately when it is finished with. 1355 1356 If this flag is not set then rclone will allocate and free the buffers 1357 using the Go memory allocator which may use more memory as memory 1358 pages are returned less aggressively to the OS. 1359 1360 It is possible this does not work well on all platforms so it is 1361 disabled by default; in the future it may be enabled by default. 1362 1363 ### --use-server-modtime ### 1364 1365 Some object-store backends (e.g, Swift, S3) do not preserve file modification 1366 times (modtime). On these backends, rclone stores the original modtime as 1367 additional metadata on the object. By default it will make an API call to 1368 retrieve the metadata when the modtime is needed by an operation. 1369 1370 Use this flag to disable the extra API call and rely instead on the server's 1371 modified time. In cases such as a local to remote sync using `--update`, 1372 knowing the local file is newer than the time it was last uploaded to the 1373 remote is sufficient. In those cases, this flag can speed up the process and 1374 reduce the number of API calls necessary. 1375 1376 Using this flag on a sync operation without also using `--update` would cause 1377 all files modified at any time other than the last upload time to be uploaded 1378 again, which is probably not what you want. 1379 1380 ### -v, -vv, --verbose ### 1381 1382 With `-v` rclone will tell you about each file that is transferred and 1383 a small number of significant events. 1384 1385 With `-vv` rclone will become very verbose telling you about every 1386 file it considers and transfers. Please send bug reports with a log 1387 with this setting. 1388 1389 ### -V, --version ### 1390 1391 Prints the version number 1392 1393 SSL/TLS options 1394 --------------- 1395 1396 The outgoing SSL/TLS connections rclone makes can be controlled with 1397 these options. For example this can be very useful with the HTTP or 1398 WebDAV backends. Rclone HTTP servers have their own set of 1399 configuration for SSL/TLS which you can find in their documentation. 1400 1401 ### --ca-cert string 1402 1403 This loads the PEM encoded certificate authority certificate and uses 1404 it to verify the certificates of the servers rclone connects to. 1405 1406 If you have generated certificates signed with a local CA then you 1407 will need this flag to connect to servers using those certificates. 1408 1409 ### --client-cert string 1410 1411 This loads the PEM encoded client side certificate. 1412 1413 This is used for [mutual TLS authentication](https://en.wikipedia.org/wiki/Mutual_authentication). 1414 1415 The `--client-key` flag is required too when using this. 1416 1417 ### --client-key string 1418 1419 This loads the PEM encoded client side private key used for mutual TLS 1420 authentication. Used in conjunction with `--client-cert`. 1421 1422 ### --no-check-certificate=true/false ### 1423 1424 `--no-check-certificate` controls whether a client verifies the 1425 server's certificate chain and host name. 1426 If `--no-check-certificate` is true, TLS accepts any certificate 1427 presented by the server and any host name in that certificate. 1428 In this mode, TLS is susceptible to man-in-the-middle attacks. 1429 1430 This option defaults to `false`. 1431 1432 **This should be used only for testing.** 1433 1434 Configuration Encryption 1435 ------------------------ 1436 Your configuration file contains information for logging in to 1437 your cloud services. This means that you should keep your 1438 `.rclone.conf` file in a secure location. 1439 1440 If you are in an environment where that isn't possible, you can 1441 add a password to your configuration. This means that you will 1442 have to supply the password every time you start rclone. 1443 1444 To add a password to your rclone configuration, execute `rclone config`. 1445 1446 ``` 1447 >rclone config 1448 Current remotes: 1449 1450 e) Edit existing remote 1451 n) New remote 1452 d) Delete remote 1453 s) Set configuration password 1454 q) Quit config 1455 e/n/d/s/q> 1456 ``` 1457 1458 Go into `s`, Set configuration password: 1459 ``` 1460 e/n/d/s/q> s 1461 Your configuration is not encrypted. 1462 If you add a password, you will protect your login information to cloud services. 1463 a) Add Password 1464 q) Quit to main menu 1465 a/q> a 1466 Enter NEW configuration password: 1467 password: 1468 Confirm NEW password: 1469 password: 1470 Password set 1471 Your configuration is encrypted. 1472 c) Change Password 1473 u) Unencrypt configuration 1474 q) Quit to main menu 1475 c/u/q> 1476 ``` 1477 1478 Your configuration is now encrypted, and every time you start rclone 1479 you will have to supply the password. See below for details. 1480 In the same menu, you can change the password or completely remove 1481 encryption from your configuration. 1482 1483 There is no way to recover the configuration if you lose your password. 1484 1485 rclone uses [nacl secretbox](https://godoc.org/golang.org/x/crypto/nacl/secretbox) 1486 which in turn uses XSalsa20 and Poly1305 to encrypt and authenticate 1487 your configuration with secret-key cryptography. 1488 The password is SHA-256 hashed, which produces the key for secretbox. 1489 The hashed password is not stored. 1490 1491 While this provides very good security, we do not recommend storing 1492 your encrypted rclone configuration in public if it contains sensitive 1493 information, maybe except if you use a very strong password. 1494 1495 If it is safe in your environment, you can set the `RCLONE_CONFIG_PASS` 1496 environment variable to contain your password, in which case it will be 1497 used for decrypting the configuration. 1498 1499 You can set this for a session from a script. For unix like systems 1500 save this to a file called `set-rclone-password`: 1501 1502 ``` 1503 #!/bin/echo Source this file don't run it 1504 1505 read -s RCLONE_CONFIG_PASS 1506 export RCLONE_CONFIG_PASS 1507 ``` 1508 1509 Then source the file when you want to use it. From the shell you 1510 would do `source set-rclone-password`. It will then ask you for the 1511 password and set it in the environment variable. 1512 1513 An alternate means of supplying the password is to provide a script 1514 which will retrieve the password and print on standard output. This 1515 script should have a fully specified path name and not rely on any 1516 environment variables. The script is supplied either via 1517 `--password-command="..."` command line argument or via the 1518 `RCLONE_PASSWORD_COMMAND` environment variable. 1519 1520 One useful example of this is using the `passwordstore` application 1521 to retrieve the password: 1522 1523 ``` 1524 export RCLONE_PASSWORD_COMMAND="pass rclone/config" 1525 ``` 1526 1527 If the `passwordstore` password manager holds the password for the 1528 rclone configuration, using the script method means the password 1529 is primarily protected by the `passwordstore` system, and is never 1530 embedded in the clear in scripts, nor available for examination 1531 using the standard commands available. It is quite possible with 1532 long running rclone sessions for copies of passwords to be innocently 1533 captured in log files or terminal scroll buffers, etc. Using the 1534 script method of supplying the password enhances the security of 1535 the config password considerably. 1536 1537 If you are running rclone inside a script, unless you are using the 1538 `--password-command` method, you might want to disable 1539 password prompts. To do that, pass the parameter 1540 `--ask-password=false` to rclone. This will make rclone fail instead 1541 of asking for a password if `RCLONE_CONFIG_PASS` doesn't contain 1542 a valid password, and `--password-command` has not been supplied. 1543 1544 1545 Developer options 1546 ----------------- 1547 1548 These options are useful when developing or debugging rclone. There 1549 are also some more remote specific options which aren't documented 1550 here which are used for testing. These start with remote name eg 1551 `--drive-test-option` - see the docs for the remote in question. 1552 1553 ### --cpuprofile=FILE ### 1554 1555 Write CPU profile to file. This can be analysed with `go tool pprof`. 1556 1557 #### --dump flag,flag,flag #### 1558 1559 The `--dump` flag takes a comma separated list of flags to dump info 1560 about. 1561 1562 Note that some headers including `Accept-Encoding` as shown may not 1563 be correct in the request and the response may not show `Content-Encoding` 1564 if the go standard libraries auto gzip encoding was in effect. In this case 1565 the body of the request will be gunzipped before showing it. 1566 1567 The available flags are: 1568 1569 #### --dump headers #### 1570 1571 Dump HTTP headers with `Authorization:` lines removed. May still 1572 contain sensitive info. Can be very verbose. Useful for debugging 1573 only. 1574 1575 Use `--dump auth` if you do want the `Authorization:` headers. 1576 1577 #### --dump bodies #### 1578 1579 Dump HTTP headers and bodies - may contain sensitive info. Can be 1580 very verbose. Useful for debugging only. 1581 1582 Note that the bodies are buffered in memory so don't use this for 1583 enormous files. 1584 1585 #### --dump requests #### 1586 1587 Like `--dump bodies` but dumps the request bodies and the response 1588 headers. Useful for debugging download problems. 1589 1590 #### --dump responses #### 1591 1592 Like `--dump bodies` but dumps the response bodies and the request 1593 headers. Useful for debugging upload problems. 1594 1595 #### --dump auth #### 1596 1597 Dump HTTP headers - will contain sensitive info such as 1598 `Authorization:` headers - use `--dump headers` to dump without 1599 `Authorization:` headers. Can be very verbose. Useful for debugging 1600 only. 1601 1602 #### --dump filters #### 1603 1604 Dump the filters to the output. Useful to see exactly what include 1605 and exclude options are filtering on. 1606 1607 #### --dump goroutines #### 1608 1609 This dumps a list of the running go-routines at the end of the command 1610 to standard output. 1611 1612 #### --dump openfiles #### 1613 1614 This dumps a list of the open files at the end of the command. It 1615 uses the `lsof` command to do that so you'll need that installed to 1616 use it. 1617 1618 ### --memprofile=FILE ### 1619 1620 Write memory profile to file. This can be analysed with `go tool pprof`. 1621 1622 Filtering 1623 --------- 1624 1625 For the filtering options 1626 1627 * `--delete-excluded` 1628 * `--filter` 1629 * `--filter-from` 1630 * `--exclude` 1631 * `--exclude-from` 1632 * `--include` 1633 * `--include-from` 1634 * `--files-from` 1635 * `--files-from-raw` 1636 * `--min-size` 1637 * `--max-size` 1638 * `--min-age` 1639 * `--max-age` 1640 * `--dump filters` 1641 1642 See the [filtering section](/filtering/). 1643 1644 Remote control 1645 -------------- 1646 1647 For the remote control options and for instructions on how to remote control rclone 1648 1649 * `--rc` 1650 * and anything starting with `--rc-` 1651 1652 See [the remote control section](/rc/). 1653 1654 Logging 1655 ------- 1656 1657 rclone has 4 levels of logging, `ERROR`, `NOTICE`, `INFO` and `DEBUG`. 1658 1659 By default, rclone logs to standard error. This means you can redirect 1660 standard error and still see the normal output of rclone commands (eg 1661 `rclone ls`). 1662 1663 By default, rclone will produce `Error` and `Notice` level messages. 1664 1665 If you use the `-q` flag, rclone will only produce `Error` messages. 1666 1667 If you use the `-v` flag, rclone will produce `Error`, `Notice` and 1668 `Info` messages. 1669 1670 If you use the `-vv` flag, rclone will produce `Error`, `Notice`, 1671 `Info` and `Debug` messages. 1672 1673 You can also control the log levels with the `--log-level` flag. 1674 1675 If you use the `--log-file=FILE` option, rclone will redirect `Error`, 1676 `Info` and `Debug` messages along with standard error to FILE. 1677 1678 If you use the `--syslog` flag then rclone will log to syslog and the 1679 `--syslog-facility` control which facility it uses. 1680 1681 Rclone prefixes all log messages with their level in capitals, eg INFO 1682 which makes it easy to grep the log file for different kinds of 1683 information. 1684 1685 Exit Code 1686 --------- 1687 1688 If any errors occur during the command execution, rclone will exit with a 1689 non-zero exit code. This allows scripts to detect when rclone 1690 operations have failed. 1691 1692 During the startup phase, rclone will exit immediately if an error is 1693 detected in the configuration. There will always be a log message 1694 immediately before exiting. 1695 1696 When rclone is running it will accumulate errors as it goes along, and 1697 only exit with a non-zero exit code if (after retries) there were 1698 still failed transfers. For every error counted there will be a high 1699 priority log message (visible with `-q`) showing the message and 1700 which file caused the problem. A high priority message is also shown 1701 when starting a retry so the user can see that any previous error 1702 messages may not be valid after the retry. If rclone has done a retry 1703 it will log a high priority message if the retry was successful. 1704 1705 ### List of exit codes ### 1706 * `0` - success 1707 * `1` - Syntax or usage error 1708 * `2` - Error not otherwise categorised 1709 * `3` - Directory not found 1710 * `4` - File not found 1711 * `5` - Temporary error (one that more retries might fix) (Retry errors) 1712 * `6` - Less serious errors (like 461 errors from dropbox) (NoRetry errors) 1713 * `7` - Fatal error (one that more retries won't fix, like account suspended) (Fatal errors) 1714 * `8` - Transfer exceeded - limit set by --max-transfer reached 1715 * `9` - Operation successful, but no files transferred 1716 1717 Environment Variables 1718 --------------------- 1719 1720 Rclone can be configured entirely using environment variables. These 1721 can be used to set defaults for options or config file entries. 1722 1723 ### Options ### 1724 1725 Every option in rclone can have its default set by environment 1726 variable. 1727 1728 To find the name of the environment variable, first, take the long 1729 option name, strip the leading `--`, change `-` to `_`, make 1730 upper case and prepend `RCLONE_`. 1731 1732 For example, to always set `--stats 5s`, set the environment variable 1733 `RCLONE_STATS=5s`. If you set stats on the command line this will 1734 override the environment variable setting. 1735 1736 Or to always use the trash in drive `--drive-use-trash`, set 1737 `RCLONE_DRIVE_USE_TRASH=true`. 1738 1739 The same parser is used for the options and the environment variables 1740 so they take exactly the same form. 1741 1742 ### Config file ### 1743 1744 You can set defaults for values in the config file on an individual 1745 remote basis. If you want to use this feature, you will need to 1746 discover the name of the config items that you want. The easiest way 1747 is to run through `rclone config` by hand, then look in the config 1748 file to see what the values are (the config file can be found by 1749 looking at the help for `--config` in `rclone help`). 1750 1751 To find the name of the environment variable, you need to set, take 1752 `RCLONE_CONFIG_` + name of remote + `_` + name of config file option 1753 and make it all uppercase. 1754 1755 For example, to configure an S3 remote named `mys3:` without a config 1756 file (using unix ways of setting environment variables): 1757 1758 ``` 1759 $ export RCLONE_CONFIG_MYS3_TYPE=s3 1760 $ export RCLONE_CONFIG_MYS3_ACCESS_KEY_ID=XXX 1761 $ export RCLONE_CONFIG_MYS3_SECRET_ACCESS_KEY=XXX 1762 $ rclone lsd MYS3: 1763 -1 2016-09-21 12:54:21 -1 my-bucket 1764 $ rclone listremotes | grep mys3 1765 mys3: 1766 ``` 1767 1768 Note that if you want to create a remote using environment variables 1769 you must create the `..._TYPE` variable as above. 1770 1771 ### Other environment variables ### 1772 1773 * `RCLONE_CONFIG_PASS` set to contain your config file password (see [Configuration Encryption](#configuration-encryption) section) 1774 * `HTTP_PROXY`, `HTTPS_PROXY` and `NO_PROXY` (or the lowercase versions thereof). 1775 * `HTTPS_PROXY` takes precedence over `HTTP_PROXY` for https requests. 1776 * The environment values may be either a complete URL or a "host[:port]" for, in which case the "http" scheme is assumed.