Bacula-users

Re: [Bacula-users] Restore problem out of the blue - scratch pool is suddenly "invalid"

2017-01-15 16:35:17
Subject: Re: [Bacula-users] Restore problem out of the blue - scratch pool is suddenly "invalid"
From: Kern Sibbald <kern AT sibbald DOT com>
To: Phil Stracchino <phils AT caerllewys DOT net>, bacula-users AT lists.sourceforge DOT net
Date: Sun, 15 Jan 2017 22:34:12 +0100
Hello Phil,

It is a bit late here so I will look at all your output tomorrow, but if 
you have the patience, go to:

<bacula>/src/dird/ua_run.c
then at line 1074, you should have the following lines of code:

    /* Not a good idea to start a job with the Scratch pool */
    if (rc.pool && strcmp(rc.pool->name(), NT_("Scratch")) == 0) {
       ua->send_msg(_("Pool \"Scratch\" not valid.\n"));
       return false;
    }

Just delete all those lines (or if you want, only the "return false;"), 
but be careful to leave the next line, which
reads:

    return true;

===

That should resolve your problem.

Best regards,
Kern

On 01/15/2017 07:56 PM, Phil Stracchino wrote:
> Removed Storage from the Scratch pool definition.
> Updated the Scratch pool from resource.
> Re-updated director from 7.4.3 to 7.4.4
> Re-entered the restore job.  Job failed with the same
> invalid-scratch-pool message.
>
>
> cwd is: /
> $ cd /home/alaric
> cwd is: /home/alaric/
> $ cd ".moonchild productions"
> cwd is: /home/alaric/.moonchild productions/
> $ cd "pale moon"
> cwd is: /home/alaric/.moonchild productions/pale moon/
> $ mark alaric
> 1,207 files marked.
> $ exit
> Bootstrap records written to /var/lib/bacula/minbar-dir.restore.1.bsr
> Bootstrap records written to /var/lib/bacula/minbar-dir.restore.1.bsr
>
> The Job will require the following (*=>InChanger):
>     Volume(s)                 Storage(s)                SD Device(s)
> ===========================================================================
>
>      LTO4-FULL-0013            babylon5-sd               LTO-4
>      DIFF-20170109-04:30       babylon4-file             FileStorage
>      INCR-20170115-04:30       babylon4-file             FileStorage
>
> Volumes marked with "*" are in the Autochanger.
>
>
> 1,210 files selected to be restored.
>
> Using Catalog "Catalog"
> Pool "Scratch" not valid.
> Job not run.
> You have messages.
> *llist volume=LTO4-FULL-0013
>            MediaId: 48
>         VolumeName: LTO4-FULL-0013
>               Slot: 0
>             PoolId: 6
>          MediaType: LTO-4
>        MediaTypeId: 0
> ...
>      ScratchPoolId: 0
>      RecyclePoolId: 0
> ...
>
> *llist volume=DIFF-20170109-04:30
>            MediaId: 1,991
>         VolumeName: DIFF-20170109-04:30
>               Slot: 0
>             PoolId: 4
>          MediaType: File
>        MediaTypeId: 0
> ...
>      ScratchPoolId: 0
>      RecyclePoolId: 1
> ...
>
> *llist volume=INCR-20170115-04:30
>            MediaId: 1,997
>         VolumeName: INCR-20170115-04:30
>               Slot: 0
>             PoolId: 5
>          MediaType: File
>        MediaTypeId: 0
> ...
>      ScratchPoolId: 0
>      RecyclePoolId: 1
> ...
>
> *list pools
> +--------+-------------+---------+---------+----------+---------------------------------------------------------------------------------------+
> | PoolId | Name        | NumVols | MaxVols | PoolType | LabelFormat
>                                                                       |
> +--------+-------------+---------+---------+----------+---------------------------------------------------------------------------------------+
> |      1 | Scratch     |       1 |       0 | Backup   | *
>                                                                       |
> |      2 | VirtualFull |       0 |       0 | Backup   |
> VIRTUAL-$Year${Month:p/2/0/r}${Day:p/2/0/r}-${Hour:p/2/0/r}:${Minute:p/2/0/r}-$Client
> |
> |      3 | Full-Disk   |       0 |       0 | Backup   |
> FULL-$Year${Month:p/2/0/r}${Day:p/2/0/r}-${Hour:p/2/0/r}:${Minute:p/2/0/r}
>             |
> |      4 | Diff-Disk   |       6 |       0 | Backup   |
> DIFF-$Year${Month:p/2/0/r}${Day:p/2/0/r}-${Hour:p/2/0/r}:${Minute:p/2/0/r}
>             |
> |      5 | Incr-Disk   |      27 |       0 | Backup   |
> INCR-$Year${Month:p/2/0/r}${Day:p/2/0/r}-${Hour:p/2/0/r}:${Minute:p/2/0/r}
>             |
> |      6 | Full-Tape   |      21 |      24 | Backup   | LTO4-FULL-
>                                                                       |
> +--------+-------------+---------+---------+----------+---------------------------------------------------------------------------------------+
>
>
>
>
> I do notice that the scratch pool ID for all of these pools is 0.  There
> is no pool with id 0, and in fact I am not setting a Scratch pool for
> any of my pools.  Could this be the problem?
>
>
>


------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users