docs: promote the use of -i/--interactive and "rclone sync -i" everywhere #1574

This commit is contained in:
Nick Craig-Wood 2020-06-05 17:04:23 +01:00
parent a3b3e1f646
commit 844b903595
27 changed files with 55 additions and 43 deletions

View file

@ -71,7 +71,9 @@ recently very efficiently like this:
rclone copy --max-age 24h --no-traverse /path/to/src remote: rclone copy --max-age 24h --no-traverse /path/to/src remote:
**Note**: Use the ` + "`-P`" + `/` + "`--progress`" + ` flag to view real-time transfer statistics **Note**: Use the ` + "`-P`" + `/` + "`--progress`" + ` flag to view real-time transfer statistics.
**Note**: Use the ` + "`--dry-run` or the `--interactive`/`-i`" + ` flag to test without copying anything.
`, `,
Run: func(command *cobra.Command, args []string) { Run: func(command *cobra.Command, args []string) {
cmd.CheckArgs(2, 2, command, args) cmd.CheckArgs(2, 2, command, args)

View file

@ -34,8 +34,10 @@ merged.
The ` + "`" + `dedupe` + "`" + ` command will delete all but one of any identical (same The ` + "`" + `dedupe` + "`" + ` command will delete all but one of any identical (same
md5sum) files it finds without confirmation. This means that for most md5sum) files it finds without confirmation. This means that for most
duplicated files the ` + "`" + `dedupe` + "`" + ` command will not be interactive. You duplicated files the ` + "`" + `dedupe` + "`" + ` command will not be interactive.
can use ` + "`" + `--dry-run` + "`" + ` to see what would happen without doing anything.
**Important**: Since this can cause data loss, test first with the
` + "`--dry-run` or the `--interactive`/`-i`" + ` flag.
Here is an example run. Here is an example run.

View file

@ -45,6 +45,9 @@ Then delete
That reads "delete everything with a minimum size of 100 MB", hence That reads "delete everything with a minimum size of 100 MB", hence
delete all files bigger than 100MBytes. delete all files bigger than 100MBytes.
**Important**: Since this can cause data loss, test first with the
` + "`--dry-run` or the `--interactive`/`-i`" + ` flag.
`, `,
Run: func(command *cobra.Command, args []string) { Run: func(command *cobra.Command, args []string) {
cmd.CheckArgs(1, 1, command, args) cmd.CheckArgs(1, 1, command, args)

View file

@ -49,7 +49,7 @@ option when moving a small number of files into a large destination
can speed transfers up greatly. can speed transfers up greatly.
**Important**: Since this can cause data loss, test first with the **Important**: Since this can cause data loss, test first with the
--dry-run flag. ` + "`--dry-run` or the `--interactive`/`-i`" + ` flag.
**Note**: Use the ` + "`-P`" + `/` + "`--progress`" + ` flag to view real-time transfer statistics. **Note**: Use the ` + "`-P`" + `/` + "`--progress`" + ` flag to view real-time transfer statistics.
`, `,

View file

@ -44,7 +44,7 @@ modification time or MD5SUM. src will be deleted on successful
transfer. transfer.
**Important**: Since this can cause data loss, test first with the **Important**: Since this can cause data loss, test first with the
--dry-run flag. ` + "`--dry-run` or the `--interactive`/`-i`" + ` flag.
**Note**: Use the ` + "`-P`" + `/` + "`--progress`" + ` flag to view real-time transfer statistics. **Note**: Use the ` + "`-P`" + `/` + "`--progress`" + ` flag to view real-time transfer statistics.
`, `,

View file

@ -19,6 +19,9 @@ var commandDefinition = &cobra.Command{
Remove the path and all of its contents. Note that this does not obey Remove the path and all of its contents. Note that this does not obey
include/exclude filters - everything will be removed. Use ` + "`" + `delete` + "`" + ` if include/exclude filters - everything will be removed. Use ` + "`" + `delete` + "`" + ` if
you want to selectively delete files. you want to selectively delete files.
**Important**: Since this can cause data loss, test first with the
` + "`--dry-run` or the `--interactive`/`-i`" + ` flag.
`, `,
Run: func(command *cobra.Command, args []string) { Run: func(command *cobra.Command, args []string) {
cmd.CheckArgs(1, 1, command, args) cmd.CheckArgs(1, 1, command, args)

View file

@ -30,7 +30,9 @@ modification time or MD5SUM. Destination is updated to match
source, including deleting files if necessary. source, including deleting files if necessary.
**Important**: Since this can cause data loss, test first with the **Important**: Since this can cause data loss, test first with the
` + "`" + `--dry-run` + "`" + ` flag to see exactly what would be copied and deleted. ` + "`--dry-run` or the `--interactive`/`-i`" + ` flag.
rclone sync -i SOURCE remote:DESTINATION
Note that files in the destination won't be deleted if there were any Note that files in the destination won't be deleted if there were any
errors at any point. errors at any point.

View file

@ -65,7 +65,7 @@ List the contents of a container
Sync `/home/local/directory` to the remote container, deleting any excess Sync `/home/local/directory` to the remote container, deleting any excess
files in the container. files in the container.
rclone sync /home/local/directory remote:container rclone sync -i /home/local/directory remote:container
### --fast-list ### ### --fast-list ###

View file

@ -70,7 +70,7 @@ List the contents of a bucket
Sync `/home/local/directory` to the remote bucket, deleting any Sync `/home/local/directory` to the remote bucket, deleting any
excess files in the bucket. excess files in the bucket.
rclone sync /home/local/directory remote:bucket rclone sync -i /home/local/directory remote:bucket
### Application Keys ### ### Application Keys ###

View file

@ -250,7 +250,7 @@ chunk naming scheme is to:
- Create another directory (most probably on the same cloud storage) - Create another directory (most probably on the same cloud storage)
and configure a new remote with desired metadata format, and configure a new remote with desired metadata format,
hash type, chunk naming etc. hash type, chunk naming etc.
- Now run `rclone sync oldchunks: newchunks:` and all your data - Now run `rclone sync -i oldchunks: newchunks:` and all your data
will be transparently converted in transfer. will be transparently converted in transfer.
This may take some time, yet chunker will try server-side This may take some time, yet chunker will try server-side
copy if possible. copy if possible.

View file

@ -433,7 +433,7 @@ as `eremote:`.
To sync the two remotes you would do To sync the two remotes you would do
rclone sync remote:crypt remote2:crypt rclone sync -i remote:crypt remote2:crypt
And to check the integrity you would do And to check the integrity you would do

View file

@ -83,7 +83,7 @@ rclone uses a system of subcommands. For example
rclone ls remote:path # lists a remote rclone ls remote:path # lists a remote
rclone copy /local/path remote:path # copies /local/path to the remote rclone copy /local/path remote:path # copies /local/path to the remote
rclone sync /local/path remote:path # syncs /local/path to the remote rclone sync -i /local/path remote:path # syncs /local/path to the remote
The main rclone commands with most used first The main rclone commands with most used first
@ -249,11 +249,11 @@ file or directory like this then use the full path starting with a
So to sync a directory called `sync:me` to a remote called `remote:` use So to sync a directory called `sync:me` to a remote called `remote:` use
rclone sync ./sync:me remote:path rclone sync -i ./sync:me remote:path
or or
rclone sync /full/path/to/sync:me remote:path rclone sync -i /full/path/to/sync:me remote:path
Server Side Copy Server Side Copy
---------------- ----------------
@ -286,8 +286,8 @@ same.
This can be used when scripting to make aged backups efficiently, eg This can be used when scripting to make aged backups efficiently, eg
rclone sync remote:current-backup remote:previous-backup rclone sync -i remote:current-backup remote:previous-backup
rclone sync /path/to/files remote:current-backup rclone sync -i /path/to/files remote:current-backup
Options Options
------- -------
@ -329,7 +329,7 @@ directory must not overlap the destination directory.
For example For example
rclone sync /path/to/local remote:current --backup-dir remote:old rclone sync -i /path/to/local remote:current --backup-dir remote:old
will sync `/path/to/local` to `remote:current`, but for any files will sync `/path/to/local` to `remote:current`, but for any files
which would have been updated or deleted will be stored in which would have been updated or deleted will be stored in
@ -604,7 +604,7 @@ Add an HTTP header for all download transactions. The flag can be repeated to
add multiple headers. add multiple headers.
``` ```
rclone sync s3:test/src ~/dst --header-download "X-Amz-Meta-Test: Foo" --header-download "X-Amz-Meta-Test2: Bar" rclone sync -i s3:test/src ~/dst --header-download "X-Amz-Meta-Test: Foo" --header-download "X-Amz-Meta-Test2: Bar"
``` ```
See the GitHub issue [here](https://github.com/rclone/rclone/issues/59) for See the GitHub issue [here](https://github.com/rclone/rclone/issues/59) for
@ -616,7 +616,7 @@ Add an HTTP header for all upload transactions. The flag can be repeated to add
multiple headers. multiple headers.
``` ```
rclone sync ~/src s3:test/dst --header-upload "Content-Disposition: attachment; filename='cool.html'" --header-upload "X-Amz-Meta-Test: FooBar" rclone sync -i ~/src s3:test/dst --header-upload "Content-Disposition: attachment; filename='cool.html'" --header-upload "X-Amz-Meta-Test: FooBar"
``` ```
See the GitHub issue [here](https://github.com/rclone/rclone/issues/59) for See the GitHub issue [here](https://github.com/rclone/rclone/issues/59) for
@ -1197,7 +1197,7 @@ or with `--backup-dir`. See `--backup-dir` for more info.
For example For example
rclone sync /path/to/local/file remote:current --suffix .bak rclone sync -i /path/to/local/file remote:current --suffix .bak
will sync `/path/to/local` to `remote:current`, but for any files will sync `/path/to/local` to `remote:current`, but for any files
which would have been updated or deleted have .bak added. which would have been updated or deleted have .bak added.

View file

@ -34,7 +34,7 @@ The syncs would be incremental (on a file by file basis).
Eg Eg
rclone sync drive:Folder s3:bucket rclone sync -i drive:Folder s3:bucket
### Using rclone from multiple locations at the same time ### ### Using rclone from multiple locations at the same time ###
@ -43,8 +43,8 @@ You can use rclone from multiple places at the same time if you choose
different subdirectory for the output, eg different subdirectory for the output, eg
``` ```
Server A> rclone sync /tmp/whatever remote:ServerA Server A> rclone sync -i /tmp/whatever remote:ServerA
Server B> rclone sync /tmp/whatever remote:ServerB Server B> rclone sync -i /tmp/whatever remote:ServerB
``` ```
If you sync to the same directory then you should use rclone copy If you sync to the same directory then you should use rclone copy

View file

@ -452,7 +452,7 @@ from the sync on the destination.
If for example you did a sync from `A` to `B` without the `--min-size 50k` flag If for example you did a sync from `A` to `B` without the `--min-size 50k` flag
rclone sync A: B: rclone sync -i A: B:
Then you repeated it like this with the `--delete-excluded` Then you repeated it like this with the `--delete-excluded`
@ -510,7 +510,7 @@ Imagine, you have the following directory structure:
You can exclude `dir3` from sync by running the following command: You can exclude `dir3` from sync by running the following command:
rclone sync --exclude-if-present .ignore dir1 remote:backup rclone sync -i --exclude-if-present .ignore dir1 remote:backup
Currently only one filename is supported, i.e. `--exclude-if-present` Currently only one filename is supported, i.e. `--exclude-if-present`
should not be used multiple times. should not be used multiple times.

View file

@ -91,7 +91,7 @@ List the contents of a directory
Sync `/home/local/directory` to the remote directory, deleting any Sync `/home/local/directory` to the remote directory, deleting any
excess files in the directory. excess files in the directory.
rclone sync /home/local/directory remote:directory rclone sync -i /home/local/directory remote:directory
### Modified time ### ### Modified time ###

View file

@ -165,7 +165,7 @@ List the contents of a bucket
Sync `/home/local/directory` to the remote bucket, deleting any excess Sync `/home/local/directory` to the remote bucket, deleting any excess
files in the bucket. files in the bucket.
rclone sync /home/local/directory remote:bucket rclone sync -i /home/local/directory remote:bucket
### Service Account support ### ### Service Account support ###

View file

@ -112,7 +112,7 @@ List the contents of an album
Sync `/home/local/images` to the Google Photos, removing any excess Sync `/home/local/images` to the Google Photos, removing any excess
files in the album. files in the album.
rclone sync /home/local/image remote:album/newAlbum rclone sync -i /home/local/image remote:album/newAlbum
## Layout ## Layout

View file

@ -78,7 +78,7 @@ List the contents of a directory
Sync the remote `directory` to `/home/local/directory`, deleting any excess files. Sync the remote `directory` to `/home/local/directory`, deleting any excess files.
rclone sync remote:directory /home/local/directory rclone sync -i remote:directory /home/local/directory
### Read only ### ### Read only ###

View file

@ -8,7 +8,7 @@ description: "Rclone docs for the local filesystem"
Local paths are specified as normal filesystem paths, eg `/path/to/wherever`, so Local paths are specified as normal filesystem paths, eg `/path/to/wherever`, so
rclone sync /home/source /tmp/destination rclone sync -i /home/source /tmp/destination
Will sync `/home/source` to `/tmp/destination` Will sync `/home/source` to `/tmp/destination`

View file

@ -106,7 +106,7 @@ List the contents of a directory
Sync `/home/local/directory` to the remote path, deleting any Sync `/home/local/directory` to the remote path, deleting any
excess files in the path. excess files in the path.
rclone sync /home/local/directory remote:directory rclone sync -i /home/local/directory remote:directory
### Modified time ### ### Modified time ###

View file

@ -90,7 +90,7 @@ List the contents of a bucket
Sync `/home/local/directory` to the remote bucket, deleting any excess Sync `/home/local/directory` to the remote bucket, deleting any excess
files in the bucket. files in the bucket.
rclone sync /home/local/directory remote:bucket rclone sync -i /home/local/directory remote:bucket
### --fast-list ### ### --fast-list ###

View file

@ -42,7 +42,7 @@ List the contents of a bucket
Sync `/home/local/directory` to the remote bucket, deleting any excess Sync `/home/local/directory` to the remote bucket, deleting any excess
files in the bucket. files in the bucket.
rclone sync /home/local/directory remote:bucket rclone sync -i /home/local/directory remote:bucket
## AWS S3 {#amazon-s3} ## AWS S3 {#amazon-s3}

View file

@ -112,7 +112,7 @@ List the contents of a library
Sync `/home/local/directory` to the remote library, deleting any Sync `/home/local/directory` to the remote library, deleting any
excess files in the library. excess files in the library.
rclone sync /home/local/directory seafile:library rclone sync -i /home/local/directory seafile:library
### Configuration in library mode ### ### Configuration in library mode ###
@ -208,7 +208,7 @@ List the contents of a directory
Sync `/home/local/directory` to the remote library, deleting any Sync `/home/local/directory` to the remote library, deleting any
excess files in the library. excess files in the library.
rclone sync /home/local/directory seafile: rclone sync -i /home/local/directory seafile:
### --fast-list ### ### --fast-list ###

View file

@ -95,7 +95,7 @@ List the contents of a directory
Sync `/home/local/directory` to the remote directory, deleting any Sync `/home/local/directory` to the remote directory, deleting any
excess files in the directory. excess files in the directory.
rclone sync /home/local/directory remote:directory rclone sync -i /home/local/directory remote:directory
### SSH Authentication ### ### SSH Authentication ###
@ -302,11 +302,11 @@ different. This issue affects among others Synology NAS boxes.
Shared folders can be found in directories representing volumes Shared folders can be found in directories representing volumes
rclone sync /home/local/directory remote:/directory --ssh-path-override /volume2/directory rclone sync -i /home/local/directory remote:/directory --ssh-path-override /volume2/directory
Home directory can be found in a shared folder called "home" Home directory can be found in a shared folder called "home"
rclone sync /home/local/directory remote:/home/directory --ssh-path-override /volume1/homes/USER/directory rclone sync -i /home/local/directory remote:/home/directory --ssh-path-override /volume1/homes/USER/directory
- Config: path_override - Config: path_override
- Env Var: RCLONE_SFTP_PATH_OVERRIDE - Env Var: RCLONE_SFTP_PATH_OVERRIDE

View file

@ -132,7 +132,7 @@ List the contents of a container
Sync `/home/local/directory` to the remote container, deleting any Sync `/home/local/directory` to the remote container, deleting any
excess files in the container. excess files in the container.
rclone sync /home/local/directory remote:container rclone sync -i /home/local/directory remote:container
### Configuration from an OpenStack credentials file ### ### Configuration from an OpenStack credentials file ###

View file

@ -217,7 +217,7 @@ Use the `size` command to print the total size of objects in a bucket or a folde
Use the `sync` command to sync the source to the destination, Use the `sync` command to sync the source to the destination,
changing the destination only, deleting any excess files. changing the destination only, deleting any excess files.
rclone sync --progress /home/local/directory/ remote:bucket/path/to/dir/ rclone sync -i --progress /home/local/directory/ remote:bucket/path/to/dir/
The `--progress` flag is for displaying progress information. The `--progress` flag is for displaying progress information.
Remove it if you don't need this information. Remove it if you don't need this information.
@ -227,15 +227,15 @@ to see exactly what would be copied and deleted.
The sync can be done also from Tardigrade to the local file system. The sync can be done also from Tardigrade to the local file system.
rclone sync --progress remote:bucket/path/to/dir/ /home/local/directory/ rclone sync -i --progress remote:bucket/path/to/dir/ /home/local/directory/
Or between two Tardigrade buckets. Or between two Tardigrade buckets.
rclone sync --progress remote-us:bucket/path/to/dir/ remote-europe:bucket/path/to/dir/ rclone sync -i --progress remote-us:bucket/path/to/dir/ remote-europe:bucket/path/to/dir/
Or even between another cloud storage and Tardigrade. Or even between another cloud storage and Tardigrade.
rclone sync --progress s3:bucket/path/to/dir/ tardigrade:bucket/path/to/dir/ rclone sync -i --progress s3:bucket/path/to/dir/ tardigrade:bucket/path/to/dir/
{{< rem autogenerated options start" - DO NOT EDIT - instead edit fs.RegInfo in backend/tardigrade/tardigrade.go then run make backenddocs" >}} {{< rem autogenerated options start" - DO NOT EDIT - instead edit fs.RegInfo in backend/tardigrade/tardigrade.go then run make backenddocs" >}}
### Standard Options ### Standard Options

View file

@ -80,7 +80,7 @@ List the contents of a directory
Sync `/home/local/directory` to the remote path, deleting any Sync `/home/local/directory` to the remote path, deleting any
excess files in the path. excess files in the path.
rclone sync /home/local/directory remote:directory rclone sync -i /home/local/directory remote:directory
Yandex paths may be as deep as required, eg `remote:directory/subdirectory`. Yandex paths may be as deep as required, eg `remote:directory/subdirectory`.