After MacOS Upgrade to Ventura, restic repo giving "inappropriate ioctl for device" errors

Using this version from Homebrew:

$ restic version
restic 0.14.0 compiled with go1.19 on darwin/amd64

After I upgraded to Ventura (13.0.1), when I run restic commands to access a repo on an ExFat volume on a USB drive, I’m getting these errors:

$ restic snapshots
repository 12697d8f opened (repository version 2) successfully, password is correct
Save(<lock/5129334b09>) returned error, retrying after 552.330144ms: sync /Volumes/BACKUP_HD/macbook_restic/locks/5129334b098beb2a142b8a052b80727cb8e784a7d70bb7022c0ea08fa3a0db2a-tmp-963238146: inappropriate ioctl for device
Save(<lock/5129334b09>) returned error, retrying after 1.080381816s: sync /Volumes/BACKUP_HD/macbook_restic/locks/5129334b098beb2a142b8a052b80727cb8e784a7d70bb7022c0ea08fa3a0db2a-tmp-3721763287: inappropriate ioctl for device
unable to create lock in backend

“restic unlock” completes OK, but doesn’t fix this problem.

This repo/volume was created in MacOS 12 (Monterey) and always worked fine there.

I’m not sure if this is a restic issue or MacOS issue, so looking for some help on where to start from a restic perspective.

Some other notes:

  • Other volumes on the USB drive work fine (Time Machine, Carbon Copy Cloner).
  • I can access the volume used for the repo via the shell fine and do, e.g., “ls” on the directories to see the raw restic files OK.

So it seems like everything works OK with the USB drive/volumes after the Ventura upgrade aside from restic.

macOS apparently has changed the error code which is returned when restic tries to make sure that the files were actually written to an exfat disk. All other file systems should still work fine.

We’ve worked around this problem in backend/local: Ignore ENOTTY for fsync on Mac by greatroar · Pull Request #4021 · restic/restic · GitHub . However, that PR is not yet part of a released version, thus you’d have to use a beta build from restic beta releases (/)