Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0.12.0 errors with sshfs mounts inside a backup path #3291

Closed
funnelfiasco opened this issue Feb 19, 2021 · 2 comments
Closed

0.12.0 errors with sshfs mounts inside a backup path #3291

funnelfiasco opened this issue Feb 19, 2021 · 2 comments

Comments

@funnelfiasco
Copy link

Output of restic version

restic 0.12.0 compiled with go1.15.8 on linux/amd64

How did you run restic exactly?

via systemd service: /usr/bin/restic backup --verbose --one-file-system --tag systemd.timer $BACKUP_EXCLUDES $BACKUP_PATHS

  • BACKUP_EXCLUDES="--exclude-if-present .nobackup"
  • BACKUP_PATHS="/home /etc/ansible /data/mediaserver /data/shared /data/web /data/weewx"

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

local ext4 filesystem and backblaze b2

Expected behavior

Skip sshfs filesystem mounted at /home/bcotton/ff-web/dav
(don't let the directory name distract you, I no longer dav mount it, I'm just too lazy to mv the mountpoint 😄 )

Actual behavior

backup gives error. It appears to successfully create the backup, but the return code makes systemd think it failed.

repository 2a5d1306 opened successfully, password is correct
found 1 old cache directories in /root/.cache/restic, run `restic cache --cleanup` to remove them
lock repository  
load index files 
using parent snapshot 4ee93653
start scan on [/home /etc/ansible /data/mediaserver /data/shared /data/web /data/weewx]
start backup on [/home /etc/ansible /data/mediaserver /data/shared /data/web /data/weewx]
scan: lstat /home/bcotton/ff-web/dav: permission denied
scan finished in 28.952s: 338151 files, 527.566 GiB
error: lstat /home/bcotton/ff-web/dav: permission denied

Steps to reproduce the behavior

Upgrade from restic 0.9.6 compiled with go1.14 on linux/amd64 (most recent version in Fedora 33 repos) which behaved as expected.

Do you have any idea what may have caused this?

It may be the same issue as #2659, but it seemed different enough that I thought I should file a new issue.

Do you have an idea how to solve the issue?

No, but explicitly excluding the sshfs mountpoint yields the expected behavior. I don't have other sshfs mounts generally, so it's not a huge concern for me, especially with the workaround.

Did restic help you today? Did it make you happy in any way?

I love how easy it was for me to configure restic backups to a local disk and a remote repository. Thankfully, I've only needed the backups once, but I'm glad I have it. Thanks!

@dimejo
Copy link
Contributor

dimejo commented Feb 20, 2021

Starting with restic v0.10.0 (PR #2546), error handling is now improved and outputs a different exit code when a backup does not complete successful (e.g. lack of permissions for files).

@MichaelEischer
Copy link
Member

The proper solution is to also explicitly exclude the sshfs mount from the backup. Then restic won't complain.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants