Firstly, you cannot have bareos delete files without dirty tricks. It can truncate volumes on purge as someone already pointed out.

If I were you and wanted to have fixed number of backups regardless of any other parameters, I'd go for maximum volume jobs=1 and apropriate retention and Maximum Volumes. Then I'd go for a separate pool for each client.

This way you'd have a fixed number of volumes in rotation, you'd have a separate media file for each job and with appropriate retention settings you'd recycle oldest volume each time.

One caveat - if you happen to have a job return an error state and want to rerun a job earlier than it's normally scheduled, you'd have more volumes used than you planned so you'd have to manually purge the volume containing errored job.

On 24.04.2020 22:37, Valentin Dzhorov wrote:
I understand the core philosophy of bareos and the fact that as it predecessor bacula are meant to backup tapes. My storage however is consisted of HDDs only and there is no need of changing tape drives. I am reading through the documentation and I thought I got it right, but apparently I didn't. My goal is the following: I want to have full 7 days of backups at any given time for each client that is backed up. A job is configured like so:

[root@directorbareos ~]# cat /etc/bareos/bareos-dir.d/job/ufo1.delta.bg.conf
Job {
  Name = example.com
  Type = Backup
  Level = Full
  Client = example.com
  FileSet= LinuxAll
  Messages = Standard
  Storage = examplestorage
  Pool = LinuxAll
  Schedule = Weekly_10pm
  Priority = 20
  Allow Mixed Priority = yes
  Reschedule On Error = yes
  Reschedule Interval = 180
  Reschedule Times = 2
  Run Script {
    Console = ".bvfs_update jobid=%i"
    RunsWhen = After
    RunsOnClient = No
  }
}


And my volume is configured like so:


Pool {
  Name = example.com
  Pool Type = Backup
  Recycle = yes
  Auto Prune = yes
  Volume Retention = 7 days
  Label Format = "example.com-"
  Volume Use Duration = 14d
  Recycle Oldest Volume = yes
  Storage = examplestorage
}


So, how can I achieve having full 7 days of backup the most efficient way without wasting space and having the old files automatically deleted from the volume, not just the catalog?
--
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 bareos-users+unsubscr...@googlegroups.com <mailto:bareos-users+unsubscr...@googlegroups.com>. To view this discussion on the web visit https://groups.google.com/d/msgid/bareos-users/bfdceca4-6811-4ef2-9f55-80a598b286ac%40googlegroups.com <https://groups.google.com/d/msgid/bareos-users/bfdceca4-6811-4ef2-9f55-80a598b286ac%40googlegroups.com?utm_medium=email&utm_source=footer>.

--
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 bareos-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/bareos-users/e1c8028c-de37-1c28-a0f2-cd1f69b07ed4%40gmail.com.

Reply via email to