Re: Restoring everything with dar_manager

John Goerzen <[email protected]> Tue, 20 Jun 2023 10:23:15 -0500
Newsgroups gmane.comp.sysutils.backup.dar.support
Message-ID <[email protected]>
On Sun, Jun 18 2023, Denis Corbin wrote:

>>>> Further let's imagine that before running backup #3, you created 10GB of
>>>> data, which was deleted before running backup #4.  Backup #4 isn't going
>>>> to record that deletion, since that data wasn't present in #1.  What
>>>> will the result be?
>>> for each particular entry, dar_manager has a list of status per backup stored in
>>> the database. Adding a new backup which does not contain a given entry leads to
>>> the same result in the database as adding a differential backup which records
>>> this file as removed. As such, these 10G of data would not be restored.
>> Right, but let's say we can't use dar_manager - perhaps because we want
>> to restore it all.  Here's a test I did:
>> jgoerzen@hephaestus:/tmp/dartest$ mkdir data
>> jgoerzen@hephaestus:/tmp/dartest$ echo one > data/file1
>> jgoerzen@hephaestus:/tmp/dartest$ dar -c bak1 -R data
>> jgoerzen@hephaestus:/tmp/dartest$ dar -c bak2 --ref bak1 -R data
>> jgoerzen@hephaestus:/tmp/dartest$ rm data/file2
>
> where file2 comes from? When has it been created?
>
Whoops.  Copy/paste error.  There was an "echo two > data/file2" after
the back1 was created.

>
>> jgoerzen@hephaestus:/tmp/dartest$ dar -c bak3 --ref bak1 -R data
>> jgoerzen@hephaestus:/tmp/dartest$ dar -x bak1 -R restore
>> jgoerzen@hephaestus:/tmp/dartest$ dar -x bak2 -R restore
>> jgoerzen@hephaestus:/tmp/dartest$ dar -x bak3 -R restore
>
> after bak1, you should restore either bak2 or bak3, it does not make sens to
> restore bak3 after bak2 because they are on different branches (= they don't
> depend on one another, or if you prefer, the first is not the reference of the
> second)
>
> This is advantage of differential backups compared to incremental ones:
> you don't need to restore intermediate backup (here bak2) between a differential
> and the full backup it has been based on... But if you absolutely want to
> restore all three of them, then rather use incremental backups, making bak2
> being the reference backup of bak3.

Right.  The trick here is managing all of this as a user.  I suppose I
could name backups with a "level", as I once did with the old tape days.
So then a restore would be the most recent level 1, the most recent
level 2, the most recent level 3, etc.  Though if one makes a lot of
incrementals, you could get pretty high with the list of levels.

This was what drew me to dar_manager: now I don't have to worry about
that.  All I need to do is add the backups to the dar_manager database
in the order they were created, and dar_manager will figure out exactly
what I need for a restore.

> Anyway, if you don't want to bother with incremental / differential you can go
> one step above dar: there are, for example, SaraB and Baras projects that can do
> this job for you:
>
> https://sarab.sourceforge.net/

Thanks for the nudge to more thoroughly check out the page of projects
built atop dar.  I hadn't looked into those much because they looked
abandoned.  Looking at them now, it seems they are based around the idea
that a single device can hold the entirety of the backups (the "virtual
tape" directories), which is not the case for my scenario.  SaraB's
website suggests it could be used for backing up to DVDs but I'm not
immediately seeing how it helps with this.  But, I will take a closer
look.  It looks like several of the tools could be useful when the
entire backup set fits on a single removable drive.

Thanks!

- John