[lbackup-discussion] lBackup and Symbolic Links

Scott Haneda reply to this message via the mailing list
Sat Jan 23 15:42:37 NZDT 2010


On Jan 22, 2010, at 6:19 PM, Michael Williams wrote:

> I am doing yet another install of lBackup, but I wanted to do things differently this time (since the data and the OS will reside on the same volume).
> I remember reading somewhere that lBackup follows Symbolic links, so I thought I would be clever and create a folder full of symbolic links to the folders I want to backup. I tested this by creating a symbolic link using the ln -s command in the terminal. The link created ok, and it seams to work in the terminal because if you use the link as part of the cd command you end up in the right place. I then tried to get lBackup to backup the folder with the symbolic link in it to another folder on the hard drive. The backup proceeded without error but lBackup only copied what looks like an alias to the original file which is not what I was after.
> 
> Does anyone have any ideas what is happening? Should this work or did I misunderstand?
> For the record, I have compiled rsync 3.0.7 and patched according to Mike Bombich's instructions (obviously substituting the version numbers). Has anyone else had experience with this new version of rsync?

You need to make sure to use archive mode in rsyc, which is the backend that drives lBackup.  From the rsync man page:

    SYMBOLIC LINKS
        
    Three basic behaviours are possible when rsync encounters a symbolic link in
    the source directory.
    
    By default, symbolic links are not transferred at all.
    A message "skipping non-regular" file is emitted for any symlinks that exist.
    
    If --links is specified, then symlinks are recreated with the same target
    on the destination. Note that --archive implies --links.
    
    If --copy-links is specified, then symlinks are "collapsed" by copying their referent,
    rather than the symlink.

you need -a or --archive
I think there is also a shortcut that combines a number of modes to help in doing just what you want to do.  I can not remember it off the top of my head. The Carbon Copy Cloner info pages speaks of it.

Pay special attention to:
-x, --one-file-system       don't cross filesystem boundaries

That flag can bite you pretty hard if you are trying to clone an entire system, so for example:
rsync --whatever / /Volumes/second-drive/backups

You can end up in a perpetual and recursive copy, where rsync will follow whatever in in /Volumes, but loop around on itself and do it again and again.  I filled up a 1TB drive when I walked away for a few hours.  I had a few other things on the drive so I was not able to just reformat it.  It took ages to `rm` all the files.

Just make sure you use explicit paths to your Volumes, and that you exclude known locations that wrap around on themselves.

I think you may want to skip the symbolic link idea, and just call out explicitly the pats that you want to backup.  I believe that is the general idea that lBackup want you to work under.  Though I could be wrong, and hope an admin will correct me if I am.

-- 
Scott * If you contact me off list replace talklists@ with scott@ * 



More information about the lbackup-discussion mailing list