Discussion:
[BackupPC-users] Configure TopDir per pc
Mark Adams
2008-12-03 23:39:35 UTC
Permalink
Hi there, me again.

I have several machines I would like to backup with BackupPC, but the
server is a humble box with several installed hard discs -- nothing fancy.

I need to backup each client machine to a different hard drive on the
server. I have one client configured and it tries to backup my 16 GB of
data, but fails because TopDir is configured for /var/lib/bacuppc in my
/etc/backuppc/config.pl file and there simply isn't enough room for the
data there. My reading of the docs says that I should be able to
configure TopDir in the client.pl file under
/var/lib/backuppc/pc/<client>/<client>.pl. I have done this:

# cat /var/lib/backuppc/pc/<client>/<client>.pl
$Conf{TopDir} = '/mnt/attic/spike_images';
$Conf{XferMethod} = 'rsync';
$Conf{BackupFilesExclude} = ['/floppy'];
$Conf{BackupFilesOnly} = ['/mnt/spike/images', '/mnt/spike/photos'];
$Conf{ClientNameAlias} = '192.168.xxx.xxx';

But it doesn't seem to make any difference. How can I set a TopDir per pc?

Thanks.
--
Mark E. Adams

Random Musing:
What I want to find out is -- do parrots know much about Astro-Turf?
Jeffrey J. Kosowsky
2008-12-03 23:48:42 UTC
Permalink
Post by Mark Adams
Hi there, me again.
I have several machines I would like to backup with BackupPC, but the
server is a humble box with several installed hard discs -- nothing fancy.
I need to backup each client machine to a different hard drive on the
server. I have one client configured and it tries to backup my 16 GB of
data, but fails because TopDir is configured for /var/lib/bacuppc in my
/etc/backuppc/config.pl file and there simply isn't enough room for the
data there. My reading of the docs says that I should be able to
configure TopDir in the client.pl file under
# cat /var/lib/backuppc/pc/<client>/<client>.pl
$Conf{TopDir} = '/mnt/attic/spike_images';
$Conf{XferMethod} = 'rsync';
$Conf{BackupFilesExclude} = ['/floppy'];
$Conf{BackupFilesOnly} = ['/mnt/spike/images', '/mnt/spike/photos'];
$Conf{ClientNameAlias} = '192.168.xxx.xxx';
But it doesn't seem to make any difference. How can I set a TopDir per pc?
I don't believe it is possible.
Also, since you say you are doing this because you are short of space,
I assume you would like to split TopDir among different
disks/partitions.
But then you would be defeating the ability to pool common files
across machines. If you really want completely separate and
independent TopDirs (including independent pool) then you might as
well run separate setups & copies of BackupPC.

Alternatively, you might want to look into LVM which will allow you to
have a single filesystem spread across multiple disks.
Nils Breunese (Lemonbit)
2008-12-03 23:56:39 UTC
Permalink
Post by Mark Adams
I have several machines I would like to backup with BackupPC, but the
server is a humble box with several installed hard discs -- nothing fancy.
I need to backup each client machine to a different hard drive on the
server. I have one client configured and it tries to backup my 16 GB of
data, but fails because TopDir is configured for /var/lib/bacuppc in my
/etc/backuppc/config.pl file and there simply isn't enough room for the
data there. My reading of the docs says that I should be able to
configure TopDir in the client.pl file under
# cat /var/lib/backuppc/pc/<client>/<client>.pl
$Conf{TopDir} = '/mnt/attic/spike_images';
$Conf{XferMethod} = 'rsync';
$Conf{BackupFilesExclude} = ['/floppy'];
$Conf{BackupFilesOnly} = ['/mnt/spike/images', '/mnt/spike/photos'];
$Conf{ClientNameAlias} = '192.168.xxx.xxx';
But it doesn't seem to make any difference. How can I set a TopDir per pc?
You can't. BackupPC stores the files for the backed up hosts in a pool
that needs to be on one filesystem, because of the use of hardlinks.
The only way to use multiple pools (and have multiple TopDirs) is to
run multiple installations of BackupPC.

Another option: use LVM to make one volume spanning your drives.

Nils Breunese.
Les Mikesell
2008-12-03 23:59:18 UTC
Permalink
Post by Mark Adams
Hi there, me again.
I have several machines I would like to backup with BackupPC, but the
server is a humble box with several installed hard discs -- nothing fancy.
I need to backup each client machine to a different hard drive on the
server. I have one client configured and it tries to backup my 16 GB of
data, but fails because TopDir is configured for /var/lib/bacuppc in my
/etc/backuppc/config.pl file and there simply isn't enough room for the
data there. My reading of the docs says that I should be able to
configure TopDir in the client.pl file under
# cat /var/lib/backuppc/pc/<client>/<client>.pl
$Conf{TopDir} = '/mnt/attic/spike_images';
$Conf{XferMethod} = 'rsync';
$Conf{BackupFilesExclude} = ['/floppy'];
$Conf{BackupFilesOnly} = ['/mnt/spike/images', '/mnt/spike/photos'];
$Conf{ClientNameAlias} = '192.168.xxx.xxx';
But it doesn't seem to make any difference. How can I set a TopDir per pc?
The main advantage of backuppc is the way it pools duplicate files and
it can only do that when everything is on the same filesystem. The best
approach is to mount a big drive (or raid or lvm set...) where it
expects the data to live.
--
Les Mikesell
***@gmail.com
Mark Adams
2008-12-03 23:59:59 UTC
Permalink
Therefore BackupPC's data store (__TOPDIR__) must point to a single
file system that supports hardlinks. You cannot split this file system
with multiple mount points or using symbolic links to point a
sub-directory to a different file system
I'm starting to get the impression that I _can't_ set a per-pc TopDir.

Does anybody have any experience with anything like this?

Thanks.


Mark
Hi there, me again.
I have several machines I would like to backup with BackupPC, but the
server is a humble box with several installed hard discs -- nothing fancy.
I need to backup each client machine to a different hard drive on the
server. I have one client configured and it tries to backup my 16 GB of
data, but fails because TopDir is configured for /var/lib/bacuppc in my
/etc/backuppc/config.pl file and there simply isn't enough room for the
data there. My reading of the docs says that I should be able to
configure TopDir in the client.pl file under
# cat /var/lib/backuppc/pc/<client>/<client>.pl
$Conf{TopDir} = '/mnt/attic/spike_images';
$Conf{XferMethod} = 'rsync';
$Conf{BackupFilesExclude} = ['/floppy'];
$Conf{BackupFilesOnly} = ['/mnt/spike/images', '/mnt/spike/photos'];
$Conf{ClientNameAlias} = '192.168.xxx.xxx';
But it doesn't seem to make any difference. How can I set a TopDir per pc?
Thanks.
--
Mark E. Adams

Random Musing:
I never expected to see the day when girls would get sunburned in the
places they do today.
-- Will Rogers
Holger Parplies
2008-12-04 01:43:55 UTC
Permalink
Hi,
Post by Mark Adams
I need to backup each client machine to a different hard drive on the
server.
as everyone is saying: you can't and you don't want to.
Post by Mark Adams
I have one client configured and it tries to backup my 16 GB of
data, but fails because TopDir is configured for /var/lib/bacuppc in my
/etc/backuppc/config.pl file and there simply isn't enough room for the
data there.
The first thing to understand is that you can mount any file system on
/var/lib/backuppc - that does not have to be (and probably should not be) on
your /var or even / partition. See the wiki or ask for more details.
If you've got a single partition of sufficient size on one disk (for all your
backups), that's fine. Just use it (but be aware that you cannot grow it if
you end up needing more space for backups). If you don't, then you can create
a device of sufficient size with LVM (or RAID) and mount that on
/var/lib/backuppc.
Post by Mark Adams
Alternatively, you might want to look into LVM which will allow you to
have a single filesystem spread across multiple disks.
Another option: use LVM to make one volume spanning your drives.
The best approach is to mount a big drive (or raid or lvm set...) where it
expects the data to live.
The thing to be aware of when creating a file system spanning multiple disks
is that the risk of losing your file system due to the failure of a disk (any
disk!) significantly increases with growing number of disks. You can
counteract this by using a redundant RAID mode (5, 6, 10) below LVM or by
itself, but your situation sounds like you don't have much space to spare for
redundancy. My recommendation would be either:

- live with the risk and combine your disks (or individual partitions on them)
into one LVM volume group, if you are doing backups of a home network where
losing the backups is more a nuissance than a real problem or
- buy a new disk (or even two for a RAID level 1 array) for your backups, if
you are serious about it. Disk space is cheap. Your data may not be.

In particular, be aware that keeping data and backups on the same (physical)
disk means that if the disk dies, both data and backups will be gone. In
general, you are doing backups to avoid just that.
Post by Mark Adams
I'm starting to get the impression that I _can't_ set a per-pc TopDir.
Does anybody have any experience with anything like this?
Yes, I have experience with not setting a per-PC TopDir ;-). As explained, it
would defeat pooling across PCs, so BackupPC does not offer this option, even
if it might not make much difference in some scenarios. Setting up several
instances of BackupPC (which would make it possible) seems like more of a
hassle than it is worth. Again, if you are serious about it, you should be
getting independent disks, and if you are not, you don't want to set up and
administrate one instance of BackupPC per client PC :). But, as always, your
mileage may vary.

Regards,
Holger

Loading...