[Bug 10051] Improved long file-name handling
samba-bugs at samba.org
samba-bugs at samba.org
Sat Aug 3 12:00:05 UTC 2019
https://bugzilla.samba.org/show_bug.cgi?id=10051
--- Comment #1 from Haravikk <samba at haravikk.com> ---
Wow, was about to post basically this same feature, forgetting I'd already
requested it six years ago!
There's definitely still an argument to be made for rsync to handle file names
better when they are invalid on the target device, however my original proposal
is far too basic.
I'd like to propose the following altered options:
--rename-dest [error|md5|sha1|sha2]
Determines the behaviour when a filename from the source is invalid on the
target,
either due to length or invalid characters. By default, an error is
produced,
otherwise a hashing algorithm can be specified to create a compact new name
for
the file.
--rename-dest-ext .rsync
Sets a file extension for renamed files.
--dest-meta .meta
Specifies the file extension to use for meta files, into which additional
data
about a file's transfer can be written. For example, if a file is renamed,
then a
file with the same hashed name but this extension will be created,
containing the
original name of the file. For example, a file called
"birthday/anniversary.jpg"
is invalid on the target and so is renamed
a1df35adf4b3df93458d84c014b56465.rsync
and alongside it is stored a1df35adf4b3df93458d84c014b56465.meta with the
line:
name:25:birthday/anniversay.jpg
Note the length is specified so characters in the original name cannot
interfere
with the meta file itself.
--source-meta .meta
Specifies the file extension used for meta files on the source side of the
transfer, allowing rsync to check for such files and use them when
transferring
files. For example, in the case of a renamed file the meta file will
contain the
original file name, allowing rsync to attempt to transfer the file under
its
original name, if the new target supports it (e.g- a transfer to original
source).
--meta .meta
Shorthand for specifying both --dest-meta and --source-meta at the same
time.
Maybe there's still a more elegant way to do this? What's certain at least is
that rsync could really use a way to more reliably handle files that cannot be
transferred properly.
I opted to go for a generic meta file concept as it's possible rsync could use
this for other features in future, for example, files too large for a target
filesystem, could be split, with a meta file entry detailing how to reassemble
them from smaller pieces.
--
You are receiving this mail because:
You are the QA Contact for the bug.
More information about the rsync
mailing list