Backup NAS via sftp: SSH_FX_FAILURE

What is the problem you are having with rclone?

A rclone backup to my QNAP NAS (done via sftp) works perfectly well, until it gets towards the end of the backup. Then I got a ton of errors (693.480 to be exact) and when I took a look in the logs, it said these errors: SSH_FX_FAILURE and Move mkParentDir failed. Possibly more, this is what I observed as a code newbie. I already read that ssh-fx-failure can be super vague, so I try to submit as much information as possible.

Run the command 'rclone version' and share the full output of the command.

rclone v1.61.1

  • os/version: darwin 12.6.3 (64 bit)
  • os/kernel: 21.6.0 (x86_64)
  • os/type: darwin
  • os/arch: amd64
  • go/version: go1.19.4
  • go/linking: dynamic
  • go/tags: none

Which cloud storage system are you using? (eg Google Drive)

sftp and crypt (to QNAP NAS)

The command you were trying to run (eg rclone copy /tmp remote:tmp)

#!/bin/bash

# Terminal-Benachrichtigung senden, dass das Backup gestartet wurde
osascript -e "display notification \"Das Backup wurde gestartet.\" with title \"Archive (NAS)\""

# Backup mit rclone durchführen
rclone sync -P -u -vv /Volumes/Archive/ nas-encrypted:/Archive\ \(NAS\ Backup\)/ --transfers=4 --create-empty-src-dirs --filter-from /Users/user/Library/Mobile\ Documents/com\~apple\~CloudDocs/Rclone/Filter/Filter\ –\ Archive.txt --log-file /Users/user/Library/Mobile\ Documents/com\~apple\~CloudDocs/Rclone/Logs/Log\ –\ Archive\ \(NAS\ Backup\).log --backup-dir=nas-encrypted:/Archive/JH\ Archive\ \(NAS\ Backup\)/ --config="/Users/user/Library/Mobile Documents/com~apple~CloudDocs/Rclone/rclone.conf" --dump bodies --retries 1 --low-level-retries 1

# Überprüfen, ob das Backup erfolgreich war
if [ $? -eq 0 ]; then
w
  # Terminal-Benachrichtigung senden, dass das Backup erfolgreich war
  osascript -e "display notification \"Das Backup wurde erfolgreich abgeschlossen.\" with title \"Archive (NAS)\""
else
  # Terminal-Benachrichtigung senden, dass das Backup fehlgeschlagen ist
  osascript -e "display notification \"Das Backup ist fehlgeschlagen.\" with title \"Archive (NAS)\""
fi

The rclone config contents with secrets removed.

[nas-encrypted]
type = crypt
remote = nas:/share/
filename_encryption = off
directory_name_encryption = false
password = n/a
password2 = n/a

[nas]
type = sftp
host = 192.168.178.45
user = admin
pass = n/a
md5sum_command = md5sum
sha1sum_command = sha1sum
shell_type = unix

A log from the command with the -vv flag

Errors-excerpt from the log file:

As I had almost 700k errors, I just added the last lines to the text file. When I start the backup, everything still works, just at the end things come up, so here's also my filter used for this backup, maybe that helps:

I read a lot, but could not solve the issue, maybe you have some ideas. Thanks a ton in advance. Looking forward to hear your thoughts, guys.

Something weird is going on

ERROR : JH Data Archive/2 Personal/2 Personal Films/Miscellaneous Projects.fcpbundle/.fcpcache/.fcpcache/.fcpcache/.fcpcache/.fcpcache/.fcpcache/.fcpcache/.fcpcache/.fcpcache/.fcpcache/.fcpcache/.fcpcache/003 Dan Mace Collab Pitch/Render Files/Thumbnail Media/96BB6D92BA53F3B543FEC0BC4435A027/Info.plist: Couldn't move: Move mkParentDir failed: mkdir "/share/Archive/JH Archive (NAS Backup)/JH Data Archive/2 Personal/2 Personal Films/Miscellaneous Projects.fcpbundle/.fcpcache/.fcpcache/.fcpcache/.fcpcache/.fcpcache/.fcpcache/.fcpcache/.fcpcache/.fcpcache/.fcpcache/.fcpcache/.fcpcache/003 Dan Mace Collab Pitch/Render Files/Thumbnail Media/96BB6D92BA53F3B543FEC0BC4435A027

That repeated .fcpcache/.fcpcache/.fcpcache/.fcpcache/.fcpcache/.fcpcache/.fcpcache is very odd is there a symlink loop or a file system loop (caused by mount bind)? Can you investigate this file JH Data Archive/2 Personal/2 Personal Films/Miscellaneous Projects.fcpbundle/.fcpcache - what is it? is it a symlink?

This is indeed weird, I can't find this .fcpcache-folder on my hard drive, even with invisible files turned on. – It must be a sym link as the cache folder from the editing software is somewhere else.

Should I exclude .fcpcache via filter or skip links via the rclone command? Or doesn't matter?

The fact it is called .fcpcache probably means it isn't important for a backup.

Try adding --exclude ".fcpcache/" and see if that helps.

1 Like

Wow. This almost solved the issue. The errors got stripped down from almost 700k to 500. These errors mostly contain "Couldn't move into backup dir: Move Rename failed: sftp: "Failure" (SSH_FX_FAILURE)" and are having fonts, zips, all kind of data formats.
I'm attaching a small excerpt of the log here: Create a new version of paste: - Pastebin.com

Kinda confused here. I am doing the exact same backup with the exact filter settings to Google Drive and have zero errors. Do you have an idea what's the bug with the remaining errors?

That error occurs when rclone is moving an updated or deleted file into the --backup-dir

You are using --backup-dir=nas-encrypted:/Archive/JH\ Archive\ \(NAS\ Backup\)/ - does this path exist and is it writable? Try rclone copy a file into that path to make sure it works.

This worked. Learned a lot from you help, in future I better know what to take care of. Thanks!

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.