On 06/14/2013 02:16 AM, Marcin Haba wrote:
> W dniu 13.06.2013 22:49, John Drescher pisze:
>> On Thu, Jun 13, 2013 at 4:34 PM, arnaldojsousa
>> <bacula-forum AT backupcentral DOT com> wrote:
>>> Hi all...
>>>
>>> The bacula with vchanger using external USB disks works fine, but i have
>>> some doubts:
>>>
>>> - jobs were executed last night - no problem so I'd like to use one disc
>>> per day. we have a set of 5 (Mon-fry) external USB disk 500GB
>>>
>>> Question 1:
>>>
>>> I'll have to run the command "label barcodes" for each magazine manually
>>> every day?
>>>
>> No. I would do that 1 time for each external making each external its
>> own magazine.
>>
>>
I have two USB disks that I swap over every month or so. You could no
doubt extend this approach to 5 disks swapped every day.
My bacula-dir.conf and bacula-sd.conf files are generated from template
files using the following script, which I run when I swap the disks. If
I was clever I could probably hook it into systemd to run when the right
USB devices are detected, but its more trouble than its worth.
---------------8<-------------------8<---------------
#! /bin/sh
TARGET=/etc/bacula
TEMPLATES=/etc/bacula/templates
if test -h /dev/disk/by-label/BACKUP5; then DISK=5; fi
if test -h /dev/disk/by-label/BACKUP6; then DISK=6; fi
if test -h /dev/disk/by-label/BACKUP7; then DISK=7; fi
if test -h /dev/disk/by-label/BACKUP8; then DISK=8; fi
m4 -D NUMBER=$DISK $TEMPLATES/bacula-dir.conf.m4 > $TARGET/bacula-dir.conf
m4 -D NUMBER=$DISK $TEMPLATES/bacula-sd.conf.m4 > $TARGET/bacula-sd.conf
service bacula-dir restart
service bacula-sd restart
---------------8<-------------------8<---------------
Each USB drive has its own pair of pools; a big one for weekly backups
and a smaller one for daily diffs, defined thus:
---------------8<-------------------8<---------------
Pool {
Name = Daily-NUMBER
Pool Type = Backup
Recycle = yes # Bacula can automatically
recycle Volumes
AutoPrune = yes # Prune expired volumes
Volume Retention = 5 days
Storage = `File-Backup'NUMBER
Label Format = `Daily'NUMBER-
Maximum Volume Bytes = 20G
Maximum Volumes = 20
---------------8<-------------------8<---------------
All the jobs have names of the form "happy-NUMBER", and so on. The
current disks themselves are labelled "BACKUP-7" and "BACKUP-8", and the
storage device in bacula-sd.conf.m4 looks like this:
---------------8<-------------------8<---------------
Device {
Name = `BACKUP'NUMBER
Media Type = File
Archive Device = `/media/BACKUP'NUMBER
LabelMedia = yes; # lets Bacula label unlabeled media
Random Access = Yes;
AutomaticMount = yes; # when device opened, read it
RemovableMedia = no;
AlwaysOpen = no;
}
---------------8<-------------------8<---------------
Obviously there is a lot of other stuff, but I hope this is enough to
give you the idea.
Paul.
------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:
Build for Windows Store.
http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users
|