On Thursday, November 17, 2016 at 11:59:16 AM UTC-5, darkadept wrote:
> I'm new to bareos and I'm trying to implement the "Always Incremental" backup 
> strategy.
> 

> My assumption is that this configuration will:
>  * Do a full backup initially
>  * Do incremental backups every weekday at 21:00
>  * Consolidate (every weekday) the incrementals older than 7 days
>  * Always keep at least 7 incrementals
>  * Consolidate job only consolidates with the Full backup every 14 days, 
> otherwise it consolidates just the incrementals (not sure if this is the 
> correct assumption of how "Always Incremental Max Full Age" works.)
>  * Only consolidates 1 per consolidate job (if multiple clients).
>  * Creates a virtual full backup on the 1st saturday of every month.

----------------------------------
You are mostly correct in your configuration.  The documentation almost gets 
you to a working AI implementation, but there are a few gotchas that have to be 
worked through.  It's hard keep my answer clear by marking up each of your conf 
files, so I'll post you a configuration that I've had in production for a while 
as complete working example.  I'll use the notations BOF and EOF for beginning 
of file and end of file, respectively.  Lines containing those notations should 
not be included in you conf files.

This is a LONG POST.  Bear with me.

The below configuration will ...
 * Do incremental backups 20:00 every day.  By definition the 1st will be a 
full backup.
 * Consolidate at 21:00 every 4th day starting on the 3rd day of the month.
   * Only consolidate incrementals older than 7 days
   * Keep at least 7 incrementals
   * Consolidate with the Full backup every 14 days.  (I don't consolidate very 
day, so my full gets picked up on the first consolidate job on or after 14 days.
   * Only consolidates 1 per consolidate job (if multiple clients).
 * Creates a virtual full backup at noon on the 1st day of the month.

-------------------------------------------------
On my Storage Daemon I have the following:

STORAGE:
BOF - storage/bareos-sd.conf
Storage {
  Name = bareos-sd
  Maximum Concurrent Jobs = 5
  Device Reserve By Media Type = yes    # This entry is REQUIRED for successful 
consolidation.  See FileStorageCons.conf. 
}
EOF

DEVICES:
BOF - device/FileStorage.conf
Device {
  Name = FileStorage
  Media Type = File
  Archive Device = /bareosFiles/BareosBackups/storage
  LabelMedia = yes
  Random Access = yes
  AutomaticMount = yes
  RemovableMedia = no
  AlwaysOpen = no
  Description = "File device of for general use."
  Maximum Concurrent Jobs = 5
}
EOF

BOF - device/FileStorageCons.conf
Device {
  Name = FileStorageCons1       # Multiple devices, different name and same 
media type, are configured to support simultaneous use.
  Media Type = FileCons
  Archive Device = /bareosFiles/BareosBackups/storage
  LabelMedia = yes
  Random Access = yes
  AutomaticMount = yes
  RemovableMedia = no
  AlwaysOpen = no
}
Device {
  Name = FileStorageCons2
  Media Type = FileCons
  Archive Device = /bareosFiles/BareosBackups/storage
  LabelMedia = yes
  Random Access = yes
  AutomaticMount = yes
  RemovableMedia = no
  AlwaysOpen = no
}
Device {
  Name = FileStorageCons3
  Media Type = FileCons
  Archive Device = /bareosFiles/BareosBackups/storage
  LabelMedia = yes
  Random Access = yes
  AutomaticMount = yes
  RemovableMedia = no
  AlwaysOpen = no
}
Device {
  Name = FileStorageCons4
  Media Type = FileCons
  Archive Device = /bareosFiles/BareosBackups/storage
  LabelMedia = yes
  Random Access = yes
  AutomaticMount = yes
  RemovableMedia = no
  AlwaysOpen = no
}
Device {
  Name = FileStorageCons5
  Media Type = FileCons
  Archive Device = /bareosFiles/BareosBackups/storage
  LabelMedia = yes
  Random Access = yes
  AutomaticMount = yes
  RemovableMedia = no
  AlwaysOpen = no
}
EOF

BOF - FileStorageVLT.conf
Device {
  Name = FileStorageVLT
  Media Type = FileVLT
  Archive Device = /bareosFiles/BareosBackups/storage
  LabelMedia = yes
  Random Access = yes
  AutomaticMount = yes
  RemovableMedia = no
  AlwaysOpen = no
  Description = "File device for VLT backups."
  Maximum Concurrent Jobs = 5
}
EOF

-------------------------------------------------
On my Director I have the following ...

STORAGE:
BOF - storage/File.conf
Storage {
  Name = File
  Address = <storage daemon hostname>
  Password = "<storage daemon password>"
  Device = FileStorage
  Media Type = File
}
EOF

BOF - storage/FileCons.conf
Storage {
  Name = FileCons
  Address = <storage daemon hostname>
  Password = "<storage daemon password>"
  Device = FileStorageCons1             # Note that these correspond to the SD 
device/FileStorageCons.conf devices.
  Device = FileStorageCons2
  Device = FileStorageCons3
  Device = FileStorageCons4
  Device = FileStorageCons5
  Media Type = FileCons
  Maximum Concurrent Jobs = 5
}
EOF

BOF - storage/FileVLT.conf
Storage {
  Name = FileVLT
  Address = <storage daemon hostname>
  Password = "<storage daemon password>"
  Device = FileStorageVLT
  Media Type = FileVLT
}
EOF

POOLS:
BOF - pool/AI-Incremental.con
Pool {
  Name = AI-Incremental
  Pool Type = Backup
  Recycle = yes
  Auto Prune = no
  Maximum Volume Bytes = 5G
  Label Format = "AI-Incremental-"
  Volume Use Duration = 7 days
  Storage = File
  Next Pool = AI-Consolidated
  Volume Retention = 1 years
  Maximum Volumes = 15
}
EOF

BOF - pool/AI-Consolidated.conf
Pool {
  Name = AI-Consolidated
  Pool Type = Backup
  Recycle = yes
  Auto Prune = no
  Maximum Volume Bytes = 5G
  Label Format = "AI-Consolidated-"
  Volume Use Duration = 18 hours
  Storage = FileCons
  Next Pool = AI-LongTerm
  Volume Retention = 1 years
  Maximum Volumes = 75
}
EOF

BOF - pool/AI-LongTerm.conf
Pool {
  Name = AI-LongTerm
  Pool Type = Backup
  Recycle = yes
  Auto Prune = yes
  Maximum Volume Bytes = 10G
  Label Format = "AI-LongTerm-"
  Volume Use Duration = 2 days
  Storage = FileVLT
  Volume Retention = 180 days
  Maximum Volumes = 100
}
EOF

SCHEDULES:
BOF - AISched.conf
Schedule {
  Name = "AISched"
  Run = Incremental sun-sat at 20:00            # (#10)
}
EOF

BOF - ConsolidateSched.conf
Schedule {
  Name = "ConsolidateSched"
  Run = Incremental 3/4 at 21:00
}
EOF

BOF - LongTemrSched.conf
Schedule {
  Name = "LongTermSched"
  Run = on 1 at 12:00
}
EOF

JOBS

BOF - job/myhost-ai.conf
Job {
  Name = "myhost-ai"
  Client = "myhost-fd"
  FileSet = LinuxAll
  Type = Backup
  Level = Incremental
  Schedule = "AISched"
  Storage = File
  Messages = Standard
  Pool = AI-Incremental
  Priority = 15
  Write Bootstrap = "/bareosFiles/BareosCopiesProd/bootstraps/%c.bsr"
  Full Backup Pool = AI-Consolidated
  Incremental Backup Pool = AI-Incremental
  Accurate = yes
  Allow Mixed Priority = yes
  Always Incremental = yes
  Always Incremental Job Retention = 7 days
  Always Incremental Keep Number = 7
  Always Incremental Max Full Age = 21 days
}
EOF

BOF - job/Consolidate.conf
Job {
  Name = Consolidate
  Type = Consolidate
  Client = myhost-fd
  FileSet = LinuxAll
  Accurate = yes
  Schedule = "ConsolidateSched"
  Storage = File
  Messages = Standard
  Pool = AI-Consolidated
  Priority = 25
  Write Bootstrap = "/bareosFiles/BareosCopiesProd/bootstraps/%c.bsr"
  Full Backup Pool = AI-Consolidated
  Incremental Backup Pool = AI-Incremental
  Max Full Consolidations = 1
  Prune Volumes = yes
}
EOF

BOF - job/myhost-vlt.conf
Job {
  Name = "myhost-vlt"
  Client = myhost-fd
  FileSet = LinuxAll
  Schedule = LongTermSched
  Type = Backup
  Level = VirtualFull
  Pool = AI-Consolidated
  Messages = Standard
  Priority = 30
  Accurate = yes
  Run Script {
    console = "update jobid=%i jobtype=A"
    Runs When = After
    Runs On Client = No
    Runs On Failure = No
  }
}
EOF

-- 
You received this message because you are subscribed to the Google Groups 
"bareos-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to