rsync has problems with symlinks

Reference only! Archived older discussions about backup and restore of the DiskStation to any client.

rsync has problems with symlinks

Postby barghest » Thu Oct 01, 2009 7:57 pm

Hi fellow Synology community,

first some background information:
I regularly back up my / and /home from my desktop PC and my netbook to my DS107 (500GB) (if you are interested in my script you can find it here) .

On the DS are also stored other files from two windows machines

To have not only one backup I have an external USB hard drive (ext3, 640GB). I used the DSM 2.2 WebUI to set up the built in backup service. This worked for all folders except the one that contains the backup from my linux machines. It seems that the hard links weren't recognized so that the files were transferred multiple times so that the backup used way too much disk space.

I then wrote a small script inspired by my existing one and one I found in the wiki. From this time it seems that hard links weren't a problem any more due to the rsync option -H (what a pity that the -v option doesn't work for any operation on the DS to see the whole output).

The new problem seem to be the symlinks now. When running my script I receive a lot of error messages from this type:
Code: Select all
rsync: open(backup/molungus-home/2009-09-27/.local/share/icons/hicolor/48x48/mimetypes/gnome-mime-application-x-crossover-xlthtml.xpm) failed!!: No such file or directory (2)


or
Code: Select all
rsync: open(backup/molungus-home/2009-09-27/bin/cxoffice/doc/en/html/images.common) failed!!: Is a directory (21)




This affects symlinks that point to files outside the backed up folder as well as to files inside the same tree. Anyone knows what I have to improve/fix? Maybe in my script?
Code: Select all
# Backup source device/share/directory/etc
BACKUP_SOURCE=/volume1/thomas/

# Backup destination device/directory
BACKUP_TO_DEV=/volumeUSB1/usbshare/thomas_backup/

rsync -q -v -axH --no-inc-recursive --delete --exclude="@eaDir" $BACKUP_SOURCE $BACKUP_TO_DEV


The option --no-inc-recursive was inserted because it solved a problem with some links on my linux machine but it seems that it doesn't work here.

Thanks in advance

barghest
barghest
Trainee
Trainee
 
Posts: 14
Joined: Sat Dec 06, 2008 11:21 am

Re: rsync has problems with symlinks

Postby barghest » Mon Oct 05, 2009 8:54 pm

No one? :(
barghest
Trainee
Trainee
 
Posts: 14
Joined: Sat Dec 06, 2008 11:21 am

Re: rsync has problems with symlinks

Postby dignus » Mon Nov 30, 2009 8:26 am

Did you find a fix for this?
dignus
I'm New!
I'm New!
 
Posts: 1
Joined: Mon Nov 30, 2009 8:24 am

Re: rsync has problems with symlinks

Postby barghest » Mon Nov 30, 2009 10:44 am

Yes, I used ipkg to install the latest rsync version. This step was suggested in the rsync mailing list.

I then adjusted the script to use this newer version:

Code: Select all
/opt/rsync -q -v -axH --no-inc-recursive ....
barghest
Trainee
Trainee
 
Posts: 14
Joined: Sat Dec 06, 2008 11:21 am

Re: rsync has problems with symlinks

Postby vaclav.stepan » Thu Apr 01, 2010 7:54 am

I had the same problem (2.3 firmware). As far as I tested the symlinks are there and (supposedly) the messages are harmless.
I contacted the support to file a bug, after clarification of details I got the following response.

Dear Vaclav,

Thank you for your message.

After some testing, we assume the symlink would be backup correctly but rsync would always pop up errors if you use CLI. However, backup the folder contain symlink on web UI and it would successfully backup. Therefore, we suggest you to use web UI to backup symlinks. Hope this helps.

If you have further questions or suggestions, please feel free to contact Synology support again.

--
Best Regards,
-Willie He
vaclav.stepan
I'm New!
I'm New!
 
Posts: 3
Joined: Thu Apr 01, 2010 7:48 am


Return to Backup/Restore (Archived)

Who is online

Users browsing this forum: No registered users and 1 guest