Since the last update I get the "operation not supported" error

Good Morning everybody,
I updated my restic to the latest version when it came out, since then I get the following errors with every command:

open repository
lock repository
Save(<lock/44931584af>) returned error, retrying after 552.330144ms: open /mnt/backup/locks/44931584af7bfb19ff8c7b2652c3ae1b0ef17f4bc3c4bb6165cf4bdf11610313-tmp-3781515316: operation not supported

Even the restic -r /mnt/backup check command fails with the error above.

If I try to run the command with the flag --no-lock it works.

Any body know how to fix this?

Regards,

First, you need to tell us:

  • Which restic version do you use currently (run restic version)?
  • Which was the latest restic version that worked?
  • What is mounted at /mnt/backup? Which filesystem does it use? (run findmnt /mnt/backup and paste the output)

Hey,

thanks for your quick reply:

Here are the infos you asked for:
Version: restic 0.13.1 compiled with go1.18 on linux/amd64
Previous Version: restic 0.12.1
findmnt output: /mnt/backup curlftpfs#ftp://***:***@backup.***.**/ fuse rw,nosuid,nodev,relatime,user_id=0,group_id=0

I suspect that this is caused by curlftpfs not supporting the sync() syscall, which should ensure that data is really written to the backend. A similar issue is documented here:

We have a list of cases in which restic just ignores the error returned by sync(), and it seems we need to extend this list quite a bit.

Are you able to build restic yourself? Can you please build and test it with the patch from the issue?

I’ll try this in a few days. Thank you.

1 Like

Errhh, that error is not returned by sync. It is returned by open and that is only called within ioutil.TempFile using O_RDWR|O_CREATE|O_EXCL as flags. Previously, in restic 0.12.1 os.O_CREATE|os.O_EXCL|os.O_WRONLY was used. So unless we want to reimplement the temp file creation there’s not much we can fix here.

@JohKa is there a particular reason to use curlftpfs instead of using rclone to access the ftp repository?

Oh, yeah, you’re right! Sorry about the confusion.

I’m sorry to answer so late.

I was not able to build restic by my own. So I tried to use rclone for mounting instead.

But every time I get the following error which seems to be rclone related but maybe you have an idea:
Save(<data/a06ed4ce05>) returned error, retrying after 552.330144ms: open /mnt/backup/data/a0/a06ed4ce05b52471ba21a7d32504987165ff0edc33436411c39e03b8931f2e66-tmp-1134479176: input/output error

What was the problem with building restic?

That error looks like you’re not using rclone at all but rather the local backend. What is the exact command line you’re using?

It ist just a time problem no functional problem.

# /etc/systemd/system/rclone-backup.service
[Unit]
Description=Backup (rclone)
AssertPathIsDirectory=/mnt/backup
#After=plexdrive.service

[Service]
Type=simple
ExecStart=/usr/bin/rclone mount \
    --config=/root/.config/rclone/rclone.conf \
    --allow-other \
    --dir-perms 0777 \
#  --file-perms 0666 \
#  --cache-tmp-upload-path=/tmp/rclone/upload \
#  --cache-chunk-path=/tmp/rclone/chunks \
#  --cache-workers=8 \
#  --cache-writes \
#  --cache-dir=/tmp/rclone/vfs \
#  --cache-db-path=/tmp/rclone/db \
#  --no-modtime \
#  --drive-use-trash \
#  --stats=0 \
#  --checkers=16 \
#  --bwlimit=40M \
#  --dir-cache-time=60m \
#  --cache-info-age=60m \
    -vvv \
    "Backupspace": /mnt/backup/

ExecStop=/bin/fusermount -u /mnt/backup
Restart=always
RestartSec=10

[Install]
WantedBy=default.target

I also tried it with the commented out configs but it changed nothing in the behaviour.
and the rclone Backend configuration:

[Backupspace]
type = ftp
host = backup.XXXX.net
user = XXX
pass = XXX

I’d strongly recommend to let restic interact with rclone directly without the indirection of a fuse mount:

restic -o rclone.args="serve restic --stdio --b2-hard-delete --config=/root/.config/rclone/rclone.conf" -r rclone:Backupspace: [...]

I tried this in my script with:

RESTIC_ARGS='-o rclone.args="serve restic --stdio --b2-hard-delete --config=/root/.config/rclone/rclone.conf" -r rclone:Backupspace:'

and commands like this

restic $RESTIC_ARGS backup --verbose -one-file-system --tag "mail" --tag "files" /var/vmail/

but I’m getting the following error:

unknown command "restic" for "restic"

And with executing the command directly in the shell I get the following error:

ERROR : data/9a/9a346f9fa177a9174fcde91382c11c4ec6f14780160384fe82953d8e55637b45: Post request put error: Put mkParentDir failed: mkdir "data/9a" failed: EOF

rclone: 2022/06/12 13:08:54 ERROR : data: error listing: EOF
rclone: 2022/06/12 13:08:54 ERROR : data: list failed: &errors.errorString{s:"EOF"} *errors.errorString
List(data) returned error, retrying after 720.254544ms: List failed, server response: 404 Not Found (404)
rclone: 2022/06/12 13:08:55 ERROR : data: error listing: EOF
rclone: 2022/06/12 13:08:55 ERROR : data: list failed: &errors.errorString{s:"EOF"} *errors.errorString
List(data) returned error, retrying after 873.42004ms: List failed, server response: 404 Not Found (404)
List(data) returned error, retrying after 1.054928461s: List failed, server response: 404 Not Found (404)
rclone: 2022/06/12 13:08:55 ERROR : data: error listing: EOF
rclone: 2022/06/12 13:08:55 ERROR : data: list failed: &errors.errorString{s:"EOF"} *errors.errorString
rclone: 2022/06/12 13:08:56 ERROR : data: error listing: EOF
rclone: 2022/06/12 13:08:56 ERROR : data: list failed: &errors.errorString{s:"EOF"} *errors.errorString
List(data) returned error, retrying after 1.560325776s: List failed, server response: 404 Not Found (404)
List(data) returned error, retrying after 3.004145903s: List failed, server response: 404 Not Found (404)
rclone: 2022/06/12 13:08:58 ERROR : data: error listing: EOF
rclone: 2022/06/12 13:08:58 ERROR : data: list failed: &errors.errorString{s:"EOF"} *errors.errorString

rclone: 2022/06/12 13:14:08 ERROR : locks/b6c9370156c9425e0dbf817440a4f41ba9bfc16d96c9661f1a9105ebe57ab280: Post request put error: Put mkParentDir failed: mkdir "locks" failed: write tcp 5.189.139.153:47120->213.136.95.26:21: write: broken pipe
rclone: 2022/06/12 13:14:08 ERROR : locks/b6c9370156c9425e0dbf817440a4f41ba9bfc16d96c9661f1a9105ebe57ab280: Post request rcat error: Put mkParentDir failed: mkdir "locks" failed: write tcp 5.189.139.153:47120->213.136.95.26:21: write: broken pipe
Save(<lock/b6c9370156>) returned error, retrying after 720.254544ms: server response unexpected: 500 Internal Server Error (500)

That means that the quoting for $RESTIC_ARGS is incorrect. RESTIC_ARGS='-o rclone.args=serve\ restic\ --stdio\ --b2-hard-delete\ --config=/root/.config/rclone/rclone.conf -r rclone:Backupspace:' might work.

The other error log looks like rclone failed somewhere before the log excerpt.