Symlinks are being destroyed during rsync-backup to a cifs mount

Hey forum,
I set up a Seafile 7.0.5-server on my Raspberry Pi 3B the MySQL way. To back it up, I created a simple script, that mounts my cifs drive, backs everything up like mentioned in the manual (I’m not allowed to post links) and unmounts it again. While backing up, I noticed some rsync-errors. Is that a risk of having a broken backup?

rsync: symlink "/home/seafile/backup/data/seafile/seafile-server-latest" -> "seafile-server-7.0.5" failed: Permission denied (13)
rsync: symlink "/home/seafile/backup/data/seafile/seafile-server-7.0.5/seafile/lib/libccnet.so" -> "libccnet.so.0.0.0" failed: Permission denied (13)
rsync: symlink "/home/seafile/backup/data/seafile/seafile-server-7.0.5/seafile/lib/libccnet.so.0" -> "libccnet.so.0.0.0" failed: Permission denied (13)
rsync: symlink "/home/seafile/backup/data/seafile/seafile-server-7.0.5/seafile/lib/libsearpc.so" -> "libsearpc.so.1.0.2" failed: Permission denied (13)
rsync: symlink "/home/seafile/backup/data/seafile/seafile-server-7.0.5/seafile/lib/libsearpc.so.1" -> "libsearpc.so.1.0.2" failed: Permission denied (13)
rsync: symlink "/home/seafile/backup/data/seafile/seafile-server-7.0.5/seahub/media/avatars" -> "../../../seahub-data/avatars" failed: Permission denied (13)
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1207) [sender=3.1.3]

In case it’s import, here my backup-script.

DATE=$(date +"%Y-%m-%d-%H-%M-%S")

echo "$DATE > Started backup"

mount backup

echo "$DATE > Backing up databases"
mysqldump -h 127.0.0.1 -useafile -p[password] --opt ccnet_db > ./backup/databases/ccnet_db.sql.$DATE
mysqldump -h 127.0.0.1 -useafile -p[password] --opt seafile_db > ./backup/databases/seafile_db.sql.$DATE
mysqldump -h 127.0.0.1 -useafile -p[password] --opt seahub_db > ./backup/databases/seahub_db.sql.$DATE
echo "$DATE > Backed up databases"

echo "$DATE > Backing up data"
rsync -a /opt/seafile ./backup/data
echo "$DATE > Backed up data"

echo "$DATE > Backed up" > ./backup/log.txt

umount backup 

`

Try using rsync -avh --stats. If I remember correctly this what I have been using for years without problems.
This also gives you a summary about speed and transferred data.
I can check later and give feedback.

I quickly embedded it into my backup script. That doesn’t seem to work, but probably not because of the command, I think it’s the cifs-protocol. What do you save your backup on?

rsync: symlink "/home/seafile/backup/data/seafile/seafile-server-latest" -> "seafile-server-7.0.5" failed: Permission denied (13)

EDIT: Also, if you’ve been using it without problems, did you try to restore it?
EDIT2: Would it make sense to shut down seafile/hub, mount the seafile-fs with seafuse and just copy out all files recursively? I mean, it wouldn’t be a restorable backup, but all my files would be there, wouldn’t they?
EDIT3: The backup just finished…

Number of files: 44,198 (reg: 38,184, dir: 6,007, link: 6, special: 1)
Number of created files: 29,288 (reg: 27,403, dir: 1,885)
Number of deleted files: 0
Number of regular files transferred: 38,184
Total file size: 37.56G bytes
Total transferred file size: 37.56G bytes
Literal data: 37.56G bytes
Matched data: 0 bytes
File list size: 1.72M
File list generation time: 0.001 seconds
File list transfer time: 0.000 seconds
Total bytes sent: 37.57G
Total bytes received: 760.38K

sent 37.57G bytes  received 760.38K bytes  4.40M bytes/sec
total size is 37.56G  speedup is 1.00
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1207) [sender=3.1.3]
2020-03-16-12-17-26 > Backed up data
umount: /home/seafile/backup: not mounted.

Notice the last line. How is this possible. I mean, it should’ve transferred everything, but if it wasn’t mounted… Also, the size of the data folder on my cifs share only has a size of 35.0 GB. That is much more than it was before, but… Not enugh, I think. I’m confused.

Thank you for your help

Solved it by enabling symlinks on my Synology Diskstation.