Bacula-users

[Bacula-users] understand Migration Job

2009-09-26 06:14:58
Subject: [Bacula-users] understand Migration Job
From: tw2006 <tw2006 AT gmail DOT com>
To: bacula-users AT lists.sourceforge DOT net
Date: Sat, 26 Sep 2009 12:10:54 +0200
Hi all,
   i'm trying to deploy a small bacula enviroment per my backups.
I have in the test enviroment 2 clients (a freenas server and a
Windows Client) and a bacula server where is connect a tape device
(DDS72)

I create 2 scheduled backups for the clients with different filesets
and they write to a disk pool (DiskPool)
After it i want to deploy a migration task to move data from DiskPool
to a TapePool (on DDS72) but i find a lot of problems to understand
how to make it. So i hope for a tips :) :)

The migration task is MigrateDiskToTape

What i want, if possible, is to migrate data on ServerPoolxxx file to
tape using the PoolOccupancy in order to keep the filesize of
ServerPoolxxx between 2 parameters (for example high= 10Gb and low 1
Gb)

or

migrate all ServerPoolxxx to tape and prune it

The error that i receive is Migration -- no files to migrate

The other question is, can i make a migrate task for all clients that
write data to DiskPool without define the client and fileset
parameter?

Bacula version is 3.0.2 from source on a debian server

my bacula-dir is:

#
# Default Bacula Director Configuration file
#
#  The only thing that MUST be changed is to add one or more
#   file or directory names in the Include directive of the
#   FileSet resource.
#
#  For Bacula release 3.0.2 (18 July 2009) -- debian 4.0
#
#  You might also want to change the default email address
#   from root to your address.  See the "mail" and "operator"
#   directives in the Messages resource.
#

Director {                            # define myself
  Name = scanner-dir
  DIRport = 9101                # where we listen for UA connections
  QueryFile = "/etc/bacula/query.sql"
  WorkingDirectory = "/var/bacula/working"
  PidDirectory = "/var/run"
  Maximum Concurrent Jobs = 1
  Password = "xxxx"         # Console password
  Messages = Daemon
}

JobDefs {
  Name = "DefaultJob"
  Type = Backup
  Level = Incremental
  Client = scanner-fd
  FileSet = "Full Set"
  Schedule = "WeeklyCycle"
  Storage = File
  Messages = Standard
  Pool = DiskPool
  Priority = 10
}

JobDefs {
  Name = "FreenasJob"
  Type = Backup
  Level = Incremental
  Client = freenas-fd
  FileSet = "Freenas Set"
  Schedule = "WeeklyCycle"
  Storage = File
  Messages = Standard
  Pool = DiskPool
  Priority = 10
 # Selection Type = PoolOccupancy
}




#
# Define the main nightly save backup job
#   By default, this job will back up to disk in /tmp
Job {
  Name = "BackupBaculaServer"
  JobDefs = "DefaultJob"
  Write Bootstrap = "/var/bacula/working/Client1.bsr"
}

Job {
  Name = "Backup Frenas"
  JobDefs = "FreenasJob"
  Write Bootstrap = "/var/bacula/working/freenas.bsr"
}

Job {
  Name = "Backup Windows PC"
  Type = Backup
  Level = Incremental
  Client = win-fd
  FileSet = "Windows Set"
#  Schedule = "WeeklyCycle"
  Messages = Standard
  Pool = DiskPool
  Write Bootstrap = "/var/bacula/working/winpc.bsr"
}

Job {
  Name     = "MigrateDiskToTape"
  Type     = Migrate
  Client   = freenas-fd
  FileSet  = "Freenas Set"
  Messages = Standard
  Pool     = DiskPool
  Selection Type     = PoolOccupancy
  # no sense spooling local data
  Spool Data       = no
  Spool Attributes = yes
}

# List of files to be backed up
FileSet {
  Name = "Freenas Set"
  Include {
    Options {
      signature = MD5
    }
#
#  Put your list of files here, preceded by 'File =', one per line
#    or include an external list with:
#
#    File = <file-name
#
#  Note: / backs up everything on the root partition.
#    if you have other partitions such as /usr or /home
#    you will probably want to add them too.
#
#  By default this is defined to point to the Bacula binary
#    directory to give a reasonable FileSet to backup to
#    disk storage during initial testing.
#
    File = /mnt/Data

#    File = /mnt/Casa/PROGETTI
#    File = /mnt/Casa/documenti
#    File = /mnt/Casa/elisa
#    File = /mnt/Casa/foto
#    File = /mnt/Casa/riccardo
#    File = /mnt/Casa/silvana
  }

#
# If you backup the root directory, the following two excluded
#   files can be useful
#
  Exclude {
    File = /var/bacula/working
    File = /tmp
    File = /proc
    File = /tmp
    File = /.journal
    File = /.fsck
  }
}

# List of files to be backed up
FileSet {
  Name = "Windows Set"
  Enable VSS = yes
  Include {
    Options {
      signature = MD5
    }
#
#  Put your list of files here, preceded by 'File =', one per line
#    or include an external list with:
#
#    File = <file-name
#
#  Note: / backs up everything on the root partition.
#    if you have other partitions such as /usr or /home
#    you will probably want to add them too.
#
#  By default this is defined to point to the Bacula binary
#    directory to give a reasonable FileSet to backup to
#    disk storage during initial testing.
#
    File = "c:/Documents and Settings/Administrator/Desktop"
    File = "c:/Documents and Settings/Administrator/Documenti"
  }

#
# If you backup the root directory, the following two excluded
#   files can be useful
#
#  Exclude {
#    File = /var/bacula/working
#    File = /tmp
#    File = /proc
#    File = /tmp
#    File = /.journal
#    File = /.fsck
#  }
}




#
# When to do the backups, full backup on first sunday of the month,
#  differential (i.e. incremental since full) every other sunday,
#  and incremental backups other days
Schedule {
  Name = "WeeklyCycle"
  Run = Full 1st sun at 23:05
  Run = Differential 2nd-5th sun at 23:05
  Run = Incremental mon-sat at 23:05
}

# This schedule does the catalog. It starts after the WeeklyCycle
Schedule {
  Name = "WeeklyCycleAfterBackup"
  Run = Full sun-sat at 23:10
}

# This is the backup of the catalog
FileSet {
  Name = "Catalog"
  Include {
    Options {
      signature = MD5
    }
    File = /var/bacula/working/bacula.sql
  }
}

# Client (File Services) to backup
Client {
  Name = scanner-fd
  Address = scanner
  FDPort = 9102
  Catalog = MyCatalog
  Password = "xxxx"          # password for FileDaemon
  File Retention = 30 days            # 30 days
  Job Retention = 6 months            # six months
  AutoPrune = yes                     # Prune expired Jobs/Files
}


Client {
  Name = freenas-fd
  Address = 192.168.189.140
  FDPort = 9102
  Catalog = MyCatalog
  Password = "xxx"          # password for FileDaemon
  File Retention = 30 days            # 30 days
  Job Retention = 6 months            # six months
  AutoPrune = yes                     # Prune expired Jobs/Files
}

Client {
  Name = win-fd
  Address = 192.168.189.106
  FDPort = 9102
  Catalog = MyCatalog
  Password = "xxx"          # password for FileDaemon
  File Retention = 30 days            # 30 days
  Job Retention = 6 months            # six months
  AutoPrune = yes                     # Prune expired Jobs/Files
}

# Definition of file storage device
Storage {
  Name = File
# Do not use "localhost" here
  Address = scanner                # N.B. Use a fully qualified name here
  SDPort = 9103
  Password = "xxxxxx"
  Device = FileStorage
  Media Type = File
}


# Definition of DDS tape storage device
Storage {
  Name = DDS72
  #Do not use "localhost" here
  Address = scanner                # N.B. Use a fully qualified name here
  SDPort = 9103
  Password = "xxxxx"          # password for Storage daemon
  Device = DDS72                      # must be same as Device in Storage daemon
  Media Type = DDS72                  # must be same as MediaType in
Storage daemon
  Autochanger = no                   # enable for autochanger device
}

# Generic catalog service
Catalog {
  Name = MyCatalog
# Uncomment the following line if you want the dbi driver
# dbdriver = "dbi:mysql"; dbaddress = 127.0.0.1; dbport =
  dbname = "bacula"; dbuser = "bacula"; dbpassword = ""
}

Pool {
  Name = Windows
  Pool Type = Backup
  Recycle = yes                       # Bacula can automatically recycle Volumes
  AutoPrune = yes                     # Prune expired volumes
  Volume Retention = 8 days           # eight days
  Next Pool = TapePool
  Storage = File
  LabelFormat = "File"
}

# Scratch pool definition
Pool {
  Name = Scratch
  Pool Type = Backup
}

Pool {
  Name = DiskPool
  Pool Type = Backup
  AutoPrune = no
  Recycle = no
  Storage = File
  Next Pool = TapePool
  Maximum Volume Bytes = 5g
  Maximum Volume Jobs = 1
  Label format = ServerPool


#  Selection Type = PoolOccupancy
  Migration High Bytes = 2g # 6GB
  Migration Low Bytes = 512m   # 6 GB
}


Pool {
  Name = TapePool
  Pool Type = Backup
  AutoPrune = yes
  Recycle = yes
  Storage = DDS72
}


#
# Restricted console used by tray-monitor to get the status of the director
#
Console {
  Name = scanner-mon
  Password = "xxxxx"
  CommandACL = status, .status
}


Thanks
Riccardo

------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users

<Prev in Thread] Current Thread [Next in Thread>
  • [Bacula-users] understand Migration Job, tw2006 <=