How to backup to samba repository?


I have created the initial backup to repository on external disk. Then I copied the repository to smb NAS. I am struggling with access to NAS repository. How should I properly format the command “restic snapshots -r smb://”? This syntax does not work. Thank you



Just mount your NAS share, for example:

sudo mount // /mnt
restic -r /mnt/Restic backup /...
1 Like


Personally, I don’t trust Samba for other than sharing files/documents. I have always use Samba for sharing and works great, but for restic you should be better using the sftp backend. If you can setup ssh (and use passwordless key for automation) in your NAS and don’t want to mount the smb share every time you want to use restic, sftp could be better for you and the syntax would be as you pointed: restic -r sftp:user@ That way you don’t have to mount anything. Otherwise, you should do what @sniner suggest.

1 Like


Solved. Neither the recommended smb/cifs or sftp worked. But I was able to install nfs by:
sudo apt-get install nfs-common

, configured NFS on server and then I mounted:
sudo mount -t nfs /mnt
(I use My Book World and it directs that nfs share should be accessed as …/nfs/share )
Then the repository appeared at /mnt/Restic and I could run backup.