Re: [Bacula-users] File-based Storage and Pool Definitions

2006-05-19 Thread Scott Ruckh
This is what you said Mark McCracken
 Hi guys -

 I'm new to bacula, but I've been reading the docs and trying different
 things to accomplish my goal here, and I'm stumped.  Maybe you can help
 me.
 I have 6 machines on my home network that I want to backup, all to a large
 drive mounted at /mnt/lacie on my storage daemon.  I want to have a
 separate
 subdirectory for each machine (/mnt/lacie/libby, /mnt/lacie/jazz, etc),
 and
 below that a separate subdirectory for each level (/mnt/lacie/libby/Full,
 /mnt/lacie/libby/Incremental).  I am doing Fulls and Incrementals only, no
 Differentials.  I do monthly full backups and weekly incremental backups,
 and I want to keep about 2 months worth of stuff on there at all times (a
 little slop one way or the other is fine).

 In a perfect world, my directories would look something like this after
 being completely filled by bacula over the course of 2-3 months:

 /mnt/lacie/
 libby/
 Full/
 Monthly0001
 Monthly0002
 Incremental/
 Weekly0001
 Weekly0002, 0003, etc up to 0008
 jazz/
 (just like libby's tree)
 (other machines just like libby and jazz)


I am a novice bacula user, so beware --

Here is an example of what I am doing.  Not exactly what you are doing,
but it should get you started.  Ignore all comments becuase they probably
do not make sense.  They are there because I cut and paste not because I
have gone back and edited them to make sense.

===bacula-sd.conf=
Device {
  Name = SD_FULL
  Media Type = File
  Archive Device = /BACKUPS/Full
  LabelMedia = yes;   # lets Bacula label unlabeled media
  Random Access = Yes;
  AutomaticMount = yes;   # when device opened, read it
  RemovableMedia = no;
  AlwaysOpen = no;
}

Device {
  Name = SD_INCR
  Media Type = File
  Archive Device = /BACKUPS/Incremental
  LabelMedia = yes;   # lets Bacula label unlabeled media
  Random Access = Yes;
  AutomaticMount = yes;   # when device opened, read it
  RemovableMedia = no;
  AlwaysOpen = no;
}

Device {
  Name = SD_DIFF
  Media Type = File
  Archive Device = /BACKUPS/Differential
  LabelMedia = yes;   # lets Bacula label unlabeled media
  Random Access = Yes;
  AutomaticMount = yes;   # when device opened, read it
  RemovableMedia = no;
  AlwaysOpen = no;
}

Device {
  Name = SD_CTLG
  Media Type = File
  Archive Device = /BACKUPS/Catalog
  LabelMedia = yes;   # lets Bacula label unlabeled media
  Random Access = Yes;
  AutomaticMount = yes;   # when device opened, read it
  RemovableMedia = no;
  AlwaysOpen = no;
}


===bacula-dir.conf=
# Definition of file storage device
Storage {
  Name = FSD_FULL
# Do not use localhost here
  Address = MyBacula# N.B. Use a fully qualified name here
  SDPort = 9103
  Password = .
  Device = SD_FULL
  Media Type = File
}

Storage {
  Name = FSD_INCR
# Do not use localhost here
  Address = MyBacula# N.B. Use a fully qualified name here
  SDPort = 9103
  Password = .
  Device = SD_INCR
  Media Type = File
}


Storage {
  Name = FSD_DIFF
# Do not use localhost here
  Address = MyBacula# N.B. Use a fully qualified name here
  SDPort = 9103
  Password = .
  Device = SD_DIFF
  Media Type = File
}

Storage {
  Name = FSD_CTLG
# Do not use localhost here
  Address = MyBacula# N.B. Use a fully qualified name here
  SDPort = 9103
  Password = .
  Device = SD_CTLG
  Media Type = File
}

Pool {
  Name = FULL-Pool
  Pool Type = Backup
  Recycle = yes # Bacula can automatically recycle
Volumes
  Recycle Oldest Volume = yes   # Recycle Oldest Volume
  AutoPrune = yes   # Prune expired volumes
  Volume Retention = 1 months   # 3 months
  Accept Any Volume = yes   # write on any volume in the pool
  Maximum Volume Jobs = 1
  Maximum Volumes = 10
  LabelFormat = FULL-
}

Pool {
  Name = DIFF-Pool
  Pool Type = Backup
  Recycle = yes # Bacula can automatically recycle
Volumes
  Recycle Oldest Volume = yes   # Recycle Oldest Volume
  AutoPrune = yes   # Prune expired volumes
  Volume Retention = 2 months   # 32 days
  Accept Any Volume = yes   # write on any volume in the pool
  Maximum Volume Jobs = 2
  Maximum Volumes = 9
  LabelFormat = DIFF-
}

Pool
{
  Name = INCR-Pool
  Pool Type = Backup
  Recycle = yes # Bacula can automatically recycle
Volumes
  Recycle Oldest Volume = yes   # Recycle Oldest Volume
  AutoPrune = yes   # Prune expired volumes
  Volume Retention = 1 months   # 7 days
  Accept Any Volume = yes   # write on any volume in 

[Bacula-users] File-based Storage and Pool Definitions

2006-05-17 Thread Mark McCracken

Hi guys -

I'm new to bacula, but I've been reading the docs and trying different 
things to accomplish my goal here, and I'm stumped.  Maybe you can help me. 
I have 6 machines on my home network that I want to backup, all to a large 
drive mounted at /mnt/lacie on my storage daemon.  I want to have a separate 
subdirectory for each machine (/mnt/lacie/libby, /mnt/lacie/jazz, etc), and 
below that a separate subdirectory for each level (/mnt/lacie/libby/Full, 
/mnt/lacie/libby/Incremental).  I am doing Fulls and Incrementals only, no 
Differentials.  I do monthly full backups and weekly incremental backups, 
and I want to keep about 2 months worth of stuff on there at all times (a 
little slop one way or the other is fine).


In a perfect world, my directories would look something like this after 
being completely filled by bacula over the course of 2-3 months:


/mnt/lacie/
libby/
Full/
Monthly0001
Monthly0002
Incremental/
Weekly0001
Weekly0002, 0003, etc up to 0008
jazz/
(just like libby's tree)
(other machines just like libby and jazz)

The latest Monthly file, I expect, will flip-flop back and forth between 
0001 and 0002; and the latest Weekly file will probably cycle from 0001-0008 
and then repeat.


I have a completely different scheme that is running right now but I find it 
difficult to maintain, and I believe the layout above will be invaluable 
when I move to the next stage, which is offsite delivery of periodic monthly 
full backups to my friend's house across town (and he will do the same, once 
I solve all the config issues for him).


I've attached the config files I crafted to try to do this, but they don't 
work because I am trying to use AutoLabeling for a purpose other than which 
it was intended.  So my question is this:  how should I configure my pools, 
devices, etc to make my vision above a reality?  Any help would be MUCH 
appreciated.


Thanks in advance

- Mark

== bacula-sd.conf ===
Storage {
 Name = mythtv-sd
 SDPort = 9103
 WorkingDirectory = /var/bacula/working
 Pid Directory = /var/run
 Maximum Concurrent Jobs = 20
}

Director {
 Name = mythtv-dir
 Password = ...
}

Device
{
 Name = LaCie
 Media Type = File
 Archive Device = /mnt/lacie
 Label Media = yes;
 Random Access = yes;
 AutomaticMount = yes;
 RemovableMedia = no;
 AlwaysOpen = no;
}

Messages {
 Name = Standard
 director = mythtv-dir = all
}

= bacula-dir.conf =

Director {
 Name = mythtv-dir
 DIRport = 9101
 QueryFile = /etc/bacula/query.sql
 WorkingDirectory = /var/bacula/working
 PidDirectory = /var/run
 Maximum Concurrent Jobs = 1
 Password = ...
 Messages = Daemon
}

JobDefs {
 Name = LinuxDefault
 Type = Backup
 Level = Incremental
 Schedule = MonthlyCycleLinux
 Messages = Standard
 Priority = 10
 Storage = LaCie
 Pool = Failover  # Hopefully never used, but required
}

JobDefs {
 Name = WindowsDefault
 Type = Backup
 Level = Incremental
 Schedule = MonthlyCycleWindows
 Messages = Standard
 Priority = 10
 # backup the registry to C:\SystemState.bkf
 Client Run Before Job = c:/systemstate.bat
 Client Run After Job = c:/deletesystemstate.bat
 Reschedule On Error = yes
 Reschedule Interval = 1 hour
 Storage = LaCie
 Pool = Failover
}

Job {
 Name = MythBase
 JobDefs = LinuxDefault
 Client = mythtv-fd
 WriteBootstrap = /var/bacula/working/Myth.bsr
 FileSet = MythFullNoVideos
 Full Backup Pool = MythFull
 Incremental Backup Pool = MythIncr
}

Job {
 Name = FidoBase
 JobDefs = LinuxDefault
 Client = fido-fd
 WriteBootstrap = /var/bacula/working/Fido.bsr
 FileSet = FidoFullNoMP3
 Full Backup Pool = FidoFull
 Incremental Backup Pool = FidoIncr
}

Job {
 Name = LibbyBase
 JobDefs = WindowsDefault
 Client = libby-fd
 Write Bootstrap = /var/bacula/working/Libby.bsr
 FileSet = LibbyFull
 Priority = 9 # have it execute before Jazz
 Full Backup Pool = LibbyFull
 Incremental Backup Pool = LibbyIncr
}

Job {
 Name = JazzBase
 JobDefs = WindowsDefault
 Client = jazz-fd
 Write Bootstrap = /var/bacula/working/Jazz.bsr
 FileSet = JazzFull
 Full Backup Pool = JazzFull
 Incremental Backup Pool = JazzIncr
}

Job {
 Name = MortBase
 JobDefs = WindowsDefault
 Schedule = MonthlyCycleLaptops
 Client = mort-fd
 Write Bootstrap = /var/bacula/working/Mort.bsr
 FileSet = MortFull
 Priority = 9 # have it execute before fido and myth
 Full Backup Pool = MortFull
 Incremental Backup Pool = MortIncr
}

Job {
 Name = TweetyBase
 JobDefs = WindowsDefault
 Schedule = MonthlyCycleLaptops
 Client = tweety-fd
 Write Bootstrap = /var/bacula/working/Tweety.bsr
 FileSet = TweetyFull
 Priority = 8 # have it execute before Mort
 Full Backup Pool = TweetyFull
 Incremental Backup Pool = TweetyIncr
}

Job {
 Name = BackupCatalog
 JobDefs = LinuxDefault
 Level = Full
 Client = mythtv-fd
 FileSet=Catalog
 Schedule = MonthlyCycleAfterBackup
 # This creates an ASCII copy of the catalog
 RunBeforeJob = /etc/bacula/make_catalog_backup bacula bacula
 # This