Alan Davis schrieb:
> Questions for anyone who's currently using secondary catalogs:
>  
> I may be making this harder than it needs to be, but I need some
> guidance on just how the second catalog gets used.
>  
>  I've succeeded in creating the second db and I've added a second
> Catalog entry in the director config file. I can then execute the
> "use" command to switch catalogs :
>  
>  athos:sysdavis >bconsole
>  Connecting to Director athos.ruckus.com:9101
>  1000 OK: athos-dir Version: 1.39.22 (08 Septermber 2006)
>  Enter a period to cancel a command.
>  *use
>  The defined Catalog resources are:
>       1: MyCatalog
>       2: ArchiveCatalog
>  Select Catalog resource (1-2): 2
>  Using Catalog name=ArchiveCatalog DB=bacula_arc
>  
>  So far, so good. Now I'm stuck because I don't know what operations
>  can/will use the new catalog and what won't.
>  
>  Queries and list commands do use it, but trying to create a Pool in the
>  new catalog, for instance, doesn't work.

I had some problems with a second catalog too. 

http://thread.gmane.org/gmane.comp.sysutils.backup.bacula.general/32045/focus=32063

The pool's that I created before adding a second catalog do exist in
the second catalog too. Even if you delete a pool in your second catalog, it
will be there again after restart! The second catalog's pool is empty, because
the volumes inside the pools are not shared between the two catalogs. Thus
you'll have common pools (pool names), but you have to add volumes to each pool
separately.
  
>  Running a job prompts for the catalog to use, but doesn't use it -
>  all the  data goes into the default MyCatalog. I've tried
>  creating a second client entry that specifies the ArchiveCatalog
>  but that doesn't seem to make a difference either :

This is my config for the second catalog, I created an "alias" for my client.

# Generic catalog service
Catalog {
  Name = MyCatalog
  dbname = bacula; user = bacula; password = "xxx"
}

Catalog {
  Name = ArchiveCatalog
  dbname = bacula_archive
  user = bacula
  password = xxx
}

Client {
  Name = VU0EM003
  Address = 10.60.1.252
  FDPort = 9102
  Catalog = MyCatalog
  Password = "xxxx"
  File Retention = 30 days            # 30 days
  Job Retention = 6 months            # six months
  AutoPrune = yes                     # Prune expired Jobs/Files
}


Client {
  Name = VU0EM003-Archive
  Address = 10.60.1.252
  FDPort = 9102
  Catalog = ArchiveCatalog
  Password = "xxx"
  File Retention = 30 years           # 30 days
  Job Retention = 30 years            # six months
  AutoPrune = no
}


I performed only one backup of the archive client so far. But this worked as
expected.

21-Feb 10:50 VU0EM005: Start Backup JobId 2, 
Job=VU0EM003_Archiv.2007-02-21_10.50.44
21-Feb 10:50 VU0EM005: Spooling data ...
21-Feb 11:56 VU0EM005: Job write elapsed time = 01:05:49, Transfer rate = 54.64 
M bytes/second
21-Feb 11:56 VU0EM005: Committing spooled data to Volume "06D143L3". Despooling 
216,015,495,393 bytes ...
21-Feb 12:47 VU0EM005: Despooling elapsed time = 00:51:08, Transfer rate = 
70.40 M bytes/second
21-Feb 12:53 VU0EM005: Sending spooled attrs to the Director. Despooling 
136,967,826 bytes ...
21-Feb 12:58 VU0EM005: Bacula 2.0.2 (28Jan07): 21-Feb-2007 12:58:17
  JobId:                  2
  Job:                    VU0EM003_Archiv.2007-02-21_10.50.44
  Backup Level:           Full
  Client:                 "VU0EM003-Archive" 2.0.2 (28Jan07) 
x86_64-unknown-linux-gnu,debian,4.0
  FileSet:                "VU0EM003 Full Projekte" 2007-02-21 10:50:44
  Pool:                   "Archiv" (From Job resource)
  Storage:                "NEC-T40A" (From Job resource)
  Scheduled time:         21-Feb-2007 10:50:08
  Start time:             21-Feb-2007 10:50:47
  End time:               21-Feb-2007 12:58:17
  Elapsed time:           2 hours 7 mins 30 secs
  Priority:               10
  FD Files Written:       463,754
  SD Files Written:       463,754
  FD Bytes Written:       215,709,046,419 (215.7 GB)
  SD Bytes Written:       215,806,131,401 (215.8 GB)
  Rate:                   28197.3 KB/s
  Software Compression:   None
  VSS:                    no
  Encryption:             no
  Volume name(s):         06D143L3
  Volume Session Id:      4
  Volume Session Time:    1171980127
  Last Volume Bytes:      215,975,402,496 (215.9 GB)
  Non-fatal FD errors:    0
  SD Errors:              0
  FD termination status:  OK
  SD termination status:  OK
  Termination:            Backup OK





*use
The defined Catalog resources are:
     1: MyCatalog
     2: ArchiveCatalog
Select Catalog resource (1-2): 2
Using Catalog "ArchiveCatalog"
Using Catalog name=ArchiveCatalog DB=bacula_archive
*list volumes
Pool: Default
No results to list.
Pool: CleaningPool
No results to list.
Pool: Archiv
+---------+------------+-----------+---------+-----------------+----------+
| mediaid | volumename | volstatus | enabled | volbytes        | volfiles |
+---------+------------+-----------+---------+-----------------+----------+
|       1 | 06D143L3   | Archive   |       1 | 215,975,402,496 |      216 |
+---------+------------+-----------+---------+-----------------+----------+
[snip]

*list jobs
+-------+-----------------+---------------------+------+-------+----------+
| jobid | name            | starttime           | type | level | jobfiles |
+-------+-----------------+---------------------+------+-------+----------+
|     2 | VU0EM003 Archiv | 2007-02-21 10:50:47 | B    | F     |  463,754 |
+-------+-----------------+---------------------+------+-------+----------+


*use
The defined Catalog resources are:
     1: MyCatalog
     2: ArchiveCatalog
Select Catalog resource (1-2): 2
Using Catalog "ArchiveCatalog"
Using Catalog name=ArchiveCatalog DB=bacula_archive
* list files jobid=2
[snip long file list]

This looks ok to me. All volumes, jobs and files are in the second catalog. One
thing: the "Terminated Jobs" status list will show JobId's from both catalogs.
Thus you'll see duplicated id's comming from the two catalogs.

  
[snip]
>  What am I missing that makes the second catalog useful?
>  Do I need to stop the director and restart it using the second catalog
>  and create pools there and populate them with volumes first?

Restarting the dir might be a good idea.

I create all pools in my first catalog, they can then be used for the second
one too. But you'll have to fill the pools with (different) tapes, because the
volumes are not shared between the catalogs.
  
>  Are there commands or command options that I'm missing that direct
>  operations to use the catalog other than "use"?

No, I think that's ok.

Ralf

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to