View previous topic :: View next topic |
Author |
Message |
flatmodel n00b
Joined: 01 Mar 2013 Posts: 26 Location: UK
|
Posted: Wed Jan 14, 2015 10:29 pm Post subject: dar backup query |
|
|
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 |
|
|
wjb l33t
Joined: 10 Jul 2005 Posts: 607 Location: Fife, Scotland
|
Posted: Thu Jan 15, 2015 1:03 am Post subject: |
|
|
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 |
|
|
|
|
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
|
|