forked from rclone/rclone
-
Notifications
You must be signed in to change notification settings - Fork 0
/
rclone.1
4504 lines (4500 loc) · 119 KB
/
rclone.1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
.\"t
.TH "rclone" "1" "Apr 18, 2016" "User Manual" ""
.SH Rclone
.PP
[IMAGE: Logo (http://rclone.org/img/rclone-120x120.png)] (http://rclone.org/)
.PP
Rclone is a command line program to sync files and directories to and
from
.IP \[bu] 2
Google Drive
.IP \[bu] 2
Amazon S3
.IP \[bu] 2
Openstack Swift / Rackspace cloud files / Memset Memstore
.IP \[bu] 2
Dropbox
.IP \[bu] 2
Google Cloud Storage
.IP \[bu] 2
Amazon Cloud Drive
.IP \[bu] 2
Microsoft One Drive
.IP \[bu] 2
Hubic
.IP \[bu] 2
Backblaze B2
.IP \[bu] 2
Yandex Disk
.IP \[bu] 2
The local filesystem
.PP
Features
.IP \[bu] 2
MD5/SHA1 hashes checked at all times for file integrity
.IP \[bu] 2
Timestamps preserved on files
.IP \[bu] 2
Partial syncs supported on a whole file basis
.IP \[bu] 2
Copy mode to just copy new/changed files
.IP \[bu] 2
Sync (one way) mode to make a directory identical
.IP \[bu] 2
Check mode to check for file hash equality
.IP \[bu] 2
Can sync to and from network, eg two different cloud accounts
.PP
Links
.IP \[bu] 2
Home page (http://rclone.org/)
.IP \[bu] 2
Github project page for source and bug
tracker (http://github.com/ncw/rclone)
.IP \[bu] 2
Google+ page
.RS 2
.RE
.IP \[bu] 2
Downloads (http://rclone.org/downloads/)
.SS Install
.PP
Rclone is a Go program and comes as a single binary file.
.PP
Download (http://rclone.org/downloads/) the relevant binary.
.PP
Or alternatively if you have Go 1.5+ installed use
.IP
.nf
\f[C]
go\ get\ github.com/ncw/rclone
\f[]
.fi
.PP
and this will build the binary in \f[C]$GOPATH/bin\f[].
If you have built rclone before then you will want to update its
dependencies first with this
.IP
.nf
\f[C]
go\ get\ \-u\ \-v\ github.com/ncw/rclone/...
\f[]
.fi
.PP
See the Usage section (http://rclone.org/docs/) of the docs for how to
use rclone, or run \f[C]rclone\ \-h\f[].
.SS linux binary downloaded files install example
.IP
.nf
\f[C]
unzip\ rclone\-v1.17\-linux\-amd64.zip
cd\ rclone\-v1.17\-linux\-amd64
#copy\ binary\ file
sudo\ cp\ rclone\ /usr/sbin/
sudo\ chown\ root:root\ /usr/sbin/rclone
sudo\ chmod\ 755\ /usr/sbin/rclone
#install\ manpage
sudo\ mkdir\ \-p\ /usr/local/share/man/man1
sudo\ cp\ rclone.1\ /usr/local/share/man/man1/
sudo\ mandb
\f[]
.fi
.SS Configure
.PP
First you\[aq]ll need to configure rclone.
As the object storage systems have quite complicated authentication
these are kept in a config file \f[C]\&.rclone.conf\f[] in your home
directory by default.
(You can use the \f[C]\-\-config\f[] option to choose a different config
file.)
.PP
The easiest way to make the config is to run rclone with the config
option:
.IP
.nf
\f[C]
rclone\ config
\f[]
.fi
.PP
See the following for detailed instructions for
.IP \[bu] 2
Google drive (http://rclone.org/drive/)
.IP \[bu] 2
Amazon S3 (http://rclone.org/s3/)
.IP \[bu] 2
Swift / Rackspace Cloudfiles / Memset
Memstore (http://rclone.org/swift/)
.IP \[bu] 2
Dropbox (http://rclone.org/dropbox/)
.IP \[bu] 2
Google Cloud Storage (http://rclone.org/googlecloudstorage/)
.IP \[bu] 2
Local filesystem (http://rclone.org/local/)
.IP \[bu] 2
Amazon Cloud Drive (http://rclone.org/amazonclouddrive/)
.IP \[bu] 2
Backblaze B2 (http://rclone.org/b2/)
.IP \[bu] 2
Hubic (http://rclone.org/hubic/)
.IP \[bu] 2
Microsoft One Drive (http://rclone.org/onedrive/)
.IP \[bu] 2
Yandex Disk (http://rclone.org/yandex/)
.SS Usage
.PP
Rclone syncs a directory tree from one storage system to another.
.PP
Its syntax is like this
.IP
.nf
\f[C]
Syntax:\ [options]\ subcommand\ <parameters>\ <parameters...>
\f[]
.fi
.PP
Source and destination paths are specified by the name you gave the
storage system in the config file then the sub path, eg "drive:myfolder"
to look at "myfolder" in Google drive.
.PP
You can define as many storage paths as you like in the config file.
.SS Subcommands
.SS rclone copy source:path dest:path
.PP
Copy the source to the destination.
Doesn\[aq]t transfer unchanged files, testing by size and modification
time or MD5SUM.
Doesn\[aq]t delete files from the destination.
.PP
Note that it is always the contents of the directory that is synced, not
the directory so when source:path is a directory, it\[aq]s the contents
of source:path that are copied, not the directory name and contents.
.PP
If dest:path doesn\[aq]t exist, it is created and the source:path
contents go there.
.PP
For example
.IP
.nf
\f[C]
rclone\ copy\ source:sourcepath\ dest:destpath
\f[]
.fi
.PP
Let\[aq]s say there are two files in sourcepath
.IP
.nf
\f[C]
sourcepath/one.txt
sourcepath/two.txt
\f[]
.fi
.PP
This copies them to
.IP
.nf
\f[C]
destpath/one.txt
destpath/two.txt
\f[]
.fi
.PP
Not to
.IP
.nf
\f[C]
destpath/sourcepath/one.txt
destpath/sourcepath/two.txt
\f[]
.fi
.PP
If you are familiar with \f[C]rsync\f[], rclone always works as if you
had written a trailing / \- meaning "copy the contents of this
directory".
This applies to all commands and whether you are talking about the
source or destination.
.SS rclone sync source:path dest:path
.PP
Sync the source to the destination, changing the destination only.
Doesn\[aq]t transfer unchanged files, testing by size and modification
time or MD5SUM.
Destination is updated to match source, including deleting files if
necessary.
.PP
\f[B]Important\f[]: Since this can cause data loss, test first with the
\f[C]\-\-dry\-run\f[] flag to see exactly what would be copied and
deleted.
.PP
Note that files in the destination won\[aq]t be deleted if there were
any errors at any point.
.PP
It is always the contents of the directory that is synced, not the
directory so when source:path is a directory, it\[aq]s the contents of
source:path that are copied, not the directory name and contents.
See extended explanation in the \f[C]copy\f[] command above if unsure.
.PP
If dest:path doesn\[aq]t exist, it is created and the source:path
contents go there.
.SS move source:path dest:path
.PP
Moves the source to the destination.
.PP
If there are no filters in use this is equivalent to a copy followed by
a purge, but may using server side operations to speed it up if
possible.
.PP
If filters are in use then it is equivalent to a copy followed by
delete, followed by an rmdir (which only removes the directory if
empty).
The individual file moves will be moved with srver side operations if
possible.
.PP
\f[B]Important\f[]: Since this can cause data loss, test first with the
\-\-dry\-run flag.
.SS rclone ls remote:path
.PP
List all the objects in the the path with size and path.
.SS rclone lsd remote:path
.PP
List all directories/containers/buckets in the the path.
.SS rclone lsl remote:path
.PP
List all the objects in the the path with modification time, size and
path.
.SS rclone md5sum remote:path
.PP
Produces an md5sum file for all the objects in the path.
This is in the same format as the standard md5sum tool produces.
.SS rclone sha1sum remote:path
.PP
Produces an sha1sum file for all the objects in the path.
This is in the same format as the standard sha1sum tool produces.
.SS rclone size remote:path
.PP
Prints the total size of objects in remote:path and the number of
objects.
.SS rclone mkdir remote:path
.PP
Make the path if it doesn\[aq]t already exist
.SS rclone rmdir remote:path
.PP
Remove the path.
Note that you can\[aq]t remove a path with objects in it, use purge for
that.
.SS rclone purge remote:path
.PP
Remove the path and all of its contents.
Note that this does not obey include/exclude filters \- everything will
be removed.
Use \f[C]delete\f[] if you want to selectively delete files.
.SS rclone delete remote:path
.PP
Remove the contents of path.
Unlike \f[C]purge\f[] it obeys include/exclude filters so can be used to
selectively delete files.
.PP
Eg delete all files bigger than 100MBytes
.PP
Check what would be deleted first (use either)
.IP
.nf
\f[C]
rclone\ \-\-min\-size\ 100M\ lsl\ remote:path
rclone\ \-\-dry\-run\ \-\-min\-size\ 100M\ delete\ remote:path
\f[]
.fi
.PP
Then delete
.IP
.nf
\f[C]
rclone\ \-\-min\-size\ 100M\ delete\ remote:path
\f[]
.fi
.PP
That reads "delete everything with a minimum size of 100 MB", hence
delete all files bigger than 100MBytes.
.SS rclone check source:path dest:path
.PP
Checks the files in the source and destination match.
It compares sizes and MD5SUMs and prints a report of files which
don\[aq]t match.
It doesn\[aq]t alter the source or destination.
.PP
\f[C]\-\-size\-only\f[] may be used to only compare the sizes, not the
MD5SUMs.
.SS rclone dedupe remote:path
.PP
By default \f[C]dedup\f[] interactively finds duplicate files and offers
to delete all but one or rename them to be different.
Only useful with Google Drive which can have duplicate file names.
.PP
The \f[C]dedupe\f[] command will delete all but one of any identical
(same md5sum) files it finds without confirmation.
This means that for most duplicated files the \f[C]dedupe\f[] command
will not be interactive.
You can use \f[C]\-\-dry\-run\f[] to see what would happen without doing
anything.
.PP
Here is an example run.
.PP
Before \- with duplicates
.IP
.nf
\f[C]
$\ rclone\ lsl\ drive:dupes
\ \ 6048320\ 2016\-03\-05\ 16:23:16.798000000\ one.txt
\ \ 6048320\ 2016\-03\-05\ 16:23:11.775000000\ one.txt
\ \ \ 564374\ 2016\-03\-05\ 16:23:06.731000000\ one.txt
\ \ 6048320\ 2016\-03\-05\ 16:18:26.092000000\ one.txt
\ \ 6048320\ 2016\-03\-05\ 16:22:46.185000000\ two.txt
\ \ 1744073\ 2016\-03\-05\ 16:22:38.104000000\ two.txt
\ \ \ 564374\ 2016\-03\-05\ 16:22:52.118000000\ two.txt
\f[]
.fi
.PP
Now the \f[C]dedupe\f[] session
.IP
.nf
\f[C]
$\ rclone\ dedupe\ drive:dupes
2016/03/05\ 16:24:37\ Google\ drive\ root\ \[aq]dupes\[aq]:\ Looking\ for\ duplicates\ using\ interactive\ mode.
one.txt:\ Found\ 4\ duplicates\ \-\ deleting\ identical\ copies
one.txt:\ Deleting\ 2/3\ identical\ duplicates\ (md5sum\ "1eedaa9fe86fd4b8632e2ac549403b36")
one.txt:\ 2\ duplicates\ remain
\ \ 1:\ \ \ \ \ \ 6048320\ bytes,\ 2016\-03\-05\ 16:23:16.798000000,\ md5sum\ 1eedaa9fe86fd4b8632e2ac549403b36
\ \ 2:\ \ \ \ \ \ \ 564374\ bytes,\ 2016\-03\-05\ 16:23:06.731000000,\ md5sum\ 7594e7dc9fc28f727c42ee3e0749de81
s)\ Skip\ and\ do\ nothing
k)\ Keep\ just\ one\ (choose\ which\ in\ next\ step)
r)\ Rename\ all\ to\ be\ different\ (by\ changing\ file.jpg\ to\ file\-1.jpg)
s/k/r>\ k
Enter\ the\ number\ of\ the\ file\ to\ keep>\ 1
one.txt:\ Deleted\ 1\ extra\ copies
two.txt:\ Found\ 3\ duplicates\ \-\ deleting\ identical\ copies
two.txt:\ 3\ duplicates\ remain
\ \ 1:\ \ \ \ \ \ \ 564374\ bytes,\ 2016\-03\-05\ 16:22:52.118000000,\ md5sum\ 7594e7dc9fc28f727c42ee3e0749de81
\ \ 2:\ \ \ \ \ \ 6048320\ bytes,\ 2016\-03\-05\ 16:22:46.185000000,\ md5sum\ 1eedaa9fe86fd4b8632e2ac549403b36
\ \ 3:\ \ \ \ \ \ 1744073\ bytes,\ 2016\-03\-05\ 16:22:38.104000000,\ md5sum\ 851957f7fb6f0bc4ce76be966d336802
s)\ Skip\ and\ do\ nothing
k)\ Keep\ just\ one\ (choose\ which\ in\ next\ step)
r)\ Rename\ all\ to\ be\ different\ (by\ changing\ file.jpg\ to\ file\-1.jpg)
s/k/r>\ r
two\-1.txt:\ renamed\ from:\ two.txt
two\-2.txt:\ renamed\ from:\ two.txt
two\-3.txt:\ renamed\ from:\ two.txt
\f[]
.fi
.PP
The result being
.IP
.nf
\f[C]
$\ rclone\ lsl\ drive:dupes
\ \ 6048320\ 2016\-03\-05\ 16:23:16.798000000\ one.txt
\ \ \ 564374\ 2016\-03\-05\ 16:22:52.118000000\ two\-1.txt
\ \ 6048320\ 2016\-03\-05\ 16:22:46.185000000\ two\-2.txt
\ \ 1744073\ 2016\-03\-05\ 16:22:38.104000000\ two\-3.txt
\f[]
.fi
.PP
Dedupe can be run non interactively using the \f[C]\-\-dedupe\-mode\f[]
flag.
.IP \[bu] 2
\f[C]\-\-dedupe\-mode\ interactive\f[] \- interactive as above.
.IP \[bu] 2
\f[C]\-\-dedupe\-mode\ skip\f[] \- removes identical files then skips
anything left.
.IP \[bu] 2
\f[C]\-\-dedupe\-mode\ first\f[] \- removes identical files then keeps
the first one.
.IP \[bu] 2
\f[C]\-\-dedupe\-mode\ newest\f[] \- removes identical files then keeps
the newest one.
.IP \[bu] 2
\f[C]\-\-dedupe\-mode\ oldest\f[] \- removes identical files then keeps
the oldest one.
.IP \[bu] 2
\f[C]\-\-dedupe\-mode\ rename\f[] \- removes identical files then
renames the rest to be different.
.PP
For example to rename all the identically named photos in your Google
Photos directory, do
.IP
.nf
\f[C]
rclone\ dedupe\ \-\-dedupe\-mode\ rename\ "drive:Google\ Photos"
\f[]
.fi
.SS rclone config
.PP
Enter an interactive configuration session.
.SS rclone help
.PP
Prints help on rclone commands and options.
.SS Server Side Copy
.PP
Drive, S3, Dropbox, Swift and Google Cloud Storage support server side
copy.
.PP
This means if you want to copy one folder to another then rclone
won\[aq]t download all the files and re\-upload them; it will instruct
the server to copy them in place.
.PP
Eg
.IP
.nf
\f[C]
rclone\ copy\ s3:oldbucket\ s3:newbucket
\f[]
.fi
.PP
Will copy the contents of \f[C]oldbucket\f[] to \f[C]newbucket\f[]
without downloading and re\-uploading.
.PP
Remotes which don\[aq]t support server side copy (eg local)
\f[B]will\f[] download and re\-upload in this case.
.PP
Server side copies are used with \f[C]sync\f[] and \f[C]copy\f[] and
will be identified in the log when using the \f[C]\-v\f[] flag.
.PP
Server side copies will only be attempted if the remote names are the
same.
.PP
This can be used when scripting to make aged backups efficiently, eg
.IP
.nf
\f[C]
rclone\ sync\ remote:current\-backup\ remote:previous\-backup
rclone\ sync\ /path/to/files\ remote:current\-backup
\f[]
.fi
.SS Options
.PP
Rclone has a number of options to control its behaviour.
.PP
Options which use TIME use the go time parser.
A duration string is a possibly signed sequence of decimal numbers, each
with optional fraction and a unit suffix, such as "300ms", "\-1.5h" or
"2h45m".
Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h".
.PP
Options which use SIZE use kByte by default.
However a suffix of \f[C]k\f[] for kBytes, \f[C]M\f[] for MBytes and
\f[C]G\f[] for GBytes may be used.
These are the binary units, eg 2**10, 2**20, 2**30 respectively.
.SS \-\-bwlimit=SIZE
.PP
Bandwidth limit in kBytes/s, or use suffix k|M|G.
The default is \f[C]0\f[] which means to not limit bandwidth.
.PP
For example to limit bandwidth usage to 10 MBytes/s use
\f[C]\-\-bwlimit\ 10M\f[]
.PP
This only limits the bandwidth of the data transfer, it doesn\[aq]t
limit the bandwith of the directory listings etc.
.SS \-\-checkers=N
.PP
The number of checkers to run in parallel.
Checkers do the equality checking of files during a sync.
For some storage systems (eg s3, swift, dropbox) this can take a
significant amount of time so they are run in parallel.
.PP
The default is to run 8 checkers in parallel.
.SS \-c, \-\-checksum
.PP
Normally rclone will look at modification time and size of files to see
if they are equal.
If you set this flag then rclone will check the file hash and size to
determine if files are equal.
.PP
This is useful when the remote doesn\[aq]t support setting modified time
and a more accurate sync is desired than just checking the file size.
.PP
This is very useful when transferring between remotes which store the
same hash type on the object, eg Drive and Swift.
For details of which remotes support which hash type see the table in
the overview section (http://rclone.org/overview/).
.PP
Eg \f[C]rclone\ \-\-checksum\ sync\ s3:/bucket\ swift:/bucket\f[] would
run much quicker than without the \f[C]\-\-checksum\f[] flag.
.PP
When using this flag, rclone won\[aq]t update mtimes of remote files if
they are incorrect as it would normally.
.SS \-\-config=CONFIG_FILE
.PP
Specify the location of the rclone config file.
Normally this is in your home directory as a file called
\f[C]\&.rclone.conf\f[].
If you run \f[C]rclone\ \-h\f[] and look at the help for the
\f[C]\-\-config\f[] option you will see where the default location is
for you.
Use this flag to override the config location, eg
\f[C]rclone\ \-\-config=".myconfig"\ .config\f[].
.SS \-\-contimeout=TIME
.PP
Set the connection timeout.
This should be in go time format which looks like \f[C]5s\f[] for 5
seconds, \f[C]10m\f[] for 10 minutes, or \f[C]3h30m\f[].
.PP
The connection timeout is the amount of time rclone will wait for a
connection to go through to a remote object storage system.
It is \f[C]1m\f[] by default.
.SS \-\-dedupe\-mode MODE
.PP
Mode to run dedupe command in.
One of \f[C]interactive\f[], \f[C]skip\f[], \f[C]first\f[],
\f[C]newest\f[], \f[C]oldest\f[], \f[C]rename\f[].
The default is \f[C]interactive\f[].
See the dedupe command for more information as to what these options
mean.
.SS \-n, \-\-dry\-run
.PP
Do a trial run with no permanent changes.
Use this to see what rclone would do without actually doing it.
Useful when setting up the \f[C]sync\f[] command which deletes files in
the destination.
.SS \-\-ignore\-existing
.PP
Using this option will make rclone unconditionally skip all files that
exist on the destination, no matter the content of these files.
.PP
While this isn\[aq]t a generally recommended option, it can be useful in
cases where your files change due to encryption.
However, it cannot correct partial transfers in case a transfer was
interrupted.
.SS \-I, \-\-ignore\-times
.PP
Using this option will cause rclone to unconditionally upload all files
regardless of the state of files on the destination.
.PP
Normally rclone would skip any files that have the same modification
time and are the same size (or have the same checksum if using
\f[C]\-\-checksum\f[]).
.SS \-\-log\-file=FILE
.PP
Log all of rclone\[aq]s output to FILE.
This is not active by default.
This can be useful for tracking down problems with syncs in combination
with the \f[C]\-v\f[] flag.
.SS \-\-low\-level\-retries NUMBER
.PP
This controls the number of low level retries rclone does.
.PP
A low level retry is used to retry a failing operation \- typically one
HTTP request.
This might be uploading a chunk of a big file for example.
You will see low level retries in the log with the \f[C]\-v\f[] flag.
.PP
This shouldn\[aq]t need to be changed from the default in normal
operations, however if you get a lot of low level retries you may wish
to reduce the value so rclone moves on to a high level retry (see the
\f[C]\-\-retries\f[] flag) quicker.
.PP
Disable low level retries with \f[C]\-\-low\-level\-retries\ 1\f[].
.SS \-\-modify\-window=TIME
.PP
When checking whether a file has been modified, this is the maximum
allowed time difference that a file can have and still be considered
equivalent.
.PP
The default is \f[C]1ns\f[] unless this is overridden by a remote.
For example OS X only stores modification times to the nearest second so
if you are reading and writing to an OS X filing system this will be
\f[C]1s\f[] by default.
.PP
This command line flag allows you to override that computed default.
.SS \-\-no\-gzip\-encoding
.PP
Don\[aq]t set \f[C]Accept\-Encoding:\ gzip\f[].
This means that rclone won\[aq]t ask the server for compressed files
automatically.
Useful if you\[aq]ve set the server to return files with
\f[C]Content\-Encoding:\ gzip\f[] but you uploaded compressed files.
.PP
There is no need to set this in normal operation, and doing so will
decrease the network transfer efficiency of rclone.
.SS \-q, \-\-quiet
.PP
Normally rclone outputs stats and a completion message.
If you set this flag it will make as little output as possible.
.SS \-\-retries int
.PP
Retry the entire sync if it fails this many times it fails (default 3).
.PP
Some remotes can be unreliable and a few retries helps pick up the files
which didn\[aq]t get transferred because of errors.
.PP
Disable retries with \f[C]\-\-retries\ 1\f[].
.SS \-\-size\-only
.PP
Normally rclone will look at modification time and size of files to see
if they are equal.
If you set this flag then rclone will check only the size.
.PP
This can be useful transferring files from dropbox which have been
modified by the desktop sync client which doesn\[aq]t set checksums of
modification times in the same way as rclone.
.PP
When using this flag, rclone won\[aq]t update mtimes of remote files if
they are incorrect as it would normally.
.SS \-\-stats=TIME
.PP
Rclone will print stats at regular intervals to show its progress.
.PP
This sets the interval.
.PP
The default is \f[C]1m\f[].
Use 0 to disable.
.SS \-\-delete\-(before,during,after)
.PP
This option allows you to specify when files on your destination are
deleted when you sync folders.
.PP
Specifying the value \f[C]\-\-delete\-before\f[] will delete all files
present on the destination, but not on the source \f[I]before\f[]
starting the transfer of any new or updated files.
.PP
Specifying \f[C]\-\-delete\-during\f[] (default value) will delete files
while checking and uploading files.
This is usually the fastest option.
.PP
Specifying \f[C]\-\-delete\-after\f[] will delay deletion of files until
all new/updated files have been successfully transfered.
.SS \-\-timeout=TIME
.PP
This sets the IO idle timeout.
If a transfer has started but then becomes idle for this long it is
considered broken and disconnected.
.PP
The default is \f[C]5m\f[].
Set to 0 to disable.
.SS \-\-transfers=N
.PP
The number of file transfers to run in parallel.
It can sometimes be useful to set this to a smaller number if the remote
is giving a lot of timeouts or bigger if you have lots of bandwidth and
a fast remote.
.PP
The default is to run 4 file transfers in parallel.
.SS \-u, \-\-update
.PP
This forces rclone to skip any files which exist on the destination and
have a modified time that is newer than the source file.
.PP
If an existing destination file has a modification time equal (within
the computed modify window precision) to the source file\[aq]s, it will
be updated if the sizes are different.
.PP
On remotes which don\[aq]t support mod time directly the time checked
will be the uploaded time.
This means that if uploading to one of these remoes, rclone will skip
any files which exist on the destination and have an uploaded time that
is newer than the modification time of the source file.
.PP
This can be useful when transferring to a remote which doesn\[aq]t
support mod times directly as it is more accurate than a
\f[C]\-\-size\-only\f[] check and faster than using
\f[C]\-\-checksum\f[].
.SS \-v, \-\-verbose
.PP
If you set this flag, rclone will become very verbose telling you about
every file it considers and transfers.
.PP
Very useful for debugging.
.SS \-V, \-\-version
.PP
Prints the version number
.SS Configuration Encryption
.PP
Your configuration file contains information for logging in to your
cloud services.
This means that you should keep your \f[C]\&.rclone.conf\f[] file in a
secure location.
.PP
If you are in an environment where that isn\[aq]t possible, you can add
a password to your configuration.
This means that you will have to enter the password every time you start
rclone.
.PP
To add a password to your rclone configuration, execute
\f[C]rclone\ config\f[].
.IP
.nf
\f[C]
>rclone\ config
Current\ remotes:
e)\ Edit\ existing\ remote
n)\ New\ remote
d)\ Delete\ remote
s)\ Set\ configuration\ password
q)\ Quit\ config
e/n/d/s/q>
\f[]
.fi
.PP
Go into \f[C]s\f[], Set configuration password:
.IP
.nf
\f[C]
e/n/d/s/q>\ s
Your\ configuration\ is\ not\ encrypted.
If\ you\ add\ a\ password,\ you\ will\ protect\ your\ login\ information\ to\ cloud\ services.
a)\ Add\ Password
q)\ Quit\ to\ main\ menu
a/q>\ a
Enter\ NEW\ configuration\ password:
password>
Confirm\ NEW\ password:
password>
Password\ set
Your\ configuration\ is\ encrypted.
c)\ Change\ Password
u)\ Unencrypt\ configuration
q)\ Quit\ to\ main\ menu
c/u/q>
\f[]
.fi
.PP
Your configuration is now encrypted, and every time you start rclone you
will now be asked for the password.
In the same menu you can change the password or completely remove
encryption from your configuration.
.PP
There is no way to recover the configuration if you lose your password.
.PP
rclone uses nacl
secretbox (https://godoc.org/golang.org/x/crypto/nacl/secretbox) which
in term uses XSalsa20 and Poly1305 to encrypt and authenticate your
configuration with secret\-key cryptography.
The password is SHA\-256 hashed, which produces the key for secretbox.
The hashed password is not stored.
.PP
While this provides very good security, we do not recommend storing your
encrypted rclone configuration in public, if it contains sensitive
information, maybe except if you use a very strong password.
.PP
If it is safe in your environment, you can set the
\f[C]RCLONE_CONFIG_PASS\f[] environment variable to contain your
password, in which case it will be used for decrypting the
configuration.
.PP
If you are running rclone inside a script, you might want to disable
password prompts.
To do that, pass the parameter \f[C]\-\-ask\-password=false\f[] to
rclone.
This will make rclone fail instead of asking for a password, if if
\f[C]RCLONE_CONFIG_PASS\f[] doesn\[aq]t contain a valid password.
.SS Developer options
.PP
These options are useful when developing or debugging rclone.
There are also some more remote specific options which aren\[aq]t
documented here which are used for testing.
These start with remote name eg \f[C]\-\-drive\-test\-option\f[] \- see
the docs for the remote in question.
.SS \-\-cpuprofile=FILE
.PP
Write CPU profile to file.
This can be analysed with \f[C]go\ tool\ pprof\f[].
.SS \-\-dump\-bodies
.PP
Dump HTTP headers and bodies \- may contain sensitive info.
Can be very verbose.
Useful for debugging only.
.SS \-\-dump\-filters
.PP
Dump the filters to the output.
Useful to see exactly what include and exclude options are filtering on.
.SS \-\-dump\-headers
.PP
Dump HTTP headers \- may contain sensitive info.
Can be very verbose.
Useful for debugging only.
.SS \-\-memprofile=FILE
.PP
Write memory profile to file.
This can be analysed with \f[C]go\ tool\ pprof\f[].
.SS \-\-no\-check\-certificate=true/false
.PP
\f[C]\-\-no\-check\-certificate\f[] controls whether a client verifies
the server\[aq]s certificate chain and host name.
If \f[C]\-\-no\-check\-certificate\f[] is true, TLS accepts any
certificate presented by the server and any host name in that
certificate.
In this mode, TLS is susceptible to man\-in\-the\-middle attacks.
.PP
This option defaults to \f[C]false\f[].
.PP
\f[B]This should be used only for testing.\f[]
.SS Filtering
.PP
For the filtering options
.IP \[bu] 2
\f[C]\-\-delete\-excluded\f[]
.IP \[bu] 2
\f[C]\-\-filter\f[]
.IP \[bu] 2
\f[C]\-\-filter\-from\f[]
.IP \[bu] 2
\f[C]\-\-exclude\f[]
.IP \[bu] 2
\f[C]\-\-exclude\-from\f[]
.IP \[bu] 2
\f[C]\-\-include\f[]
.IP \[bu] 2
\f[C]\-\-include\-from\f[]
.IP \[bu] 2
\f[C]\-\-files\-from\f[]
.IP \[bu] 2
\f[C]\-\-min\-size\f[]
.IP \[bu] 2
\f[C]\-\-max\-size\f[]
.IP \[bu] 2
\f[C]\-\-min\-age\f[]
.IP \[bu] 2
\f[C]\-\-max\-age\f[]
.IP \[bu] 2
\f[C]\-\-dump\-filters\f[]
.PP
See the filtering section (http://rclone.org/filtering/).
.SS Exit Code
.PP
If any errors occurred during the command, rclone will set a non zero
exit code.
This allows scripts to detect when rclone operations have failed.
.SH Configuring rclone on a remote / headless machine
.PP
Some of the configurations (those involving oauth2) require an Internet
connected web browser.
.PP
If you are trying to set rclone up on a remote or headless box with no
browser available on it (eg a NAS or a server in a datacenter) then you
will need to use an alternative means of configuration.
There are two ways of doing it, described below.
.SS Configuring using rclone authorize
.PP
On the headless box
.IP
.nf
\f[C]
\&...
Remote\ config
Use\ auto\ config?
\ *\ Say\ Y\ if\ not\ sure
\ *\ Say\ N\ if\ you\ are\ working\ on\ a\ remote\ or\ headless\ machine
y)\ Yes
n)\ No
y/n>\ n
For\ this\ to\ work,\ you\ will\ need\ rclone\ available\ on\ a\ machine\ that\ has\ a\ web\ browser\ available.
Execute\ the\ following\ on\ your\ machine:
\ \ \ \ rclone\ authorize\ "amazon\ cloud\ drive"
Then\ paste\ the\ result\ below:
result>
\f[]
.fi
.PP
Then on your main desktop machine
.IP
.nf
\f[C]
rclone\ authorize\ "amazon\ cloud\ drive"
If\ your\ browser\ doesn\[aq]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
Paste\ the\ following\ into\ your\ remote\ machine\ \-\-\->
SECRET_TOKEN
<\-\-\-End\ paste
\f[]
.fi
.PP
Then back to the headless box, paste in the code
.IP
.nf
\f[C]
result>\ SECRET_TOKEN
\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
[acd12]
client_id\ =\
client_secret\ =\
token\ =\ SECRET_TOKEN
\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
y)\ Yes\ this\ is\ OK
e)\ Edit\ this\ remote
d)\ Delete\ this\ remote
y/e/d>
\f[]
.fi
.SS Configuring by copying the config file
.PP
Rclone stores all of its config in a single configuration file.
This can easily be copied to configure a remote rclone.
.PP
So first configure rclone on your desktop machine
.IP
.nf
\f[C]
rclone\ config
\f[]
.fi
.PP
to set up the config file.
.PP
Find the config file by running \f[C]rclone\ \-h\f[] and looking for the
help for the \f[C]\-\-config\f[] option
.IP
.nf
\f[C]
$\ rclone\ \-h
[snip]
\ \ \ \ \ \ \-\-config="/home/user/.rclone.conf":\ Config\ file.
[snip]
\f[]
.fi
.PP
Now transfer it to the remote box (scp, cut paste, ftp, sftp etc) and
place it in the correct place (use \f[C]rclone\ \-h\f[] on the remote
box to find out where).
.SH Filtering, includes and excludes
.PP
Rclone has a sophisticated set of include and exclude rules.
Some of these are based on patterns and some on other things like file
size.
.PP
The filters are applied for the \f[C]copy\f[], \f[C]sync\f[],
\f[C]move\f[], \f[C]ls\f[], \f[C]lsl\f[], \f[C]md5sum\f[],
\f[C]sha1sum\f[], \f[C]size\f[], \f[C]delete\f[] and \f[C]check\f[]
operations.
Note that \f[C]purge\f[] does not obey the filters.
.PP
Each path as it passes through rclone is matched against the include and
exclude rules like \f[C]\-\-include\f[], \f[C]\-\-exclude\f[],
\f[C]\-\-include\-from\f[], \f[C]\-\-exclude\-from\f[],
\f[C]\-\-filter\f[], or \f[C]\-\-filter\-from\f[].
The simplest way to try them out is using the \f[C]ls\f[] command, or
\f[C]\-\-dry\-run\f[] together with \f[C]\-v\f[].
.SS Patterns
.PP
The patterns used to match files for inclusion or exclusion are based on
"file globs" as used by the unix shell.
.PP
If the pattern starts with a \f[C]/\f[] then it only matches at the top
level of the directory tree, relative to the root of the remote.
If it doesn\[aq]t start with \f[C]/\f[] then it is matched starting at
the \f[B]end of the path\f[], but it will only match a complete path
element:
.IP
.nf
\f[C]
file.jpg\ \ \-\ matches\ "file.jpg"
\ \ \ \ \ \ \ \ \ \ \-\ matches\ "directory/file.jpg"
\ \ \ \ \ \ \ \ \ \ \-\ doesn\[aq]t\ match\ "afile.jpg"
\ \ \ \ \ \ \ \ \ \ \-\ doesn\[aq]t\ match\ "directory/afile.jpg"
/file.jpg\ \-\ matches\ "file.jpg"\ in\ the\ root\ directory\ of\ the\ remote
\ \ \ \ \ \ \ \ \ \ \-\ doesn\[aq]t\ match\ "afile.jpg"
\ \ \ \ \ \ \ \ \ \ \-\ doesn\[aq]t\ match\ "directory/file.jpg"
\f[]
.fi
.PP
\f[B]Important\f[] Note that you must use \f[C]/\f[] in patterns and not
\f[C]\\\f[] even if running on Windows.