Hi,
I’ve replaced my Synology with a TrueNAS build and would now like to recycle my Synology as a remote backup server.
As the Synology is used for other stuff at the remote location I want my data to be stored encrypted, thus I figured that a site-to-site Wireguard connection and a Cloud Sync Task would be ideal.
But now I ran into a problem with using Synology’s SFTP, as they somehow map paths where a local /volume1/path/to/file is only /path/to/file on the SFTP server, without the /volume1 part.
This leads to failures when trying to calculate hashes etc. during the backup:
Failed to calculate dst hash: failed to calculate md5 hash: failed to run "md5sum /path/to/file": md5sum: /path/to/file: No such file or directory: Process exited with status 1
From the TrueNAS documentation I’ve learned that Cloud Sync Tasks use rclone.
For rclone there seems to be an option to workaround this issue, they even use synology paths in their example. But I did not find a way to pass this --sftp-path-override option to rclone for a cloud sync task.
Is there any way to pass additional options to the rclone call of a cloud sync task?
Doesn’t Synology support rsync?
It would, but then my backups would not be encrypted.
The old Synology will be in by a family member, so he’ll have all rights on it. Thus I really need my data to be encrypted.
Does Synology support an S3 API interface?
Not natively, there might be options using docker, but I really would like to focus on a solution using rclone first.
When using rclone manually, with the option I can successfully create encrypted backups:
rclone rclone sync /path/to/source/ synology: --sftp-path-override @/volume1
So I’m looking for a way to configure this as a Cloud Sync Task to benefit from the scheduling and automated reporting etc.
Not that I can see…
Unless synology can fix at their end, you may have to use a manual script.
A feature Request is reasonable, but unless there’s demand, it may take a while.
I’ve found a quite simple workaround.
creating a symlink from the root to the second level of the actual part allows the commands over ssh to use the paths used over SSH.
Execute the following on the Synology:
sudo ln -s /volume1/path /path
and both SFTP and SSH will be able to use /path/to/file to access a file actually stored und /volume1/path/to/file.
I’ve still created a feature request as I believe it would be a much cleaner solution and might benefit other user and use cases Cloud Sync Tasks: Allow additonal command line parameters for rclone
Thanks a lot for your help and inputs.
2 Likes
Thanks for a clever solution… useful for others.