On 06/14/16 09:10 AM, Robert N wrote: > Hi, > > I've migrated from bacula to bareos, and need to keep the bacula catalog, in > case I need to restore something from the bacula era, so decided to import > the old bacula catalog in bareos as a second catalog and go with 2 catalogs > in paralel. All the new jobs go into bareos catalog ( MyCatalog ). > Unfortunately, the copy jobs fail with the following error: > I think it would have been easier to just have upgraded the Bacula DB then you can restore from the same software.
> 14-Jun 09:02 backup-1-dir JobId 8: The defined Catalog resources are: > 14-Jun 09:02 backup-1-dir JobId 8: 1: MyCatalog > 14-Jun 09:02 backup-1-dir JobId 8: 2: bacula > 14-Jun 09:02 backup-1-dir JobId 8: Your request has multiple choices for > "Catalog". Selection is not possible in batch mode. > 14-Jun 09:02 backup-1-dir JobId 8: Could not find a Catalog resource > 14-Jun 09:02 backup-1-dir JobId 8: Error: Could not start migration job. > Build OS: x86_64-redhat-linux-gnu redhat CentOS release 6.7 > (Final) > Current JobId: 8 > Current Job: CopyToTape.2016-06-14_09.02.00_04 > Catalog: "MyCatalog" (From Job resource) > Start time: 14-Jun-2016 09:02:02 > End time: 14-Jun-2016 09:02:02 > Elapsed time: 0 secs > Priority: 12 > Termination: Copying -- OK > Problem is most likely that the CopyJob inserts multiple worker Job that do the real work. The so called selection Job doesn't pass on any catalog settings to those. > > The copy jobs were working until I imported the bacula catalog as a second > catalog. > > Any clues? how could I make this setup work? I wonder why you want to have the catalog defined at all times. It may be a option to just enable the extra catalog only when you need it. You might try the following patch against master and compile things yourself. commit d875c1d17ba1d5ae97e9672cfade3d9b32b5cfaa (mvw/copy-job-catalog) Author: Marco van Wieringen <[email protected]> Date: Tue Jun 14 09:59:10 2016 +0200 dird: Pass explicit catalog setting to copy/migrate jobs. When selecting the Jobs for Migrate and Copy add a catalog=<catalog_name> to the run cmdline generated. diff --git a/src/dird/migrate.c b/src/dird/migrate.c index 5ce7f9c..2c16df0 100644 --- a/src/dird/migrate.c +++ b/src/dird/migrate.c @@ -379,6 +379,14 @@ static inline void start_new_migration_job(JCR *jcr) } } + /* + * See if an explicit catalog is given. + */ + if (jcr->res.catalog) { + Mmsg(cmd, " catalog=\"%s\"", jcr->res.catalog->name()); + pm_strcat(ua->cmd, cmd.c_str()); + } + Dmsg2(dbglevel, "=============== %s cmd=%s\n", jcr->get_OperationName(), ua->cmd); parse_ua_args(ua); /* parse command */ No idea if this works at all its just a quick hack for this particular setup. -- Marco van Wieringen [email protected] Bareos GmbH & Co. KG Phone: +49-221-63069389 http://www.bareos.com Sitz der Gesellschaft: Köln | Amtsgericht Köln: HRA 29646 Komplementär: Bareos Verwaltungs-GmbH Geschäftsführer: Stephan Dühr, M. Außendorf, J. Steffens, P. Storz, M. v. Wieringen -- You received this message because you are subscribed to the Google Groups "bareos-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. For more options, visit https://groups.google.com/d/optout.
