LINUX.ORG.RU
решено ФорумAdmin

Переопределение Storage в секции Schedule

 


0

1

Насколько я понимаю The Schedule Resource говорит о том, что значение Storage из Job может быть переопределено в секции Schedule.

The Job-overrides permit overriding the Level, the Storage, the Messages, and the Pool specifications provided in the Job resource. In addition, the FullPool, the IncrementalPool, and the DifferentialPool specifications permit overriding the Pool specification according to what backup Job Level is in effect.

Schedule {
        Name = Schedule
        Run = Storage = "Storage-1" Level = Full on 27 at 15:00
        Run = Storage = "Storage-2" Level = Full on 27 at 15:42
}
Pool {
    Name = Pool
    Pool Type = Backup
    AutoPrune = yes
    Recycle = yes
    Volume Retention = 3 months
    Maximum Volume Jobs = 1
    Maximum Volumes = 15
    Storage = Storage-1,Storage-2
    #Storage = Storage-1
    Label Format = "pool-"
}
Job {
        Name = Job
        Type = Backup
        Level = Full
        Client = Client
        FileSet = FileSet
        Schedule = Schedule
        Messages = Standard
        Pool = Pool
        Write Bootstrap = "/var/lib/bacula/%n.bsr"
        Priority = 1
        Reschedule On Error = yes
        Reschedule Interval = 1440 minutes
        Reschedule Times = 0
        #Storage = Storage-1,Storage-2
        #Storage = Storage-1
}

Не переопределяется используется всегда Storage-1.

Storage {
  Name = Storage-1
  Address = Address
  SDPort = 9103
  Password = "Password"
  Device = Device
  Media Type = File
  Maximum Concurrent Jobs = 5
}
Storage {
  Name = Storage-2
  Address = Address
  SDPort = 9103
  Password = "Password"
  Device = Device
  Media Type = File
  Maximum Concurrent Jobs = 5
}

★★★★★

Ответ на: комментарий от sin_a

Если я правильно понимаю, у Job приоритет выше.

Задумывался. Не определял параметр Storage в Job

Job {
        ...
        #Storage = Storage-1,Storage-2
        #Storage = Storage-1
}

Эффекта нет

petav ★★★★★
() автор топика
Последнее исправление: petav (всего исправлений: 1)

можно попробовать кастомный стожадж вынести в jobdefs

ii343hbka ★★★
()

У меня переопределяется на ура:

Job {
    JobDefs = "DefaultJob"

    Name = "sql.domain.ru-diff"
    Client = "sql.domain.ru"
    Schedule = "sql.domain.ru-diff"
    FileSet = "sql.domain.ru-diff"
    Storage = "sql.domain.ru"
    Pool = "sql.domain.ru-daily"

    Level="Full"
}

Schedule {
    Name = "sql.domain.ru-diff"
    Run = Level="Full" Storage="sql.domain.ru-2" Pool="sql.domain.ru-daily" mon-fri,sun at 05:00
}


* show schedule=sql.domain.ru-diff

Schedule: name=sql.domain.ru-diff
  --> Run Level=Full
      hour=5
      mday=0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
      month=0 1 2 3 4 5 6 7 8 9 10 11
      wday=0 1 2 3 4 5
      wom=0 1 2 3 4
      woy=0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53
      mins=0
     --> Pool: name=sql.domain.ru-daily PoolType=Backup
      use_cat=1 use_once=0 cat_files=1
      max_vols=32 auto_prune=1 VolRetention=1 month 1 day
      VolUse=0 secs recycle=1 LabelFormat=${Client}-${Year}-${Month:p/2/0/r}-${Day:p/2/0/r}-daily
      CleaningPrefix=*None* LabelType=0
      RecyleOldest=1 PurgeOldest=1 ActionOnPurge=0
      MaxVolJobs=1 MaxVolFiles=0 MaxVolBytes=0
      MigTime=0 secs MigHiBytes=0 MigLoBytes=0
      JobRetention=0 secs FileRetention=0 secs
     --> Storage: name=sql.domain.ru-2 address=10.1.0.246 SDport=9103 MaxJobs=1
      DeviceName=sql.domain.ru MediaType=File3 StorageId=14
Переназначеные свойства отмечены "-->"

blind_oracle ★★★★★
()
Ответ на: комментарий от petav

Всё стандартно:

Pool {
    Name = "sql.domain.ru-daily"
    Pool Type = Backup
    Maximum Volume Jobs = 1
    Recycle = yes
    Recycle Oldest Volume = yes
    Purge Oldest Volume = Yes
    AutoPrune = yes
    Label Format = "${Client}-${Year}-${Month:p/2/0/r}-${Day:p/2/0/r}-daily"
    Maximum Volumes = 32
    Volume Retention = 31 days
}

blind_oracle ★★★★★
()
Ответ на: комментарий от blind_oracle

У меня тоже

Schedule {
        Name = Schedule
        Run = Storage = "Storage-1" Level = Full on 27 at 15:00
        Run = Storage = "Storage-2" Level = Full on 28 at 08:10
}
*show schedule=Schedule
...
  --> Run Level=Full
      hour=8 
      mday=27 
      month=0 1 2 3 4 5 6 7 8 9 10 11 
      wday=0 1 2 3 4 5 6 
      wom=0 1 2 3 4 
      woy=0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 
      mins=10
     --> Storage: name=Storage-2 address=Address2 SDport=9103 MaxJobs=5
      DeviceName=Device MediaType=File StorageId=50
You have messages.
Но задание at 08:10 берет pool из storage-1
2014-05-28 08:10:02   bacula JobId 17559: Start Backup JobId 17559, Job=Job.2014-05-28_08.10.00_05
2014-05-28 08:10:02   bacula JobId 17559: There are no more Jobs associated with Volume "pool-2672". Marking it purged.
2014-05-28 08:10:02   bacula JobId 17559: All records pruned from Volume "pool-2672"; marking it "Purged"
2014-05-28 08:10:02   bacula JobId 17559: Recycled volume "pool-2672"
2014-05-28 08:10:02   bacula JobId 17559: Using Device "Device"
2014-05-28 08:10:02   storage-1 JobId 17559: Recycled volume "pool-2672" on device "Device" (/volume1/), all previous data lost.
2014-05-28 08:10:02   bacula JobId 17559: Max Volume jobs=1 exceeded. Marking Volume "pool-2672" as Used.
Перепроверю все еще раз.

P.S.: Есть подозрение, что значение Storage надо убрать из секции Pool и перенести в секцию Job...

petav ★★★★★
() автор топика
Последнее исправление: petav (всего исправлений: 1)
Ответ на: комментарий от petav

P.S.: Есть подозрение, что значение Storage надо убрать из секции Pool и перенести в секцию Job...

Да, после того как убрал определение значения Storage из секции Pool

Pool {
        ...
        #Storage = Storage-1
        ...
}
и перенес в секцию Job
Job {
        ...
        Storage = Storage-1
        ...
}
переопределение не только отразилось, но и заработало.

petav ★★★★★
() автор топика
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.