Results 1 to 5 of 5

Thread: Grsync and symlinks

  1. #1
    Join Date
    Jan 2008
    Location
    queensland, australia
    Beans
    88
    Distro
    Ubuntu 13.04 Raring Ringtail

    Grsync and symlinks

    I have a problem backing up my Home folder. This is a separate partition on a SSD and contains all the hidden files and a single symlink to a HDD mounted at /mnt/data. The symlink is
    Code:
    ln -s /mnt/data/bill /home/bill/data
    .

    I wish to backup Home to a second HDD at /mnt/data1 using Grsync. Using the standard options I performed a dry run (-r-n-t-x-v) and the output shows all the hidden files/folders and ignores the symlink as expected. I have looked at the rsync man page and this indicates I should add the -L option which I duly added to the 'Additional Options' window of Grsync. Running this only adds the folder data/ to the output, not all the folders and files within. It's as if the recursion doesn't work over a symlink.

    What am I doing wrong?

  2. #2
    Join Date
    Feb 2009
    Location
    Dallas, TX
    Beans
    6,604
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Grsync and symlinks

    Hi habana.

    There is some conflict with -x and -L.

    -x won't allow to follow the symlinks if they are on another filesystem.

    If I were you, I'd remove -x, and use excluding rules (--exclude) to avoid crossing file systems (e.g. ~/.gvfs).

    Hope that helps,
    Regards.

  3. #3
    Join Date
    Jan 2008
    Location
    queensland, australia
    Beans
    88
    Distro
    Ubuntu 13.04 Raring Ringtail

    Re: Grsync and symlinks

    Hi papibe

    Thanks for your response. I've looked at the rsync man page and I can see how --exclude works. What I don't understand is what is meant by crossing file systems. Surely, everything under / (e.g. /home, /mnt/data) is part of the same file system? However, you must be right as I tried a dry run with -x removed and a number of circular references related to .wine appeared. Once I excluded .wine, I got the result I required

    Thanks very much for this, I shall mark it as solved

    Regards
    Bill

  4. #4
    Join Date
    Feb 2009
    Location
    Dallas, TX
    Beans
    6,604
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Grsync and symlinks

    Well, the term 'filesystem' can be ambiguous.

    For rsync means, partition, or mount point.

    I assume your /home partition is in different partition than /. In this case, the option -x won't allow rsync to go into /home/bill/data because it points to another partition.

    Does that clarify things a little bit?

    Kind Regards.

  5. #5
    Join Date
    Jan 2008
    Location
    queensland, australia
    Beans
    88
    Distro
    Ubuntu 13.04 Raring Ringtail

    Re: Grsync and symlinks

    Hi papibe

    Yes, that clears it up completely.

    Many thanks and regards
    Bill

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •