Keep a deleted file in backup for a certain time

20 views
Skip to first unread message

F S

unread,
Mar 17, 2021, 9:41:48 AM3/17/21
to bareos-users

Hi,

I want to set up a backup of a fileserver with the following parameters:
- we need to keep files in the backup for at least 30 days but not longer
- incremental Backups are created every night every day
- every other Saturday a virtual full backup is created
- we have two full backup volumes which are switched every other Saturday when the virtual full backup is running
- the incremental volumes are rotated as well and will be overwritten after the virtual full

This is working fine except one issue.
When a file is created e.g. on Monday it is backup in a incremental backup. When it is deleted on Thursday it will not be in the virtual full backup next Saturday, because of accurate = yes setting.
So the file will not be in the backup for at least 30 days. If I set accurate = no it never is removed from the full backup even after months.
Is there some setting I'm missing? Or do I have to keep the incremental backup for at least 30 days which will lead to much more needed volumes/disk space.

Thanks and best regards
Fabian

Brock Palen

unread,
Mar 18, 2021, 9:18:31 AM3/18/21
to F S, bareos-users
I don’t think you can avoid what you said if you want 30 days of changes always. You will need that extra space.
Also by doing a VirtualFull on a specific date you loose all your incrementals, so every other week you lose all your changes depending on your settings.

If you just want every other week a snapshot of “how things look now” in case something happens, keep it off site etc, you can do what I do monthly which is take an archive job,
It’s a VirtualFull that doesn’t set AlwaysIncremental = yes that leaves the full in place without purging all the incrementals. I also send it to it’w own pool “Virtual Full Backup Pool” and is taken off site.

Because of how bareos manages Consolidations, we then mark the job type as an archive job. It will then age out based on volume retention time etc. But it will not be used in consolidations _or restroes_ until you update the job back to a backup job. When we have had errors that caused fulls to be lost I update the job and then run a normal backup job but with type VirtualFull so it will use the incrementals and the archive job to make a new full with a current view of the world.

Hopfully that helps.

JobDefs {
Name = "DefaultArchive"
Type = Backup
Level = VirtualFull
Client = myth-fd
Storage = T-LTO4
Messages = Standard
Allow Mixed Priority = yes
Priority = 4
#Allow Duplicate Jobs = no # see: https://bugs.bareos.org/view.php?id=792 Can't use this setting
Write Bootstrap = "/var/lib/bareos/%c.bsr"
Spool Data = no
Accurate = yes

Virtual Full Backup Pool = LTO4
Next Pool = LTO4
Pool = AI-Consolidated

Run Script {
console = "update jobid=%i jobtype=A"
Runs When = After
Runs On Client = No
Runs On Failure = No
}
Enabled = no

}


Brock Palen
bro...@mlds-networks.com
www.mlds-networks.com
Websites, Linux, Hosting, Joomla, Consulting
> --
> 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...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/bareos-users/e4fe01ce-c13d-4dfa-b1aa-e35492407da7n%40googlegroups.com.

F S

unread,
Mar 19, 2021, 3:29:06 AM3/19/21
to bareos-users
Hi Brock,
thanks for the detailed answer. It sure helps a lot.

Best regards
Fabian
Reply all
Reply to author
Forward
0 new messages