1
0
mirror of https://github.com/rclone/rclone.git synced 2025-12-15 15:53:41 +00:00

Implement --suffix for use with --backup-dir only #98

This also makes sure we remove files we are about to override in the
--backup-dir properly.
This commit is contained in:
Nick Craig-Wood
2017-01-19 17:26:29 +00:00
parent a77659e47d
commit e2bf9eb8e9
5 changed files with 66 additions and 15 deletions

View File

@@ -193,8 +193,11 @@ respectively.
When using `sync`, `copy` or `move` any files which would have been
overwritten or deleted are moved in their original hierarchy into this
directory. Files with matching paths already in DIR will be
overwritten.
directory.
If `--suffix` is set, then the moved files will have the suffix added
to them. If there is a file with the same path (after the suffix has
been added) in DIR, then it will be overwritten.
The remote in use must support server side move or copy and you must
use the same remote as the destination of the sync. The backup
@@ -209,7 +212,8 @@ which would have been updated or deleted will be stored in
`remote:old`.
If running rclone from a script you might want to use today's date as
the directory name passed to `--backup-dir` to store the old files.
the directory name passed to `--backup-dir` to store the old files, or
you might want to pass `--suffix` with today's date.
### --bwlimit=BANDWIDTH_SPEC ###
@@ -457,6 +461,14 @@ equals 1,048,576 bits/s and not 1,000,000 bits/s.
The default is `bytes`.
### --suffix=SUFFIX ###
This is for use with `--backup-dir` only. If this isn't set then
`--backup-dir` will move files with their original name. If it is set
then the files will have SUFFIX added on to them.
See `--backup-dir` for more info.
### --track-renames ###
By default rclone doesn't not keep track of renamed files, so if you