Bacula-users

Re: [Bacula-users] Backing up lvm snapshots?

2011-09-19 04:37:52
Subject: Re: [Bacula-users] Backing up lvm snapshots?
From: Konstantin Khomoutov <flatworm AT users.sourceforge DOT net>
To: Tobias Schenk <tobias AT die-schenks DOT net>
Date: Mon, 19 Sep 2011 12:35:21 +0400
On Sun, 18 Sep 2011 17:47:34 +0200
Tobias Schenk <tobias AT die-schenks DOT net> wrote:

> I try use bacula 5.0.3 on suse linux to backup lvm snapshots.
> Basically, I create a lvm snapshot called /dev/vmguests/backup using
> the RunScript directive. Unfortunately, this is a sym link
> to /dev/dm-6. I cannot be sure it is always dm-6. I would like to
> follow the sym link and backup /dev/dm-6 as raw device.
> 
> The hints I found while googling are are not working (like
> appending /. to the File directive) or obscure (like using bash
> scripting to resolve File names).
> I cannot simply mount /dev/dm-6 to somewhere because the contents is
> a partitioned raw device of a kvm instance.
> Maybe it is possible resolve the link using a bash script in the file 
> directive
You can use the `readlink` command to resolve the symlink.

> but I have not found information about when the File
> directive will be evaluated relative to RunScript.
> 
> Has anyone a working solution for lvm snapshots?
> 
> The Job currently looks very plainly like this:
> 
> FileSet {
>    Name = FsVMMyDms   # Adjust to VM
>    Include {
>      Options {
>        compression = GZIP
>        signature = SHA1
>        sparse = yes
>      }
>      File = /dev/vmguests/backup
>    }
> }
You can try to use something like

File = "| readlink /dev/vmguests/backup"

to dynamically read that file containing the real device name.

------------------------------------------------------------------------------
BlackBerry&reg; DevCon Americas, Oct. 18-20, San Francisco, CA
Learn about the latest advances in developing for the 
BlackBerry&reg; mobile platform with sessions, labs & more.
See new tools and technologies. Register for BlackBerry&reg; DevCon today!
http://p.sf.net/sfu/rim-devcon-copy1 
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users