RSYNC changes file name

Lowell Gilbert freebsd-questions-local at
Tue Jan 29 23:33:28 UTC 2019

"James B. Byrne via freebsd-questions" <freebsd-questions at>

> On Tue, January 29, 2019 17:00, Polytropon wrote:
>>> The purpose of the USB key archives is to allow me to search for
>>> specific files, generally UFT8 encoded, using the native file system
>>> tools on whatever host I have access to.  I do this on a regular
>>> basis.  Encapsulating the data in a file format that depends upon
>>> access to a specific application defeats the purpose.
>> Okay, this makes perfectly sense.
>> So you do _not_ use those files to restore IMAP message content
>> on the server you've rsync'ed them from, you're just unhappy
>> with the fact that "12345." became "12345" on FAT due to
>> naming restrictions. In this case, you can convince yourself
>> that you didn't do anything wrong, it's just FAT that doesn't
>> allow a "." at the end of the filename. Maybe it is possible
>> to live with this fact, or try to change the source file naming
>> convention from "xxxxx." to "xxxxx" (where x = 0...9), if that
>> is possible.
> I am considering modifying the transfer script so as to remove the
> trailing dot before hitting the FAT fs.  That would prevent rsync from
> deleting all of the files on the target that do not have trailing dots
> before replacing them with files with the exact names as those it just
> deleted.

That makes sense. My instinct would be to create archives instead, and
the archiving program (say, tar or zip) would be comparing filenames
without the filesystem format getting in the way, so update operations
(-u for both programs, if my recall holds) would work without
unnecessary updates. Still preserves the accessible-from-any-platform
criterion, but doesn't require any custom functionality.

More information about the freebsd-questions mailing list