Re: [Bacula-users] any way to "collapse" back to a single director?
> On Aug 11, 2018, at 10:47 AM, Phil Stracchino wrote: > > On 08/09/18 11:47, Matthew Arguin wrote: >> But then you lose the historical stuff? Was hoping for a way to sort of >> migrate everything from one to another. I will say that I don’t expect >> that this is doable with out more work than it is worth. > > > Moving the clients is easy. Moving the historical data is hard. As > others have said, you must do it manually. You would have to start out > by changing the numeric IDs of every Job, every Volume, every Pool, > every Client, every Fileset, every Schedule, every type of resource, in > the catalog of the Director(s) you are planning to shut down to values > not used by the one you're trying to keep, and you need to do it > CONSISTENTLY, making sure every single record in the database refers to > every other record it should by the correct *NEW* row IDs. Then you > need to import that data into the Catalog you're keeping without > overwriting any data you already have. > > None of this is anything you should be attempting unless you have strong > SQL database skills and understand how the Bacula catalog tables relate > to each other. And of course, in all cases you should back up all of > your catalog databases first. > > > By comparison, you will probably find it a lot simpler to just add your > Clients and their Filesets and Schedules to the Director you're keeping > and restart it, then keep the other Directors around as backups in case > you need them for restores until their historical data becomes outdated. So far, thought has been given to merging the database. Consider not merging them, but keeping them. My idea: * You can shutdown the other directors. The historical data is in a database. * You can keep the databases. * A given director can using multiple Catalogs. This might be a line of investigation. -- Dan Langille - BSDCan / PGCon d...@langille.org -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] any way to "collapse" back to a single director?
Actually, bscan does exactly what Matthew wants, but it reads Volumes instead of reading the catalog. It might be an interesting project to make a variation of bscan that would scan a Bacula database and pull out selected parts (Jobs, Job names, Clients, ...) and then insert them into the current catalog. Bscan knows how to change the JobIds and other pointers so that they do not clash (basically it creates new Jobs ...). The simplest form of scanning a database could be to copy JobIds, of course, it could be much smarter than bscan which has to create new Pool, ... records without knowing what they are, but this program could find all the parts used by a Job and ensure that they are in the output catalog. There might be some tricky stuff with avoiding naming conflicts -- like two identical Job names in the two databases, but all that can be solved. This might be a big project and I am not sure how useful it could be because I imagine that there are few people who want to consolidate Directors. On the other hand, it could be a very nice tool for Copying or Migrating catalog data from one catalog to another one. E.g. if you wanted to take very old records out and archive them, or move old clients out to an client archive, ... On 08/11/2018 04:47 PM, Phil Stracchino wrote: On 08/09/18 11:47, Matthew Arguin wrote: But then you lose the historical stuff? Was hoping for a way to sort of migrate everything from one to another. I will say that I don’t expect that this is doable with out more work than it is worth. Moving the clients is easy. Moving the historical data is hard. As others have said, you must do it manually. You would have to start out by changing the numeric IDs of every Job, every Volume, every Pool, every Client, every Fileset, every Schedule, every type of resource, in the catalog of the Director(s) you are planning to shut down to values not used by the one you're trying to keep, and you need to do it CONSISTENTLY, making sure every single record in the database refers to every other record it should by the correct *NEW* row IDs. Then you need to import that data into the Catalog you're keeping without overwriting any data you already have. None of this is anything you should be attempting unless you have strong SQL database skills and understand how the Bacula catalog tables relate to each other. And of course, in all cases you should back up all of your catalog databases first. By comparison, you will probably find it a lot simpler to just add your Clients and their Filesets and Schedules to the Director you're keeping and restart it, then keep the other Directors around as backups in case you need them for restores until their historical data becomes outdated. -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] any way to "collapse" back to a single director?
On 08/09/18 11:47, Matthew Arguin wrote: > But then you lose the historical stuff? Was hoping for a way to sort of > migrate everything from one to another. I will say that I don’t expect > that this is doable with out more work than it is worth. Moving the clients is easy. Moving the historical data is hard. As others have said, you must do it manually. You would have to start out by changing the numeric IDs of every Job, every Volume, every Pool, every Client, every Fileset, every Schedule, every type of resource, in the catalog of the Director(s) you are planning to shut down to values not used by the one you're trying to keep, and you need to do it CONSISTENTLY, making sure every single record in the database refers to every other record it should by the correct *NEW* row IDs. Then you need to import that data into the Catalog you're keeping without overwriting any data you already have. None of this is anything you should be attempting unless you have strong SQL database skills and understand how the Bacula catalog tables relate to each other. And of course, in all cases you should back up all of your catalog databases first. By comparison, you will probably find it a lot simpler to just add your Clients and their Filesets and Schedules to the Director you're keeping and restart it, then keep the other Directors around as backups in case you need them for restores until their historical data becomes outdated. -- Phil Stracchino Babylon Communications ph...@caerllewys.net p...@co.ordinate.org Landline: +1.603.293.8485 Mobile: +1.603.998.6958 -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] any way to "collapse" back to a single director?
Hello, 2018-08-09 17:03 GMT+02:00 Matthew Arguin : > Looking for a way to (if at a feasible) collapse multiple bacula directors > in to a single one. Anyone done this or “seen” this done? > > You have to do it manually. It is technically possible but require a great knowledge of Bacula internals. best regards -- Radosław Korzeniewski rados...@korzeniewski.net -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] any way to "collapse" back to a single director?
But then you lose the historical stuff? Was hoping for a way to sort of migrate everything from one to another. I will say that I don’t expect that this is doable with out more work than it is worth. From: Uwe Schuerkamp [mailto:uwe.schuerk...@gmail.com] Sent: Thursday, August 9, 2018 11:41 AM To: Matthew Arguin Cc: bacula-users@lists.sourceforge.net Subject: Re: [Bacula-users] any way to "collapse" back to a single director? I guess the easiest way would be to migrate your clients back to a single (new) director one by one. Takes longer, but should be more reliable than trying to merge several different catalogues back into a single instance. All the best, Uwe On 9 August 2018 at 17:03, Matthew Arguin mailto:matt.arg...@oanda.com> > wrote: Looking for a way to (if at a feasible) collapse multiple bacula directors in to a single one. Anyone done this or “seen” this done? -matt -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net <mailto:Bacula-users@lists.sourceforge.net> https://lists.sourceforge.net/lists/listinfo/bacula-users -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] any way to "collapse" back to a single director?
As long as you keep the "old" director running you should be fine. Simply move the client to the new director once the next "full" is up and remove it (or disable the job) from the old one. Once you have all your stuff on the new director, you should be good to go. If you have ancient tapes and / or online volumes you could always use some clever bextract / bls hacks to extract the old data on those volumes. All the best, Uwe On 9 August 2018 at 17:47, Matthew Arguin wrote: > But then you lose the historical stuff? Was hoping for a way to sort of > migrate everything from one to another. I will say that I don’t expect > that this is doable with out more work than it is worth. > > > > *From:* Uwe Schuerkamp [mailto:uwe.schuerk...@gmail.com] > *Sent:* Thursday, August 9, 2018 11:41 AM > *To:* Matthew Arguin > *Cc:* bacula-users@lists.sourceforge.net > *Subject:* Re: [Bacula-users] any way to "collapse" back to a single > director? > > > > I guess the easiest way would be to migrate your clients back to a single > (new) director one by one. Takes longer, but should be more reliable than > trying to merge several different catalogues back into a single instance. > > > > All the best, Uwe > > > > > > On 9 August 2018 at 17:03, Matthew Arguin wrote: > > Looking for a way to (if at a feasible) collapse multiple bacula directors > in to a single one. Anyone done this or “seen” this done? > > > > -matt > > > > -- > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > ___ > Bacula-users mailing list > Bacula-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/bacula-users > > > -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] any way to "collapse" back to a single director?
I guess the easiest way would be to migrate your clients back to a single (new) director one by one. Takes longer, but should be more reliable than trying to merge several different catalogues back into a single instance. All the best, Uwe On 9 August 2018 at 17:03, Matthew Arguin wrote: > Looking for a way to (if at a feasible) collapse multiple bacula directors > in to a single one. Anyone done this or “seen” this done? > > > > -matt > > > -- > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > ___ > Bacula-users mailing list > Bacula-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/bacula-users > > -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users