It took too long backup a few files via SMB. The log shows:
[16.12.2025 23:44:31] - Error copying /home/user/folder/, retrying with root…
[16.12.2025 23:51:14] - Copying /home/user/folder/ with root successful
A: The cause: --copy-links and “ghost files”
find -type f counts only real files that physically exist. By default, it ignores symbolic links (symlinks) pointing to other folders.
However, BmuS has a special setting for CIFS mode that changes this behavior.
RSYNC_OPTIONS+=" ... --copy-links ..."
The --copy-links option forces rsync to follow symlinks and copy the contents of the target as if they were real files on the Desktop.
The scenario: There is likely a symlink to a location that:
- Contains a very large number of files (e.g., a symlink to the root
/, /var/log, or even the home directory itself → recursion loop).
- Or points to a network target that is slow/unreachable.
What happens:
find sees the symlink, says “not a file,” and does not count it → result: 40 files.
rsync (as non root user) sees the symlink, follows it (because of --copy-links), and starts scanning thousands of files in the target.
- After 8.5 minutes in this example, non root user
pi (or whatever it is) hits a file in the target they cannot read → abort (error).
- The script retries as
root.
root can read everything, so it scans the linked folder successfully (but slowly, ~6.5 minutes), realizes “everything is already there” (or deduplicates it), and reports success.
Solution 1
We need to identify which symlink is causing the problem.
Step 1: Check for symlinks
Run this command to list all symlinks on the Desktop:
ls -la /home/user/folder | grep "^l"
(The l at the beginning of the line indicates a link/symlink.)
Look for symlinks pointing to system-critical folders (like /, /usr, /var) or to the backup drive itself (/mnt/...).
Step 2: Fix it
You have two options:
Option A (Clean): Delete the problematic symlink from the Desktop or move it to a folder that is not being backed up.
Option B (Configuration): Switch bmus.conf to NFS mode (NAS_MOUNT_MODE="nfs").
Why this helps: In NFS mode, your script (according to code analysis) does not use --copy-links. rsync would then simply copy the link itself (takes milliseconds) instead of following it.
Summary: Your backup is not really “stuck.” It is working hard to scan the contents of a folder that shouldn’t actually be on the Desktop but is “virtually” included through a symlink. Once you identify this symlink, the Desktop backup will complete in under 5 seconds.
Solution 2
If the cause are not symlinks and that there are only a few small files—which still take minutes—points to a deeper issue with the network protocol.
If we can rule out symlinks, the only logical explanation for this extreme delay (~10 seconds per file) is timeouts.
BmuS attempts to set or read certain file attributes (timestamps, permissions) on the NAS for each file. The NAS (or the protocol) does not respond quickly enough, causing rsync to wait for a timeout, retry, and then continue.
Steps to fix this:
1. Switch protocol (strongly recommended)
The currently used protocol cifs_simple is often a bottleneck for Linux-to-Linux backups (Linux / Pi to NAS) and prone to permission issues.
Change the mount mode in your bmus.conf.
Option A: NFS (Best solution)
If your NAS supports NFS (easily enabled on Synology/QNAP), use it. It is much faster and does not have these permission/timeout issues.
# In bmus.conf
NAS_MOUNT_MODE="nfs"
# If not set yet, specify the NFS path (example for Synology):
NAS_SHARE_NFS="/volume1/Backup"
(You can find the exact path on the NAS or with showmount -e 192.xxx.xxx.xxx on your Master (Linux/Pi).
Option B: CIFS Optimized (Fast alternative)
If you want to stay with SMB/CIFS, use the optimized mode. This disables certain checks (noserverino) that often slow down rsync.
# In bmus.conf
NAS_MOUNT_MODE="cifs_optimized"
2. Diagnosis (Optional)
To confirm that timeouts are the cause, you can run this once on your system after a backup:
dmesg | tail -n 20
If you see red messages like CIFS VFS: Server not responding or Send error in Setattr, this confirms the timeout theory.
Summary: Your folder is fine. The “bottleneck” is the cifs_simple connection. Switching to cifs_optimized or, better, nfs will allow this folder to be backed up in seconds.