BackupPC-users

Re: [BackupPC-users] Thanks!

2010-05-14 09:09:47
Subject: Re: [BackupPC-users] Thanks!
From: Bowie Bailey <Bowie_Bailey AT BUC DOT com>
To: backuppc-users AT lists.sourceforge DOT net
Date: Fri, 14 May 2010 09:07:41 -0400
B. Alexander wrote:
> I just wanted to thank Craig and the crew who wrote backuppc, since it
> saved me yet again. The hard drive in my daughter's machine died (and
> died hard, nothing was recoverable). I was able to throw another hard
> drive in it, build from a Debian CD and restore in less than 2 hours.
>
> One thing that I thought of when I was doing this (and you can also
> blame the fact that I have been working a *lot* with cfengine in the
> last 6 months) was that it would be nice if you could do "groups" or
> "categories" of directories to back up. Let me explain. In order to
> save drive space, I back up a subset of the machine, specifically
> enough to recover from a boot CD and restore from backuppc. I mainly
> run Debian boxes, so most of the directories in $Conf{RsyncShareName}
> are the same. /boot, /lib/modules, /var/lib/apt, etc. I do have boxes
> of other distros (e.g. CentOS, Fedora), and they are going to have a
> different set of base directories. However, I also find that each
> platform type has a set of directories, such as /var/www for web
> servers, /var/lib/mysql for DB servers (I know, thats a bad example, I
> have a pre-backup script that dbdumps up the db for backups), etc.
>
> Is there a way to set up variables like say ${debian_basedirs},
> ${fedora_basedirs} or ${www_dirs} in config.pl <http://config.pl>,
> then in each host, set up $Conf{RsyncShareName} = [
> ${debian_basedirs}, ${www_dirs} ]; or something similar? Is there a
> cleaner way to do something similar? That way, say something changes
> drastically like they move the files in /var/lib/apt to
> /var/lib/aptitude or something. It would be easier and far more
> reliable to change it in one place than for each host. (Obviously,
> perl is not my strong suit...)

If you are maintaining your config files from the gui, then there is no
way to do it.

If you are maintaining the config files by hand, then you can add any
kind of Perl code in there that you like.  You could add the group
definitions in the main config and then load them in the per-machine
configs almost exactly as you show in your example.  The caveat is that
once you start doing this, you cannot use the gui to make any further
changes to the configs or it will mess things up.

-- 
Bowie

------------------------------------------------------------------------------

_______________________________________________
BackupPC-users mailing list
BackupPC-users AT lists.sourceforge DOT net
List:    https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:    http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/

<Prev in Thread] Current Thread [Next in Thread>