4

I have 2 locations, one in Europe, one in Asia. Each location has a fully functional Bacula system to handle local backups.
What I want to do is to copy some jobs from one location SD to the other location SD. Ideally if I can perform a backup on location A, copy to location B, and the restore to a server at location B.
I understand that starting version 7.0.0 Bacula permits SD to SD backup. I think that this is the feature that I need it (bacula manual)

Bacula version 7.0 permits SD to SD transfer of Copy and Migration Jobs. This permits what is commonly referred to as replication or off-site transfer of Bacula backups. It occurs automatically, if the source SD and destination SD of a Copy or Migration job are different.

The problem is that I do not know how to set such jobs. I did not find any tutorials on this.
My initial thought was that I have to use a copy job, but then from the same manual:

Migration is only implemented for a single Storage daemon. You cannot read on one Storage daemon and write on another.

which is exactly what i wanted to do...
Any ideas of how can i achieve this ?

Videanu Adrian
  • 173
  • 1
  • 9

2 Answers2

3

I found (a) the solution...
it seems that the key is here:

It occurs automatically, if the source SD and destination SD of a Copy or Migration job are different.

My goal was to copy some backup jobs from Asia to Europe. In order to do this I have created a Device in the Europe SD:

Device {
  Name = asiaBackup
  Media Type = File1
  Device Type = File
  Archive Device = /bacula/asia
  LabelMedia = yes
  Random Access = Yes;
  AutomaticMount = yes;
  RemovableMedia = no;
  AlwaysOpen = no;
  Maximum Concurrent Jobs = 40;
  Autochanger = no;
}

Then in the asia director I have created one storage that points to this device from the europe SD.

Storage {
  Name = europeStorage
  Address = myEuropeDomain.com
  SDPort = 9103
  Password = "blaBlaBla...."
  Device = asiaBackup
  Media Type = File1
  Maximum Concurrent Jobs = 5
  Heartbeat Interval = 10
}

/* dbPool = the pool where the backup sits locally */
Pool {
  Name = dbPool
  Label Format = "dbBackup"
  Pool Type = Backup
  Recycle = yes                       
  AutoPrune = yes                     
  Volume Retention = 365 days         
  Maximum Volume Bytes = 5G          
  Maximum Volumes = 1000             
  Label Format = "dbVol-"            
  Recycle Oldest Volume = yes
  Next pool = "europeBackupPool"
  Storage = dbStorage
}


/* europeBackupPool = the destination pool of copy job */
Pool {
  Name = europeBackupPool
  Label Format = "dbBackup"
  Pool Type = Backup
  Recycle = yes                       
  AutoPrune = yes                     
  Volume Retention = 365 days         
  Maximum Volume Bytes = 5G          
  Maximum Volumes = 1000             
  Label Format = "euBKVol-"          
  Recycle Oldest Volume = yes
  Storage = europeStorage
}

and this copy job

Job {
    Name = backupToEurope
    Type = Copy
    Pool = dbPool
    Selection Type = PoolUncopiedJobs
    Schedule = "dailyFullSchedule"
    Client = "none"
    FileSet = "none"
    Messages = Standard
}

Pay attention to the "Next Pool" directive from the initial pool as this is specifying the pool where the jobs will be copied.
After that when I run backup I get:

    Run Copy job
JobName:       backupToEurope
Bootstrap:     *None*
Client:        none
FileSet:       none
Pool:          dbPool (From Job resource)
NextPool:      europeBackupPool (From Job Pool's NextPool resource)
Read Storage:  dbStorage (From Pool resource)
Write Storage: europeStorage (From Job Pool's NextPool resource)
JobId:         *None*
When:          2015-04-01 18:44:27
Catalog:       MyCatalog
Priority:      10

The downside here is that if you want to restore this backup you would have to do it from the Asia Director, because the Europe director has no clue about this jobs...

Videanu Adrian
  • 173
  • 1
  • 9
2

Just to add one thing. Try to use bscan and you can "read" the Volumes again ( the copied ones) and import them into the Catalog of the other location. Than you can restore them in the second site also ;) thus avoiding the dependency on the first director, in case anything goes wrong.

Hope it helps. Cheers Filipe