Empty folder on Restic


I found that my cloud backup solution will not backup empty folders. In case of Restic backup, it didn’t upload the “lock” folder that was empty giving some errors.

This probably is an easy one, but I need to know when should I expect restic create empty folders and where, in order to have a consistent way of backup my restic data.


This should already be resolved in the master branch, would you mind giving a beta build a try? You can find them here: https://beta.restic.net/?sort=time&order=desc


Tried with the last beta v0.8.3-277-gc284712c > didn’t work. Lock folder is empty again.

Doesn’t the creation of empty folders depend on the backend that is used? Where are you uploading to?

Let’s take a step back. You backup into a local repo, the locks folder is empty after a backup (which is normal). Then you sync the repository to some cloud service which does not support storing an empty folder. Did I get that right?

Can you please describe why this causes a problem? Ideally together with the restic output and the error messages?

I’m guessing here: When you sync the repo back to the local disc and access it with restic 0.8.3, it complained that it could not create a lock because the folder isn’t there. Is that the problem? If so, that’s already solved in the master branch…


Thanks for all your responses.

My cloud Backup is BackBlaze. The client doesn’t support upload empty folders (and will not in the future).

So… in order to know what are the limitations / issues I can find when I try to restore the backup (as I did yesterday) I need to know if this is the only empty folder that is needed for restoring the backup without errors… and if I can meet a situation on which there will be more than 1 empty folder… when … etc…


@p314 Did you try out the latest build from the master branch? As it was mentioned twice now that you should give that a go :slight_smile:
The link is https://beta.restic.net/?sort=time&order=desc


Yes … I tried… but I think I got wrong the idea. What I tried is to create again the backup… not restore it.

If I’m getting now correctly the point… you want me to use last beta for restoring… right?

OK… will do now.

Do you know when is the restic binary on MAC path?.. In order to overwrite the older?


Ok so I try to make a summary of what has changed and maybe reword fd0s post a little.
In a previous version of restic, restic would give an error if there is no lock folder (which is empty when there is no lock on the repository, so it is intended to be empty if nothing is accessing the repository at the moment).

Restic now has changed as in: if there is no lock folder, restic will create one. So the backblace client won’t backup that folder and that’s fine. So I know that there can be emtpy folders in the /data/ folder of the repository - I just checked my repositories. The documentation for that is here https://restic.readthedocs.io/en/latest/100_references.html#trees-and-data

But I can’t vouch if some of them are missing because there is no data in them it’s not going to “break” restic.

You can run the command whereis restic in your Terminal window and it will tell you where it is.

Perfect… good news then. Let me check and I’ll post the result… but surely everything is ok.