Hello Saeed,
Thanks for providing more details.
Baculum does not support multiple catalogs with one Director. The
selection that you can see:
The defined Catalog resources are:
1: MyCatalog1
2: MyCatalog2
Baculum is not able to answer because it does not know what catalog to
select. For catalog per director it works because catalog is
autoselected in this case.
But I think that you can try a workaround that could work. If you
want, you can define two restricted Bacula Console resources: one with
CatalogACL = MyCatalog1 and one with CatalogACL = MyCatalog2. Rest
resources (JobACL, ClientACL...etc.) could have full access in
Consoles. Then you can prepare a bconsole.conf file for each host with
a dedicated configuration to connect to the first console on host1 and
to connect to the second console on host2. This way the Catalog
selection could be skipped.
I didn't test the above configuration but I think it has a chance to
work. If you decide to try, I appreciate your feedback.
Good luck.
Best regards,
Marcin Haba (gani)
On Thu, 13 Jan 2022 at 12:39, Saeed Green <[email protected]> wrote:
>
> Thank you for your response.
> Environment :
> There is one Director which host 1 and host 2 connected to it. bacula-server
> and bacula-client installed in host1 . baculum-web and baculum-api installed
> in host1. PostgreSQL server installed in host1.
> bacula-client and baculum-api installed in host 2.
> host1 has its own Catalog (MyCatalog1) and host2 either has its own
> Catalog(MyCatalog2). all Cataloges saved in PostgreSQL server in host1.
> bconsole in host1 as well as bconsole in host2 both connected to the same
> Director.
>
> I backed up my FileSet in host1 very well. as well I backed up my FileSet in
> host2.
>
> results with bconsole:
> *restore
> The defined Catalog resources are:
> 1: MyCatalog1
> 2: MyCatalog2
> Select Catalog resource (1-2): 2
> Using Catalog "MyCatalog2"
>
> First you select one or more JobIds that contain files
> to be restored. You will be presented several methods
> of specifying the JobIds. Then you will be allowed to
> select which files from those JobIds are to be restored.
>
> To select the JobIds, you have the following choices:
> 1: List last 20 Jobs run
> 2: List Jobs where a given File is saved
> 3: Enter list of comma separated JobIds to select
> ........
> Select item: (1-13): 2
> Automatically selected Client: win-11ijafgb35k-fd
> +-------+------------+---------------------+---------+-----------+----------+------------+
> | jobid | name | starttime | jobtype | jobstatus | jobfiles |
> jobbytes |
> +-------+------------+---------------------+---------+-----------+----------+------------+
> | 1 | C:/backup/ | 2022-01-12 18:48:03 | B | T | 28 |
> 38988649 |
> +-------+------------+---------------------+---------+-----------+----------+------------+
> To select the JobIds, you have the following choices:
> 1: List last 20 Jobs run
> 2: List Jobs where a given File is saved
> 3: Enter list of comma separated JobIds to select
> ............
> Select item: (1-13): 3
> Enter JobId(s), comma separated, to restore: 1
> You have selected the following JobId: 1
>
> Building directory tree for JobId(s) 1 ...
> 26 files inserted into the tree.
>
> You are now entering file selection mode where you add (mark) and
> remove (unmark) files to be restored. No files are initially added, unless
> you used the "all" keyword on the command line.
> Enter "done" to leave this mode.
>
> cwd is: /
> $ ls
> C:/
>
> and results with My Catalog 1 :
> *restore
> The defined Catalog resources are:
> 1: MyCatalog1
> 2: MyCatalog2
> Select Catalog resource (1-2): 1
> Using Catalog "MyCatalog1"
>
> First you select one or more JobIds that contain files
> to be restored. You will be presented several methods
> of specifying the JobIds. Then you will be allowed to
> select which files from those JobIds are to be restored.
>
> To select the JobIds, you have the following choices:
> 1: List last 20 Jobs run
> 2: List Jobs where a given File is saved
> 3: Enter list of comma separated JobIds to select
> ........
> Select item: (1-13): 1
> +-------+-----------------------+-------------------+---------------------+----------+----------+-----------+
> | jobid | client | name | starttime |
> joblevel | jobfiles | jobbytes |
> +-------+-----------------------+-------------------+---------------------+----------+----------+-----------+
> | 5 | main-fd | BackupCatalog | 2022-01-12 23:10:03 | F | 1
> | 70094 |
> | 4 | main-fd | BackupMain1 | 2022-01-12 23:05:02 | I | 0 |
> 0 |
> | 3 | main-fd | BackupMain1 | 2022-01-12 17:34:09 | F | 21 |
> 9877691 |
> | 2 | main-fd | BackupCatalog | 2022-01-12 17:32:09 | F | 1
> | 55674 |
> +-------+-----------------------+-------------------+---------------------+----------+----------+-----------+
> To select the JobIds, you have the following choices:
> 1: List last 20 Jobs run
> 2: List Jobs where a given File is saved
> 3: Enter list of comma separated JobIds to select
> ........
> Select item: (1-13): 3
> Enter JobId(s), comma separated, to restore: 5
> You have selected the following JobId: 5
>
> Building directory tree for JobId(s) 5 ...
> 1 files inserted into the tree.
>
> You are now entering file selection mode where you add (mark) and
> remove (unmark) files to be restored. No files are initially added, unless
> you used the "all" keyword on the command line.
> Enter "done" to leave this mode.
>
> cwd is: /
> $ ls
> opt/
> :
> but for bvfs :
> *.bvfs_update
> *.bvfs_lsdir jobid=1 path=""
> 6 0 0 0 A A A A A A A A A A A A A A .
> *.bvfs_lsdir jobid=5 path=""
> 6 0 0 0 A A A A A A A A A A A A A A .
> 5 0 0 0 A A A A A A A A A A A A A A /
>
> On Thu, Jan 13, 2022 at 9:39 AM Marcin Haba <[email protected]> wrote:
>>
>> Hello Saeed,
>>
>> Could you describe your Bacula environment? How do you use the two
>> Catalogs? Are they separated with their own Directors or you use one
>> Director?
>>
>> For the bvfs requests, it looks that for jobid=1 .bvfs_update command
>> has not been done or there are no file records for this job in the
>> catalog (pruned records or empty backup). For test I propose to do in
>> bconsole:
>>
>> .bvfs_update jobid=1
>> .bvfs_lsdirs jobid=1 path=""
>>
>> Is now something changed in the output?
>>
>> To see files in the catalog it might be useful to run:
>>
>> list files jobid=1
>>
>> Best regards,
>> Marcin Haba (gani)
>>
>> On Wed, 12 Jan 2022 at 18:08, Saeed Green <[email protected]> wrote:
>> >
>> > Hello
>> >
>> > I installed bacula 11.0.5 with baculum 11.0.5.7
>> > I installed two baculum-api and connect it to two different catalog
>> > host1=baculum-api:9096 => MyCatalog1
>> > host2=baculum-api:9097 => MyCatalog2
>> >
>> > Everything is ok with the bconsole and I can restore my files with it and
>> > even see the list of my files.
>> > but when I want to restore my files with baculum , host which connected to
>> > MyCatalog1 can see its list of files and can restore its files (which is
>> > main Catalog beside baculum-web)... host which connected to MyCatalog2
>> > cannot see its list of files and select what he wants, and he just can
>> > restore all of his backup.
>> > .....
>> > output of " /api/v2/bvfs/lsdirs?jobids=1&path=&limit=8 " in host1
>> >
>> > {
>> > "output": [
>> > ".bvfs_lsdirs jobid=\"1\" path=\"\" limit=\"8\"",
>> > "Using Catalog \"MyCatalog1\"",
>> > "6\t0\t0\t0\tA A A A A A A A A A A A A A\t."
>> > ],
>> > "error": 0
>> > }
>> >
>> > output of " /api/v2/bvfs/lsdirs?jobids=1&path=&limit=8 " in host2
>> >
>> > {
>> > "output": [
>> > ".bvfs_lsdirs jobid=\"1\" path=\"\" limit=\"8\"",
>> > "Using Catalog \"MyCatalog2\"",
>> > "6\t0\t0\t0\tA A A A A A A A A A A A A A\t."
>> > ],
>> > "error": 0
>> > }
>> >
>> > Is it ok that the output of these two different hosts is the same?
>> >
>> > Am I missing something?!
>> >
>> > _______________________________________________
>> > Bacula-users mailing list
>> > [email protected]
>> > https://lists.sourceforge.net/lists/listinfo/bacula-users
>>
>>
>>
>> --
>> "Greater love hath no man than this, that a man lay down his life for
>> his friends." Jesus Christ
>>
>> "Większej miłości nikt nie ma nad tę, jak gdy kto życie swoje kładzie
>> za przyjaciół swoich." Jezus Chrystus
--
"Greater love hath no man than this, that a man lay down his life for
his friends." Jesus Christ
"Większej miłości nikt nie ma nad tę, jak gdy kto życie swoje kładzie
za przyjaciół swoich." Jezus Chrystus
_______________________________________________
Bacula-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bacula-users