github.com/artpar/rclone@v1.67.3/docs/content/commands/rclone_copy.md (about)

     1  ---
     2  title: "rclone copy"
     3  description: "Copy files from source to dest, skipping identical files."
     4  slug: rclone_copy
     5  url: /commands/rclone_copy/
     6  groups: Copy,Filter,Listing,Important
     7  # autogenerated - DO NOT EDIT, instead edit the source code in cmd/copy/ and as part of making a release run "make commanddocs"
     8  ---
     9  # rclone copy
    10  
    11  Copy files from source to dest, skipping identical files.
    12  
    13  ## Synopsis
    14  
    15  
    16  Copy the source to the destination.  Does not transfer files that are
    17  identical on source and destination, testing by size and modification
    18  time or MD5SUM.  Doesn't delete files from the destination. If you
    19  want to also delete files from destination, to make it match source,
    20  use the [sync](/commands/rclone_sync/) command instead.
    21  
    22  Note that it is always the contents of the directory that is synced,
    23  not the directory itself. So when source:path is a directory, it's the
    24  contents of source:path that are copied, not the directory name and
    25  contents.
    26  
    27  To copy single files, use the [copyto](/commands/rclone_copyto/)
    28  command instead.
    29  
    30  If dest:path doesn't exist, it is created and the source:path contents
    31  go there.
    32  
    33  For example
    34  
    35      rclone copy source:sourcepath dest:destpath
    36  
    37  Let's say there are two files in sourcepath
    38  
    39      sourcepath/one.txt
    40      sourcepath/two.txt
    41  
    42  This copies them to
    43  
    44      destpath/one.txt
    45      destpath/two.txt
    46  
    47  Not to
    48  
    49      destpath/sourcepath/one.txt
    50      destpath/sourcepath/two.txt
    51  
    52  If you are familiar with `rsync`, rclone always works as if you had
    53  written a trailing `/` - meaning "copy the contents of this directory".
    54  This applies to all commands and whether you are talking about the
    55  source or destination.
    56  
    57  See the [--no-traverse](/docs/#no-traverse) option for controlling
    58  whether rclone lists the destination directory or not.  Supplying this
    59  option when copying a small number of files into a large destination
    60  can speed transfers up greatly.
    61  
    62  For example, if you have many files in /path/to/src but only a few of
    63  them change every day, you can copy all the files which have changed
    64  recently very efficiently like this:
    65  
    66      rclone copy --max-age 24h --no-traverse /path/to/src remote:
    67  
    68  
    69  Rclone will sync the modification times of files and directories if
    70  the backend supports it. If metadata syncing is required then use the
    71  `--metadata` flag.
    72  
    73  Note that the modification time and metadata for the root directory
    74  will **not** be synced. See https://github.com/artpar/artpar/issues/7652
    75  for more info.
    76  
    77  **Note**: Use the `-P`/`--progress` flag to view real-time transfer statistics.
    78  
    79  **Note**: Use the `--dry-run` or the `--interactive`/`-i` flag to test without copying anything.
    80  
    81  
    82  ```
    83  rclone copy source:path dest:path [flags]
    84  ```
    85  
    86  ## Options
    87  
    88  ```
    89        --create-empty-src-dirs   Create empty source dirs on destination after copy
    90    -h, --help                    help for copy
    91  ```
    92  
    93  
    94  ## Copy Options
    95  
    96  Flags for anything which can Copy a file.
    97  
    98  ```
    99        --check-first                                 Do all the checks before starting transfers
   100    -c, --checksum                                    Check for changes with size & checksum (if available, or fallback to size only).
   101        --compare-dest stringArray                    Include additional comma separated server-side paths during comparison
   102        --copy-dest stringArray                       Implies --compare-dest but also copies files from paths into destination
   103        --cutoff-mode HARD|SOFT|CAUTIOUS              Mode to stop transfers when reaching the max transfer limit HARD|SOFT|CAUTIOUS (default HARD)
   104        --ignore-case-sync                            Ignore case when synchronizing
   105        --ignore-checksum                             Skip post copy check of checksums
   106        --ignore-existing                             Skip all files that exist on destination
   107        --ignore-size                                 Ignore size when skipping use modtime or checksum
   108    -I, --ignore-times                                Don't skip items that match size and time - transfer all unconditionally
   109        --immutable                                   Do not modify files, fail if existing files have been modified
   110        --inplace                                     Download directly to destination file instead of atomic download to temp/rename
   111        --max-backlog int                             Maximum number of objects in sync or check backlog (default 10000)
   112        --max-duration Duration                       Maximum duration rclone will transfer data for (default 0s)
   113        --max-transfer SizeSuffix                     Maximum size of data to transfer (default off)
   114    -M, --metadata                                    If set, preserve metadata when copying objects
   115        --modify-window Duration                      Max time diff to be considered the same (default 1ns)
   116        --multi-thread-chunk-size SizeSuffix          Chunk size for multi-thread downloads / uploads, if not set by filesystem (default 64Mi)
   117        --multi-thread-cutoff SizeSuffix              Use multi-thread downloads for files above this size (default 256Mi)
   118        --multi-thread-streams int                    Number of streams to use for multi-thread downloads (default 4)
   119        --multi-thread-write-buffer-size SizeSuffix   In memory buffer size for writing when in multi-thread mode (default 128Ki)
   120        --no-check-dest                               Don't check the destination, copy regardless
   121        --no-traverse                                 Don't traverse destination file system on copy
   122        --no-update-dir-modtime                       Don't update directory modification times
   123        --no-update-modtime                           Don't update destination modtime if files identical
   124        --order-by string                             Instructions on how to order the transfers, e.g. 'size,descending'
   125        --partial-suffix string                       Add partial-suffix to temporary file name when --inplace is not used (default ".partial")
   126        --refresh-times                               Refresh the modtime of remote files
   127        --server-side-across-configs                  Allow server-side operations (e.g. copy) to work across different configs
   128        --size-only                                   Skip based on size only, not modtime or checksum
   129        --streaming-upload-cutoff SizeSuffix          Cutoff for switching to chunked upload if file size is unknown, upload starts after reaching cutoff or when file ends (default 100Ki)
   130    -u, --update                                      Skip files that are newer on the destination
   131  ```
   132  
   133  ## Important Options
   134  
   135  Important flags useful for most commands.
   136  
   137  ```
   138    -n, --dry-run         Do a trial run with no permanent changes
   139    -i, --interactive     Enable interactive mode
   140    -v, --verbose count   Print lots more stuff (repeat for more)
   141  ```
   142  
   143  ## Filter Options
   144  
   145  Flags for filtering directory listings.
   146  
   147  ```
   148        --delete-excluded                     Delete files on dest excluded from sync
   149        --exclude stringArray                 Exclude files matching pattern
   150        --exclude-from stringArray            Read file exclude patterns from file (use - to read from stdin)
   151        --exclude-if-present stringArray      Exclude directories if filename is present
   152        --files-from stringArray              Read list of source-file names from file (use - to read from stdin)
   153        --files-from-raw stringArray          Read list of source-file names from file without any processing of lines (use - to read from stdin)
   154    -f, --filter stringArray                  Add a file filtering rule
   155        --filter-from stringArray             Read file filtering patterns from a file (use - to read from stdin)
   156        --ignore-case                         Ignore case in filters (case insensitive)
   157        --include stringArray                 Include files matching pattern
   158        --include-from stringArray            Read file include patterns from file (use - to read from stdin)
   159        --max-age Duration                    Only transfer files younger than this in s or suffix ms|s|m|h|d|w|M|y (default off)
   160        --max-depth int                       If set limits the recursion depth to this (default -1)
   161        --max-size SizeSuffix                 Only transfer files smaller than this in KiB or suffix B|K|M|G|T|P (default off)
   162        --metadata-exclude stringArray        Exclude metadatas matching pattern
   163        --metadata-exclude-from stringArray   Read metadata exclude patterns from file (use - to read from stdin)
   164        --metadata-filter stringArray         Add a metadata filtering rule
   165        --metadata-filter-from stringArray    Read metadata filtering patterns from a file (use - to read from stdin)
   166        --metadata-include stringArray        Include metadatas matching pattern
   167        --metadata-include-from stringArray   Read metadata include patterns from file (use - to read from stdin)
   168        --min-age Duration                    Only transfer files older than this in s or suffix ms|s|m|h|d|w|M|y (default off)
   169        --min-size SizeSuffix                 Only transfer files bigger than this in KiB or suffix B|K|M|G|T|P (default off)
   170  ```
   171  
   172  ## Listing Options
   173  
   174  Flags for listing directories.
   175  
   176  ```
   177        --default-time Time   Time to show if modtime is unknown for files and directories (default 2000-01-01T00:00:00Z)
   178        --fast-list           Use recursive list if available; uses more memory but fewer transactions
   179  ```
   180  
   181  See the [global flags page](/flags/) for global options not listed here.
   182  
   183  # SEE ALSO
   184  
   185  * [rclone](/commands/rclone/)	 - Show help for rclone commands, flags and backends.
   186