Discussion:
Treat symlinks as real files / directories
Jens Pfahl
2014-03-19 08:37:04 UTC
Permalink
Hi,

my name is Jens and I'd like to use Obnam for my backup strategy. Unfortunately,
my Backup Root is a symlink to a mounted external partition. When I backup them,
I have to use the ---no-one-file-system - option to indicate Obnam to follow
into the symlink. Obnam says it backed up all the files (there are a lot of
files!). But when I want to restore or mount the repo, I only see the symlink
which point anymore to my external partition. So I have no possibility to
restore my files.

It would be great if there is an option to treat symlinks as ordinary files /
directories like the rsync option -L( --copy-links transform symlink into
referent file/dir).


Best regards, Jens
Lars Wirzenius
2014-04-11 18:02:51 UTC
Permalink
This post might be inappropriate. Click to display it.
Valery Yundin
2014-04-11 19:21:44 UTC
Permalink
Hi,

It is a problem not only when backup root is a symbolic link, but also when
any parent directory of backup root is a symbolic link. Unless you
explicitly ask to restore a directory which is already below symlink.

That is actually the case when "--root=" option for "mount" which FUSE
plugin used to have was useful. It allowed to mount a sub-tree similar as
'restore' can restore a sub-tree.

Cheers,
Valery
Post by Lars Wirzenius
Post by Jens Pfahl
my name is Jens and I'd like to use Obnam for my backup strategy.
Unfortunately, my Backup Root is a symlink to a mounted external
partition. When I backup them, I have to use the
---no-one-file-system - option to indicate Obnam to follow into the
symlink. Obnam says it backed up all the files (there are a lot of
files!). But when I want to restore or mount the repo, I only see
the symlink which point anymore to my external partition. So I have
no possibility to restore my files.
It would be great if there is an option to treat symlinks as
ordinary files / directories like the rsync option -L( --copy-links
transform symlink into referent file/dir).
Hi, Jens,
I've now made it so that Obnam will give an error, when backing up, if
a backup root is not a directory. This is not a perfect solution for
you, but it will at least avoid the confusing situation where a backup
will work, but restoring won't.
If you change your Obnam configuration to have the backup root be the
directory the symlink points at, then you should be able to back
things up again, and also see your backed up files. This is probably
not as pretty as you'd like it, but it's what can be made to work now.
I'm afraid I'm not happy to make it so that Obnam flattens symbolic
links to what they point to, in the general case. I want Obnam to back
things up as they are, without changing them. Anything else is too
likely to cause confusion and therefore lost data.
I might be willing to treat the backup root specially, in this regard,
however. If the backup root is a symlink to a directory, then I might
be OK with treating it as that directory. Implementing that is going
to need some changes to the internals of Obnam, and it's not a high
priority item. However, if someone wants to tackle this, I'm happy to
merge the patches, and provide feedback and answer questions.
--
http://www.cafepress.com/trunktees -- geeky funny T-shirts
http://gtdfh.branchable.com/ -- GTD for hackers
_______________________________________________
obnam mailing list
http://listmaster.pepperfish.net/cgi-bin/mailman/listinfo/obnam-flarn.net
Loading...