Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
dar backup query
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
flatmodel
n00b
n00b


Joined: 01 Mar 2013
Posts: 26
Location: UK

PostPosted: Wed Jan 14, 2015 10:29 pm    Post subject: dar backup query Reply with quote

Hi,

I'm playing with dar with the objective of getting it to be my standard backup tool.

The systems I propose to use dar on are all LVM based systems, which means that I can use snapshot logical volumes to create a "frozen" file system. I realise that this is not essential for using dar, but it does create a bit of a predicament...

Suppose I have a file system mounted on /mnt/snapshot, and this is in fact a duplicate of my accustomed root file system [ / ]. It appears that dar insists on saving everything relative to the actual (real) root, rather than relative to the working directory ( /mnt/snapshot in this instance).

If I use this:-

Code:
dar -v -c /mnt/Backup/Fullbackup -R /mnt/snapshot


Everything in the backup is prefixed by /mnt/snapshot, so I end-up with /mnt/snapshot/sbin/blah, /mnt/snapshot/bin/blahblah

Comparing with tar: the accustomed tar's behaviour is to always tear-off the leading slash so that you end-up with a relative path rather than an absolute path, and at restore time one can use tar's -C option to define the root if it isn't the working directory.

I suppose the question is, can I get dar to use relative paths rather than absolute paths? Or, is there another way of tackling this?

I can use bind mounts and ugly workarounds like that, but maybe a user more accustomed to dar can offer some advice? For example, I have done a chroot to /mnt/snapshot and then used the above dar command without the -R option and it has produced what I want, but it's a convoluted way of doing things.

Thanks in anticipation!
_________________
Richard
Back to top
View user's profile Send private message
wjb
l33t
l33t


Joined: 10 Jul 2005
Posts: 605
Location: Fife, Scotland

PostPosted: Thu Jan 15, 2015 1:03 am    Post subject: Reply with quote

I use "-R /" and the filenames I see in the listing of the contents are relative to "/", e.g. lib32/libncurses.so.5

What do the first few lines of this look like:
Code:
dar -l /mnt/Backup/Fullbackup
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum