Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: BackupEdge + symlinks

2 views
Skip to first unread message

Microlite scomsc Account

unread,
Jan 4, 2010, 2:43:46 PM1/4/10
to Roger Cornelius
This behaviour is exactly as designed, i.e. do not follow directory symlinks. Cases can be made in either direction. We architected this behaviour into BackupEDGE because of the potential for loops, notably when a directory is symlinked to ".", as in grub.

To counter this, there is an additional flag documented for /bin/edge command line backups ONLY.

Page 24 in the Technical Refererence Manual reads as follows...
ftp://ftp.microlite.com/demos/current/docs/Technical_Reference.pdf

---
Modifiers used for Backup only

... deleted stuff...

h Archive the contents of the symbolically linked named files.
edge cv
will archive symbolic linkage information only, while
edge chv
will archive the contents.

Note that this option does not affect symlinks to directories. EDGE will not traverse a symlinked directory because of the h option, but will instead back it up as a symlink normally. If you would like EDGE to traverse symlinked directories, use -zFOLLOW_SYMDIR instead. Generally, you do not want either h or -zFOLLOW_SYMDIR unless you know exactly what you are doing.


Again. It is only available from the command line because of the loop potential.

Tom Podnar
Microlite

Note: BackupEDGE 3.0 beta is now open. Browse to our web site and click on the 3.0 link for more information.


------ Original Message ------
From: Roger Cornelius <r...@tenzing.org>
Date: Monday, December 28th, 2009 4:02 PM EST
To: distri...@registry.ca
Subject: BackupEdge + symlinks

Here's something that bit me a few weeks ago with the way BackupEdge
handles symbolic links to directories.

When you tell edge to follow symbolic links during a backup, i.e., use
the edge "h" option, or enable "Follow Symlinks" in the backup domain
in edgemenu, and a symbolic link points to a directory, the directory
entry will be backed up, but the files and directories it contains
will not.

This is not documented anywhere that I can find. Indeed, the
description of the "Follow Symlinks" setting in the "Creating Backup
Domains" section of the edge User Guide states: "In other words, if
this option is checked, the Domain treats Symbolic Links as if they
were not links.". If that's the case, then the contents of the
directory SHOULD be backed up, because that is what would happen if
the symlink were not a symlink, but a real directory.

Imagine the following directory hierarchy:

/u/somedir/photos/
/u/somedir/more-photos -> /u2/somedir/more-photos/
/u/somedir/videos/
/u/somedir/other-stuff/

/u2/somedir/more-photos/

You backup /u/somedir using edge with the "follow symlinks" option:

cd /;edge cvhf /tmp/arc.edge ./u/somedir

You might be surprised that the contents of /u2/somedir/more-photos
did not get backed up. This is a contrived example, but a legitimate
one.

I don't know whether to consider this a bug or feature, but it's
undesirable behaviour IMO. At the very least it should be clearly
spelled out in the documentation and help screens.

Noteworthy is, given the appropriate option to follow symlinks, SCO
tar, GNU tar, and pax all back up the directory which is the target of
the symlink, AND the files/directories that directory contains. To
me, this is what "follow symlinks" should do.


Roger Cornelius

unread,
Jan 6, 2010, 7:47:23 PM1/6/10
to
Top-posting reverted...


On Jan 4, 2:43 pm, Microlite scomsc Account <sco...@microlite.com>
wrote:


> This behaviour is exactly as designed, i.e. do not follow directory symlinks. Cases can be made in either direction. We architected this behaviour into BackupEDGE because of the potential for loops, notably when a directory is symlinked to ".", as in grub.
>
> To counter this, there is an additional flag documented for /bin/edge command line backups ONLY.
>

> Page 24 in the Technical Refererence Manual reads as follows...ftp://ftp.microlite.com/demos/current/docs/Technical_Reference.pdf


>
> ---
> Modifiers used for Backup only
>
> ... deleted stuff...
>
> h Archive the contents of the symbolically linked named files.
> edge cv
> will archive symbolic linkage information only, while
> edge chv
> will archive the contents.
>
> Note that this option does not affect symlinks to directories. EDGE will not traverse a symlinked directory because of the h option, but will instead back it up as a symlink normally. If you would like EDGE to traverse symlinked directories, use -zFOLLOW_SYMDIR instead. Generally, you do not want either h or -zFOLLOW_SYMDIR unless you know exactly what you are doing.
>
> Again. It is only available from the command line because of the loop potential.
>
> Tom Podnar
> Microlite
>
> Note: BackupEDGE 3.0 beta is now open. Browse to our web site and click on the 3.0 link for more information.

Thank you for pointing out what I should have read for myself. Note
that your support department, who I contacted initially on 11/25/09,
does not seem to know about -zFOLLOW_SYMDIR as they never mentioned
it in response to my support requests regarding the issue.

I don't understand why the -zFOLLOW_SYMDIR functionality could not be
made available within edgemenu and still contend that the behaviour
(of not archiving a symlink'd dir's contents) should be clearly
documented everywhere the follow-symlink related options are
described, in the manual or on a help screen.

Microlite scomsc Account

unread,
Jan 12, 2010, 5:19:46 PM1/12/10
to Roger Cornelius
Top-posting reverted...

- Thank you for pointing out what I should have read for myself. Note
- that your support department, who I contacted initially on 11/25/09,
- does not seem to know about -zFOLLOW_SYMDIR as they never mentioned
- it in response to my support requests regarding the issue.

Support wasn't alone. It's obscure enough that we had an engineer look in the source code to find it, then figure out why it neeeded to be there in the first place, then teach the rest of us the reason for having it and the potential consequences of using it.

- I don't understand why the -zFOLLOW_SYMDIR functionality could not be
- made available within edgemenu and still contend that the behaviour
- (of not archiving a symlink'd dir's contents) should be clearly
- documented everywhere the follow-symlink related options are
- described, in the manual or on a help screen.

It's never been done before simply because no one, to my knowledge, has ever asked. It COULD be added, and is now on the todo chart for a future release. I agree that it should be better documented, and it will be in the future.

Tom Podnar
Microlite

0 new messages