Rest Server on a VM

I’m trying to set up my first Backup with restic. I have a local NAS (XigmaNAS) with VirtualBox. I would like to run the rest server on a VM no have a OS of choise and most importen don’t destroy everything by try out new things XD
I build up a rest-server and after some confusion with the passwordfile everything works fine. I run the rest-server as a service:

Description=Rest Server

ExecStart=/usr/local/bin/rest-server --listen :7000 --private-repos --tls --tls-cert /opt/ssl/restic_public.pem --tls-key /opt/ssl/restic_private.key --path /opt/rest-server/


the given path /opt/rest-server/ is a Shared Folder and somehow this is a problem. I don’t get the exactly problem but I think it’s about permissions. The error I recive from the service is

Jun 17 20:13:49 multimedia rest-server[1262]: Creating repository directories in /opt/rest-server/karl
Jun 17 20:13:52 multimedia rest-server[1262]: ERROR: sync /opt/rest-server/karl/keys: invalid argument

and the restic init restic -r rest:https://karl:PASS@ --cacert C:/Users/info/.local/win-ca/pem/rootCA.crt init fails with the Fatal: create key in repository at rest:https://karl:***@ failed: server response unexpected: 500 Internal Server Error (500)

If I run the exactly same lines but define the --path of the service to a dir on the VM (not a shared folder) it works fine.
The shared folder is owned by the Virtualbox User, VM User rest-server is part of the vboxsf user of the VirtualBox Guest Additions.

What is restic trying to do at the point where it fails? Creating the dir of the repo and set permissions?
Any ideas what to try out?

That rather looks like the file system used by the shared folder does not support syncing to disk. The rest-server expects to be able to ask the filesystem to actually write the data to disk.

1 Like

@MichaelEischer thanks a lot for the hint. This was definitely the problem.

1 Like