rsync to an exFAT partition in Linux

I do most of my work on Linux machines, but I have a Mac at home, I love the build quality and the fact that, after all, it is still *nix.

Yesterday I tried to copy a large file (8.8GB) to my flash drive, but as it was FAT32 formatted, it failed because of the file size cap (4GB) on such partitions. So I rsync’d the contents of the flash drive to a temp dir on my Linux machine and partitioned the flash drive as exFAT (it is native from OSX Snow Leopard and later, and if it is not already on your Linux box, try installing the exfat-fuse and exfat-utils packages on a recent Debian based Distro).

The problem is when I tried to rsync the contents of the temp directory back to the flash drive, I got a lot of errors such as:

rsync: chgrp "util/iphone/absinthe-mac-0.4.zip" failed: Function not implemented (38)

I googled for answers, found some, but nothing that would solve my problem, until some pages deep, after looking inside a lot of posts on a page I found the solution.

It happens that I automatically use rsync as follows:

rsync -av [SRC] [DESTINATION]

I always use the av switch, that states for:

v: increases verbosity, shows the files being synchronized
a: archive, replaces the rlptgoD switches (recurse dirs, preserve symlinks, preserve permissions, preserves modification times, preserve groups, preserve owner and preserve Device files).

The problem is that the Linux exFAT does not cope well with the switches that relate to permissions (the pgo), so the solution is to run rsync with the following switches, removing the p, g and o:

rsync -rltDv [SRC] [DESTINATION]

Of course, rembering the switch is much easier than remembering rltD, but a quick rsync –help will help you remind that.

Share Button

22 thoughts on “rsync to an exFAT partition in Linux”

  1. You can leave out the l-switch as well, exFAT does not handle symlinks. Also, when using rsync over a remote connection, add the z-switch to compress stuff on transit.

  2. Works a charm, thanks. Tip: When copying to/from a USB drive, include the -W option for much faster transfer.

  3. That seems to work but performance is not the best, usually 10% of what -avz allows. I’m transferring around 2Tb of files so its a pretty big impact. Transferring from a server to a workstation via NFS, to a drive connected via USB 3. Marc’s suggestion to use -W didn’t yield positive results.

    1. Sorry for the long time to answer, but I guess that what made the transfer fast in your case is the “z” switch, which compresses the files. Since it’s a large volume, this switch makes sense and should be used. As I said on the post, you should avoid the p, g and o switches that relate to file system permissions. The “v” should also work on all cases.

  4. Thanks for the hints. I use
    -avz –no-p –no-g –no-o
    to transfer large amounts (TB) via internet onto exFAT.

  5. Hello Marcelo, thank you for the great tutorial. I sync MacBook Air early 2017 documents with Toshiba Canvio T1, exFat formatted external hard drive. Your command works fine but the file Created Date changes to Today’s date when files are sync to external hard drive.

    Any advice on how to maintain the file original Created Date?

    Best, A.

Leave a Reply