sshfs backup duplicates network traffic?
-
I am configuring my backup to use sshfs and noticed this while it was running:
Copying /mnt/cloudronbackup/snapshot/mail.tar.gz to /mnt/cloudronbackup/2025-07-27-215345-102/mail_v8.3.2.tar.gz
On the remote server I can see the
snapshot
and timestamped directory (e.g.2025-07-27-215345-102
) while the backup is running.Based on the network traffic, it seems that while it is moving each file from
snapshot
to the timestamped directory, it is literally usingcopy
, which means the file has to make another round trip. If I'm not mistaken, this means the network usage for this backup will be 3x the size of the file.It seems like this is happening:
- Cloudron makes an archive
- Cloudron sends this file to the
snapshot
folder - Cloudron receives the file back again (part of copy)
- Cloudron sends the file again to the timestamped folder (part of copy)
Wouldn't it be much more efficient (and faster) to issue a
mv
command to move the file rather than have a round trip?Also, it seems like another side effect is the snapshot folder keeps the files there until the next run - requiring 2x the space for the backup.
-
Hello @djxx
With this commit https://git.cloudron.io/platform/box/-/commit/d122ece8e9afb9d6209057fe35e2056c11e90061Attempt server side copy on sshfs via ssh exec
Was introduced and after that enhanced with:
https://git.cloudron.io/platform/box/-/commit/44678cf5f128d8d43e02076b40a1a32bd29c29a1sshfs: if remote copy fails, fallback to sshfs based copy
So, sshfs tries to issue a remote copy command but falls back to sshfs based copy if it fails for some reason.
What is your provider for sshfs? Most people here use Hetzner Storage Boxes.
-
Hello @djxx
With this commit https://git.cloudron.io/platform/box/-/commit/d122ece8e9afb9d6209057fe35e2056c11e90061Attempt server side copy on sshfs via ssh exec
Was introduced and after that enhanced with:
https://git.cloudron.io/platform/box/-/commit/44678cf5f128d8d43e02076b40a1a32bd29c29a1sshfs: if remote copy fails, fallback to sshfs based copy
So, sshfs tries to issue a remote copy command but falls back to sshfs based copy if it fails for some reason.
What is your provider for sshfs? Most people here use Hetzner Storage Boxes.
@james said in sshfs backup duplicates network traffic?:
So, sshfs tries to issue a remote copy command but falls back to sshfs based copy if it fails for some reason.
What is your provider for sshfs? Most people here use Hetzner Storage Boxes.
I'm my own provider
I'm just using a standard SSH install on proxmox, and the files are stored on a ZFS cluster. I don't know of anything that would stop the copy command from working; what can I do to check / troubleshoot this?