Having looked at the job log from a Baculum restore I can see that it is
going back to the last full and restoring full, diffs, incrs in order.

Is it not possible to restore from a particular job alone in Baculum as is
possible with bconsole?

-Chris-

On Fri, 27 Oct 2023, 23:09 Chris Wilkinson, <winstonia...@gmail.com> wrote:

> Yes Bill that is very helpful.
>
> It is exactly as you say when I use bconsole restore. That works. I must
> have made a mistake when I tried with bconsole previously.
>
> I'm not able to reproduce that behaviour using Baculum, it always restores
> from a full irrespective of the level of the job being restored. There
> doesn't seem to be an equivalent of selecting a specific job ID.
>
> I take your point about schedule being unwanted but it shouldn't do any
> harm. I'll take it out for tidiness :).
>
> -Chris-
>
> On Fri, 27 Oct 2023, 22:42 Bill Arlofski via Bacula-users, <
> bacula-users@lists.sourceforge.net> wrote:
>
>> Resending to list. Accidentally directly replied to Chris...
>>
>>
>>
>> On 10/27/23 14:46, Chris Wilkinson wrote:
>> > Till now I have only ever done restores of full backups using the
>> restore wizard of Baculum. When I did a restore of an
>> > Incremental backup, I found that it reverted to restoring the last full
>> backup. I get exactly the same behaviour using  bconsole restore.
>>
>> When you do a restore in bconsole, by simply typing `restore`, you are
>> presented with a menu of options.
>>
>> Most people will want option 5 or 6, sometimes 12.
>>
>> When you choose 5 or 6, Bacula will build the virtual restore directory
>> tree from the last Full + all Incs up to the latest
>> Inc (or from the last Full and the last Diff and then any Incs that
>> followed)
>>
>> Bacula will even tell you what jobids, their levels, and the volumes it
>> has selected to build the restore tree from:
>> ----8<----
>> * restore
>>
>> ...choose option 5
>> ...select Client
>> ...select Fileset
>>
>> +--------+-------+-----------+-----------------+---------------------+--------------+
>> | jobid  | level | jobfiles  | jobbytes        | starttime           |
>> volumename   |
>>
>> +--------+-------+-----------+-----------------+---------------------+--------------+
>> | 57,311 | F     | 1,126,917 | 246,459,324,137 | 2023-09-30 23:00:00 |
>> c0_0008_0035 |
>> | 57,311 | F     | 1,126,917 | 246,459,324,137 | 2023-09-30 23:00:00 |
>> c0_0008_0040 |
>> | 57,311 | F     | 1,126,917 | 246,459,324,137 | 2023-09-30 23:00:00 |
>> c0_0008_0060 |
>> | 57,311 | F     | 1,126,917 | 246,459,324,137 | 2023-09-30 23:00:00 |
>> c0_0008_0056 |
>> | 57,311 | F     | 1,126,917 | 246,459,324,137 | 2023-09-30 23:00:00 |
>> c0_0008_0068 |
>> | 57,311 | F     | 1,126,917 | 246,459,324,137 | 2023-09-30 23:00:00 |
>> c0_0008_0064 |
>> [...snip ...]
>> | 57,336 | I     |     2,408 |   6,799,759,717 | 2023-10-01 23:00:01 |
>> c0_0008_0042 |
>> | 57,360 | I     |     4,419 |  12,524,588,799 | 2023-10-02 23:00:00 |
>> c0_0008_0062 |
>> | 57,360 | I     |     4,419 |  12,524,588,799 | 2023-10-02 23:00:00 |
>> c0_0008_0042 |
>> | 57,389 | I     |     5,654 |  22,617,335,979 | 2023-10-03 23:00:00 |
>> c0_0008_0049 |
>> | 57,389 | I     |     5,654 |  22,617,335,979 | 2023-10-03 23:00:00 |
>> c0_0008_0012 |
>> | 57,389 | I     |     5,654 |  22,617,335,979 | 2023-10-03 23:00:00 |
>> c0_0008_0037 |
>> | 57,416 | I     |     7,835 |  11,500,849,933 | 2023-10-04 23:00:01 |
>> c0_0005_0035 |
>> | 57,416 | I     |     7,835 |  11,500,849,933 | 2023-10-04 23:00:01 |
>> c0_0005_0031 |
>> | 57,440 | I     |   343,892 |  29,334,262,930 | 2023-10-24 10:16:33 |
>> c0_0005_0061 |
>> | 57,440 | I     |   343,892 |  29,334,262,930 | 2023-10-24 10:16:33 |
>> c0_0005_0035 |
>> | 57,440 | I     |   343,892 |  29,334,262,930 | 2023-10-24 10:16:33 |
>> c0_0005_0039 |
>> | 57,440 | I     |   343,892 |  29,334,262,930 | 2023-10-24 10:16:33 |
>> c0_0005_0069 |
>> | 57,446 | I     |     5,753 |  11,490,954,183 | 2023-10-24 23:00:00 |
>> c0_0005_0023 |
>> | 57,446 | I     |     5,753 |  11,490,954,183 | 2023-10-24 23:00:00 |
>> c0_0005_0024 |
>> | 57,477 | I     |     6,270 |  22,715,024,368 | 2023-10-25 23:00:01 |
>> c0_0005_0051 |
>> | 57,477 | I     |     6,270 |  22,715,024,368 | 2023-10-25 23:00:01 |
>> c0_0005_0015 |
>> | 57,477 | I     |     6,270 |  22,715,024,368 | 2023-10-25 23:00:01 |
>> c0_0005_0033 |
>>
>> +--------+-------+-----------+-----------------+---------------------+--------------+
>> You have selected the following JobIds:
>> 57311,57336,57360,57389,57416,57440,57446,57477
>>
>> Building directory tree for JobId(s)
>> 57311,57336,57360,57389,57416,57440,57446,57477 ..
>> ----8<----
>>
>> IF, on the other hand, you just want to restore some files that were
>> backed up in a specific inc or Diff, simply specify the
>> jobid on the restore command line:
>> ----8<----
>> * restore jobid=57477
>> You have selected the following JobId: 57477
>>
>> Building directory tree for JobId(s) 57477 ...
>> +++++++++++++++++++++++++++++++++++
>> 4,452 files inserted into the tree.
>> ----8<----
>>
>>
>> > This is the restore job resource.
>> >
>> > Job {
>> >    Name = "Restore"
>> >    Description = "Restore template"
>> >    Type = "Restore"
>> >    Level = "Full"
>> >    Messages = "Standard"
>> >    Storage = "dns-325-sd"
>> >    Pool = "usb16tb-full"
>> >    Client = "usb16tb-fd"
>> >    Fileset = "usb16tb"
>> >    Schedule = "sched_none"
>> > }
>> >
>> > I had thought that most of these directives are not actually used as is
>> but would be overridden by the wizard, i.e. the
>> > values here are required but unimportant.
>>
>> I have no idea what Baculum does, Marcin can answer you definitively, but
>> I bet there is a way to "restore files only from
>> selected jobid" or similar option.
>>
>>
>> > I also thought that only one 'dummy' restore job is needed that would
>> be populated by the appropriate level, pool etc. from
>> > the job/level being restored but that isn't what actually happens. It
>> looks like the restore is taking its' level from the
>> > restore job above.
>>
>> There is no such thing as a 'level' when doing a restore. The Bacula
>> config parser requires certain things to be in each Job
>> resource, and a `Type = Restore` Job resource is a Job just like any
>> other.
>>
>> The pool, client, fileset, and storage are ignore as these are already
>> known from the backup job(s)
>>
>> Also, you should not have a `Schedule =` defined in a `Type = Restore`
>> Job. You will never actually "run" a Job of `Type =
>> Restore` (Except when instructed to in the Admin I course) ;)
>>
>>
>> > I have separate pools for each job and level.
>> >
>> > Do I need to define individual restore jobs for every job/level?
>>
>> Absolutely not.
>>
>> Again, there is no such thing as a "Level" when doing a restore.
>>
>> The only reason I have typically found to have more than one `Type =
>> Restore` Job is when you often restore to Windows and
>> Linux, and/or Mac systems, so I might have one for each system type and
>> then, the only thing that is different might be the
>> `Where =` since I might want `/tmp/` on a Linux system, and `C:/temp` on
>> a Windows system (just for example)
>>
>>
>> Hope this helps!
>> Bill
>>
>> --
>> Bill Arlofski
>> w...@protonmail.com
>>
>> _______________________________________________
>> Bacula-users mailing list
>> Bacula-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/bacula-users
>>
>
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to