Hey,
I just switched to restic and am trying to sent it up with SFTP, in general I’m trying to backup a cloud server (running Ubuntu) to my local NAS (Synology). Right now I can log in via SSH from my cloud server into my local NAS via ssh keys and everything is working as expected.
My problem is that I set up a new SFTP repository like this, set the password and it all seemed good.
restic -r sftp:user@user.example.com:/volume1/Archive/backup-remote/backup-2019 init --verbose
When I do the backup like:
restic -r sftp:user@user.example.com:/volume1/Archive/backup-remote/backup-2019 backup --files-from /home/ubuntu/.config/restic/includes --exclude-file=/home/ubuntu/.config/restic/excludes --verbose
It runs through as expected:
restic -r sftp:user@user.example.com:/volume1/Archive/backup-remote/backup-2019 backup --files-from /home/ubuntu/.config/restic/includes --exclude-file=/home/ubuntu/.config/restic/excludes --verbose
open repository
enter password for repository:
repository 57eff208 opened successfully, password is correct
lock repository
load index files
using parent snapshot a2c559ad
start scan on [/etc]
start backup on [/etc]
[snip]
Files: 0 new, 0 changed, 1311 unmodified
Dirs: 0 new, 0 changed, 0 unmodified
Data Blobs: 0 new
Tree Blobs: 1 new
Added to the repo: 352 B
processed 1311 files, 2.752 MiB in 0:02
snapshot 153ffe86 saved
But when I’m checking my NAS the directory I set up the repository it’s empty, so even though the initial setup worked it didn’t create any config directory or set up the repository it seems. It also didn’t give me any errors.
What I tried:
- Create a new repository
Fatal: create repository at sftp:user@user.example.com:/volume1/Archive/backup-remote/backup-2019 failed: config file already exists
Why does it say it exists when it actually doesn’t? How can I remove the config file? Why does the setup of the repository work when there’s nothing in the remote repository?
- List blogs in repository
To try if my repository works I tried listing the blobs, which worked:
restic -r sftp:user@user.example.com:/volume1/Archive/backup-remote/backup-2019 list blobs
enter password for repository:
repository 57eff208 opened successfully, password is correct
data 64ced10406ec4dac5ebacbfa966dc20de42b748bef7511aec405d4559f77602e
[snip]
I’m very confusing where it gets this data from when the repository is not on the remote server
Thankful for any pointers!