restic: Windows client snapshot -> FUSE mount -> Samba share -> cant copy files

I have found a similar issue which is already closed: https://github.com/restic/restic/issues/988 However, I am not quite sure if this issue has been pinned down correctly. It seems to me, that it requires a particular scenario in order to be reproducible.

Output of restic version

Servers - responsible for providing repository with rest-serv, for fuse mount and samba share, Tested with two different servers:

  • Server A:
    • restic 0.9.2 compiled with go1.10.1 on linux/amd64
    • rest-server 0.9.7 compiled with go1.10.1 on linux/amd64
    • Samba Version 4.7.6-Ubuntu
  • Server B:
    • restic 0.9.2 compiled with go1.10.3 on linux/arm64
    • rest-server 0.9.7 compiled with go1.10.1 on linux/arm64
    • Samba Version Version 4.5.12-Debian

Clients - responsible for creating snapshots

  • Windows: restic 0.9.2 compiled with go1.10.3 on windows/amd64
  • Linux: client version corresponds to server version(creating snapshots directly on the server - Although the repository is available in the local filesystem, I still access it through rest-serv to ensure comparable conditions)

How did you run restic exactly?

creating snapshots without any fancy options. mounting the repository with:

  • RESTIC_REPOSITORY=/mnt/backup/live/restic_live
  • RESTIC_PASSWORD = restic
  • restic mount --allow-other --snapshot-template ‘2006_01_02__15_04’

What backend/server/service did you use to store the repository?

local repository

  • mounting: accessed directly
  • creating snapshots: accessed through rest-serv

Expected behavior

The mounted repository is shared by samba. I expect to be able to browse and copy files out of this samba share.

Actual behavior

Two different hosts backup to my repository

  • windows client
  • linux client(the ‘server’ itself)

I have configured a samba share which includes the mountpoint served by restic’s fuse. When I access this share I observe the following behaviour:

  • I can browse all snapshot files without problems

  • I can copy files from snapshots which have been created by the linux client.

  • I can not copy files from snapshots which have been created by the windows client.(This file is no longer located in…)

  • For the Windows snapshots, I can see the filesize in folder view in Windows Explorer. However, If I open the ‘File Properties’ window, it is a 50/50 chance to get the actual file size or to get 0 bytes as a result.

  • It does not matter how I access the samba share(e.g. Windows Explorer, Chrome, …)

  • If I open a folder which belongs to a windows client’s snapshot, select some files and hit F5 to refresh, then thesefiles disappear from the folder view. I have to go to the parent folder and back into the child in order to have this file reappear(windows explorer)

  • Working with the mounted repository directly on the server(not via samba) works for all kind snapshots without problems.

Steps to reproduce the behavior

Create a snapshot with a windows client and try to copy a file from the mounted repository through samba.

Do you have any idea what may have caused this?

Since it only affects files created by the windows client, this has to be related to differences between the way files are saved with the windows or linux version of restic. I could think of some kind of file attributes which are additionally specified, missing or differently encoded and eventually lead to samba’s confusion. It seems that listing files in a directory works fine, but accessing a file object is errornous.

Do you have an idea how to solve the issue?

No

Did restic help you or made you happy in any way?

Restic helped me to end my search for a personal backup solution. Although it required some additional work to wrap it with ‘comfort features’(e.g.: monitoring, reminders, notifications) i am satisfied with the final result and very happy to have choosen restic as the ‘system’s backend’.

About this issue

  • Original URL
  • State: open
  • Created 6 years ago
  • Comments: 16 (7 by maintainers)

Most upvoted comments

Thank you for your fast reply!

I created a new repository on a virtual machine which corresponds to ‘Server A’ in my initial post.

Since I don’t know if the working internals differentiate by file size, I backupped small(image) as well as larger files(.zip|.bz2). Some files are exclusive to a single client, whereas some are present on both. While the filenames would not win an award for consistency, it should still be easy to follow how the files are distributed. The backupped files are:

Windows:

  • image_win_only.jpg
  • image_win_linux.png
  • winows.zip
  • win_linux.bz2

Linux:

  • image_win_linux.png
  • linux.bz2
  • win_linux.bz2

I used the following commands on the clients to create the snapshots:

This is the resulting repository:

My observations from the initial post fully apply to this repository. None of the files in in the windows client’s snapshot are accessible through the samba share.