App hangs/fails to save open file during restic backup

I’ve noticed this behavior a few times now, so I’m sharing to find out if:

  1. it’s expected,
  2. something I’m doing wrong,
  3. deserves an issue opened on GitHub.

I have a file open (in this case a Numbers spreadsheet). A scheduled (cronjob) restic backup begins in the background including the open file. I attempt to save the file, coincidentally while the backup is running, but the application hangs (ie unresponsive with OS X spinning pinwheel). I verify that the restic is running, wait for it to complete, which it does successfully. However, the application with the open file never completes the save operation and subsequently must be force quit.

Any feedback is appreciated. Thanks.

You should probably wait for @fd0 to shed some light on this but to me it sounds like restic is locking the file which makes Numbers unable to save it. Maybe you can circumvent this issue by creating and mounting a filesystem snaphot for the backup.

Hm, that’s a tough one. I know that restic does not lock files in any way, it just opens, reads and closes them. I don’t have any idea what’s going on…

Personally, resolving the issue is a low priority. I can work around it by disabling the scheduled job while working in Numbers. I’m fine just leaving the post here on the forum for posterity in case someone else experiences something similar. Could just correlate with the restic job but not actually be caused by restic.


I just discovered restic and it is exactly what I expected to have for our backups. Bravo !

May be I did something wrong and do not use restic with right parameters. I know it is old thread but I have the same issue. I have to backup files which are opened related to our LDAP and cannot stop our LDAP server to avoid any disruption of service. Is there is a possibility that restic get (kind of copy) the file to backup without to open it?

i am using CentOS 7 and restic 0.9.6.

Any support/idea is welcome.

thank you.

1 Like

This is probably not caused by restic per se - as @fd0 wrote earlier it doesn’t lock files when backing up, so your OS should let restic read the file without preventing others from writing to it. Perhaps there could be a race condition of some sort right when restic is reading the file and the other application is saving it, but 1) what are the chances that these two things happens at the same time every time you guys are having the problem, and 2) if this was the case I would expect restic to be the one having the problem, not the application saving the file.

Anyway, I don’t know why the original problem in this thread happens, but it would need technical looking into, and needs isolating by trying it with other applications as well. Unless there’s a suspicion that restic is doing something wrong I’m not sure who’d dig into it, sorry. Again, restic just reads the files, and doesn’t lock them.


Thank you for your clarification. Thank to them, I finally succeed to have a successful backup with root user. I needed to setup a password file and to use it with --password-file parameter.