Re: [Bacula-users] lost hard drive bacula was on
I think this will be a good lesson learned, I don't have any copies of bacula conf Luckily what has been lost was called our junk drive which was a place to store useful but unimportant data and downloads. I'm considering installing the latest and starting again from scratch. Thanks for all the help and if anyone has any other ideas please let me know Regards, John - Original Message - From: Timo Neuvonen timo-n...@tee-en.net To: bacula-users@lists.sourceforge.net Sent: Monday, 10 August, 2009 16:33:18 GMT +00:00 GMT Britain, Ireland, Portugal Subject: Re: [Bacula-users] lost hard drive bacula was on John Fitzpatrick jfitzpatr...@altobridge.com kirjoitti viestissä news:26267652.21249891473334.javamail.alto...@alto32... Hi Ryan, Thanks for the reply, just reading up on bextract now. Can anybody confirm I can install the latest bacula Thanks, John Bacula catalog database structure has changed (I think more than once) between 1.38.5 and the latest release, 3.0.2. This means you'll need to be able to upgrade the catalog contents before 3.0.x can use the catalog you'll be able to exract from your media with bextract. If it were a regular upgrade from an existing bacula installation, the upgrade should be rather straightforward. I don't know if you'll now need to install 3.0.x first, then drop the empty database, restore the extracted catalog information from an ascii dump, and upgrade that resulting catalog, or if the proper sequence is something else. But there will be some extra steps involved, I think. Unless someone can tell the right way of doing it, I propably would start with installing 1.38 because it should accept the same catalog database. This way there would be a working system with less required steps, and you could verify the catalog at the earliest possible point. Another issue conflicting my idea above is, that some bacula tape utility (maybe bextract, maybe bscan, maybe something else) used to be very slow in that early generation of bacula. So, bextract might run faster anyway if you start with 3.0.x bextract. ps. I hope you have a copy of your Bacula conf files somewhere available. I think the bexract utility will also need at least a functional storage daemon conf file... Regards, Timo - Original Message - From: Ryan Novosielski novos...@umdnj.edu To: bacula-users@lists.sourceforge.net Sent: Friday, 7 August, 2009 22:11:02 GMT +00:00 GMT Britain, Ireland, Portugal Subject: Re: [Bacula-users] lost hard drive bacula was on -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Easiest would probably be to restore your catalog backup with bextract. You could also do a fresh install and bscan tapes, but this takes longer. Someone can chime in and correct me if I'm wrong, but I believe you can start with the current version of Bacula -- you do not have to go to 1.38.5 (and if you're going to install 1.38, you should at least use .11). =R John Fitzpatrick wrote: Hello everyone, Short story hard disk failed, main bacula release 1.38.5 was installed here so cannot access catalog A full backup of everything was taken the night before so the catalog was backed up to lto tape Question is now what is best to do? locate 1.38.5 bacula version then install this setting up storage daemon et all but will i be able to get the catalog from the tapes - -- _ _ _ _ ___ _ _ _ |Y#| | | |\/| | \ |\ | | |Ryan Novosielski - Systems Programmer II |$| |__| | | |__/ | \| _| |novos...@umdnj.edu - 973/972.0922 (2-0922) \__/ Univ. of Med. and Dent.|IST/CST - NJMS Medical Science Bldg - C630 -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
[Bacula-users] Spooling while Despooling?
Hi all! On the same backup, on the same client, Is there the possibility to spooling data while SD is despooling? I noticed that while a job is despooling no data are spooled from the client until despooling end. Is that right? is there the possibility to let job despooling spool data? In the manual I found nothing on it Thx Fabio -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] Spooling while Despooling?
Hi Fabio, Fabio Xarax wrote: I noticed that while a job is despooling no data are spooled from the client until despooling end. Is that right? Yes. is there the possibility to let job despooling spool data? In the manual I found nothing on it No afaik it's not possible. If you have multiple jobs running simultaneously, one job can spool data while the other is despooling. Cheers, Bram. -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] Spooling while Despooling?
Hi, 11.08.2009 10:35, Fabio Xarax wrote: Hi all! On the same backup, on the same client, Is there the possibility to spooling data while SD is despooling? No. I noticed that while a job is despooling no data are spooled from the client Actually, that would be the same job - another job on that same client could transfer data (provided you've got job concurrency set up). until despooling end. Is that right? Yes. is there the possibility to let job despooling spool data? In the manual I found nothing on it There's no such possibility now, but you could send a feature request... I believe this was discussed previously, but don't recall the outcome. It's definitely challenging, both to implement and to the underlying hardware. Cheers, Arno Thx Fabio -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users -- Arno Lehmann IT-Service Lehmann Sandstr. 6, 49080 Osnabrück www.its-lehmann.de -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] Big Backups: Incremental forever, off-site.
Hi, 10.08.2009 22:37, Shawn wrote: Hello again, folk, I'm experimenting with volume management, and could use a few pointers on some of the recycling capabilities of Bacula when dealing with massive backups. What we're trying to accomplish, is an off-site backup solution. As such it has to be flexible, in case an Internet outage occurs or otherwise... We are keeping primarily smaller transfers, up to perhaps a Gigabyte of any given users Home folder data, but, there are a few servers and other systems we'd like to fully back up. The problem with this, however, is that our upstream bandwidth could take almost a whole month to perform a Full Backup for a really big file system, so as such, we want to approach this with a sort of Incremental forever strategy for the off site. The first challenge will be the required initial full backup. Currently the files are being backed up to the server in-house for further testing, the server backs them up to disk. What I've watched is, once in a while, for whatever reason (maybe the user shut off their computer) if a network time out occurs - the Volume/Media for that users pool becomes in an Error state. When this happens, during their next scheduled back up, Bacula forces a Full Backup - claiming it has no records of a previous Full Backup (since the last Media it used was in an Error state). What I'd like to do is one of the following scenarios: A) Ignore an error on Media during a backup, and continue writing anyway, using the Last Good Incremental as it's basis for the next Incremental backup. B) Use the Maximum Volume Bytes = pool option, and limit the volumes to perhaps a few GB. Add a pile of volumes to this pool, and if one fails it only has to recover a few GB during an error, instead of the whopping 200GB (or whatever it comes out to). C) Cancel a backup job during storage, and purge the incremental job files in question if an error like a network problem occurs. Leaving the Media in Append mode, so next backup schedule can run as normal again. The problems you observe are not related to volumes - Bacula thinks in terms of jobs. The volumes don't really matter (except that they might waste space for incomplete backups that you don't want to keep). You need to make sure that Bacula does always run an incremental job and never elevates the level to full. Normally, that should be the case as long as there are previous valid jobs. For example, I back up notebooks and, when they are not turned on or in the network, the backups fail. The next backups run are still incrementals, though. Checking your retention times and recycling settings might be a good next step to make sure full backups are never purged. Also, I believe that there is a somewhat unexpected bahviour of recent Bacula versions - people seem to observe that incrementals require a full backup in the same pool they use (which I would consider a bug...). If that's what is happening, you may want to check the bug tracker if this is alredy reported or even fixed, and / or consider an upgrade. Cheers, Arno Can any of this be accomplished? Does someone have a better alternative for an off site type of Incremental forever solution? Thanks in advance, -- Shawn Qureshi Artemide, Inc. IT Specialist -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users -- Arno Lehmann IT-Service Lehmann Sandstr. 6, 49080 Osnabrück www.its-lehmann.de -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] Empty log files and no messages on console
On Tue, Aug 04, 2009 at 06:03:32PM +0200, Bruno Friedmann wrote: Arthur Lutz wrote: Hi, I am having a really anonying bug with bacula. The log files are empty, the email notifications only have the subjet filled in, and running jobs on the console don't display anything. I don't believe having changed anything to the configuration when the logs disappeared (1st of august). At first I thought it was logrotate that rotated the log and left bacula writing to another file. I don't think that is the case anymore since I've restarted bacula, changed the log file, even stupidly rebooted the machine. The modification time on the log file changes but no content in it. The backups still work (I get a bunch of OKs). I've fiddled with setdebug and autodisplay with no success. Thanks for any tips investigating this annoying bug (bacula 2.4 on a bunch of debian machines). Otherwise thanks for a great product. Arthur Hi Arthur, are you sure the rotate log doesn't create the new file with wrong permission check owner and right to the /var/lib/bacula and log file. If your config doesn't have change, it's certainly a simple question of rights. In the end it was not a question of rights. It was as simple as a full disk. A bit of clean up later the messages started flowing back... Maybe bacula could handle that case differently ? Well... happy to get my logs running again. -- Arthur LUTZLOGILAB, Paris (France) http://www.logilab.com http://www.logilab.fr http://www.logilab.org Développement logiciel avancé - Intelligence Artificielle - Formations CubicWeb, the semantic web framework: http://www.cubicweb.org -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] Spooling while Despooling?
@Bram, Arno Thx a lot! -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] Big Backups: Incremental forever, off-site.
Thank you kindly, this helped me solve my problem, Arno. Our recycling program went wonderfully well, and ironically I came across a cross post from John Drescher that helped me further my education in regards to the Automatic Recycling as well as AutoLabeling for the director and storage, so it doesn't pester about that if an error does occur: http://www.bacula.org/en/rel-manual/Automatic_Volume_Recycling.html Our strategy is working quite well, we have a Full backup performed, and during quiet operations we snuck out the Full backup settings for the big clients within the bacula-dir.conf, reloaded and with shortened volumes (Max 500MB each now) it's working out wonderfully now! -- Shawn Qureshi Artemide, Inc. IT Specialist On Tue, 2009-08-11 at 12:07 +0200, Arno Lehmann wrote: Hi, 10.08.2009 22:37, Shawn wrote: Hello again, folk, I'm experimenting with volume management, and could use a few pointers on some of the recycling capabilities of Bacula when dealing with massive backups. What we're trying to accomplish, is an off-site backup solution. As such it has to be flexible, in case an Internet outage occurs or otherwise... We are keeping primarily smaller transfers, up to perhaps a Gigabyte of any given users Home folder data, but, there are a few servers and other systems we'd like to fully back up. The problem with this, however, is that our upstream bandwidth could take almost a whole month to perform a Full Backup for a really big file system, so as such, we want to approach this with a sort of Incremental forever strategy for the off site. The first challenge will be the required initial full backup. Currently the files are being backed up to the server in-house for further testing, the server backs them up to disk. What I've watched is, once in a while, for whatever reason (maybe the user shut off their computer) if a network time out occurs - the Volume/Media for that users pool becomes in an Error state. When this happens, during their next scheduled back up, Bacula forces a Full Backup - claiming it has no records of a previous Full Backup (since the last Media it used was in an Error state). What I'd like to do is one of the following scenarios: A) Ignore an error on Media during a backup, and continue writing anyway, using the Last Good Incremental as it's basis for the next Incremental backup. B) Use the Maximum Volume Bytes = pool option, and limit the volumes to perhaps a few GB. Add a pile of volumes to this pool, and if one fails it only has to recover a few GB during an error, instead of the whopping 200GB (or whatever it comes out to). C) Cancel a backup job during storage, and purge the incremental job files in question if an error like a network problem occurs. Leaving the Media in Append mode, so next backup schedule can run as normal again. The problems you observe are not related to volumes - Bacula thinks in terms of jobs. The volumes don't really matter (except that they might waste space for incomplete backups that you don't want to keep). You need to make sure that Bacula does always run an incremental job and never elevates the level to full. Normally, that should be the case as long as there are previous valid jobs. For example, I back up notebooks and, when they are not turned on or in the network, the backups fail. The next backups run are still incrementals, though. Checking your retention times and recycling settings might be a good next step to make sure full backups are never purged. Also, I believe that there is a somewhat unexpected bahviour of recent Bacula versions - people seem to observe that incrementals require a full backup in the same pool they use (which I would consider a bug...). If that's what is happening, you may want to check the bug tracker if this is alredy reported or even fixed, and / or consider an upgrade. Cheers, Arno Can any of this be accomplished? Does someone have a better alternative for an off site type of Incremental forever solution? Thanks in advance, -- Shawn Qureshi Artemide, Inc. IT Specialist -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net
[Bacula-users] Label problem
Hi, I use bacula in production since few mounth, but now I have a problem i don't understand... I explain: Normally: Each day, I change manually the LTO tape in my drive. After I label the LTO tape with label command in bacula. And run the backup job who take the freshly labeled volume. My problem: I change manually the LTO tape in my drive. I label the LTO tape with label command in bacula. But now when run the backup job, bacula request to mount a old label and don't see my new labeled volume. umount/mount don't fix anything... My news labeled volumes appears in my volume pool, but the backup job don't want to append on it... I was blocked,any ideas ? -- POMMIER Emmanuel Responsable Infrastructure Groupe AYME Mail: pommie...@ayme.fr Tel: 04.90.63.99.53 Fax: 04.90.63.99.01 -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
[Bacula-users] How to run admin job from bat?
How do you run Admin job from bat? When I select Admin type job in bat, I do not get Run Job option. I am running bacula 2.4.3. Hemant Shah E-mail: hj...@yahoo.com -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] Catalog too big / not pruning?
On Thu, 6 Aug 2009, Jeremy Koppel wrote: I thought that meant it wasn't going to actually do anything, but it did reduce the DB size to 6.5GB. I had actually stopped bacula before running it this time, so perhaps that had an effect. After that, I went ahead and ran dbcheck (thanks, John), and it found a bunch of stuff: Found 1000 orphaned File records. Deleting 1000 orphaned File records. How long did it take to remove these entries? AB -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] Catalog too big / not pruning?
Wasn't sitting here the whole time, but it was 2-3 hours each run. --Jeremy -Original Message- From: Alan Brown [mailto:a...@mssl.ucl.ac.uk] Sent: Tuesday, August 11, 2009 12:13 To: Jeremy Koppel Cc: bacula-users@lists.sourceforge.net Subject: Re: [Bacula-users] Catalog too big / not pruning? On Thu, 6 Aug 2009, Jeremy Koppel wrote: I thought that meant it wasn't going to actually do anything, but it did reduce the DB size to 6.5GB. I had actually stopped bacula before running it this time, so perhaps that had an effect. After that, I went ahead and ran dbcheck (thanks, John), and it found a bunch of stuff: Found 1000 orphaned File records. Deleting 1000 orphaned File records. How long did it take to remove these entries? AB -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] Catalog too big / not pruning?
: ) Thanks for the assist. Could be a version problem. This is on one of our older servers, and it's running Bacula version 1.36.3, which for years was the only version available on Gentoo. (looks like current version in Portage is 2.4.1). When a new server is available, I'll look into migrating it. --Jeremy -Original Message- From: Martin Simmons [mailto:mar...@lispworks.com] Sent: Friday, August 07, 2009 14:30 To: bacula-users@lists.sourceforge.net Subject: Re: [Bacula-users] Catalog too big / not pruning? On Fri, 7 Aug 2009 07:55:08 -0700, Jeremy Koppel said: I ended up running dbcheck 3 more times. The first time got another 10,000,000, the second another 8,000,000+, and the 3rd was trivial. Running it a fourth time came up all 0s. Running another full vacuum got the DB size down to 597MB, which sounds right. Nice space saving! In theory Bacula will remove stale file records, but there was a bug in some version that could leave them. So, there has been a job in the crontab that runs the standard vacuumdb (not full), but, it does this while Bacula is running. For the past few days, while running the full vacuum, I shut it off as a precaution. Perhaps I should modify the script to shut down Bacula during the standard vacuum? Is this needed? It is probably better to avoid vacuuming while Bacula is updating the database, but there is no need to shut it down. You could run the vacuum from a Bacula admin job rather than cron if you want to control it better. I run it after the backups, so pruning has had a chance to remove records. __Martin -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
[Bacula-users] Anyone written any handy queries (query.sql)???
I have modified my query.sql to include some queries that I use frequently and I thought maybe someone else would find them useful additions. Also, I was wondering if anyone had queries which they find useful and would like to share. In my setup, I need to rotate tapes on a weekly basis to keep offsites in case of emergency, so I need to find certain groups of tapes for easy removal and it's easier to group them in query output than having to scan down a 57 item long list and pick out the ones I need (and other similar needs). I hope someone finds this useful, -John ## :List Volumes Bacula thinks are in changer (By Slot) SELECT Slot,VolumeName,MediaId AS Id,VolBytes/(1024*1024*1024) AS GB,Storage.Name AS Storage,Pool.Name AS Pool,VolStatus FROM Media,Pool,Storage WHERE Media.PoolId=Pool.PoolId AND Slot0 AND InChanger=1 AND Media.StorageId=Storage.StorageId ORDER BY Slot ASC; If you want ordered by VolumeName: ORDER BY VolumeName ASC; If you want ordered by Pool, then Slot: ORDER BY Pool,Slot; ## :List Full Volumes Bacula thinks are in changer (By Pool) SELECT Slot,VolumeName,MediaId AS Id,Pool.Name AS Pool,VolStatus, VolBytes/(1024*1024*1024) AS GB FROM Media,Pool,Storage WHERE Media.PoolId=Pool.PoolId AND VolStatus='Full' AND Slot0 AND InChanger=1 AND Media.StorageId=Storage.StorageId ORDER BY Pool,Slot ASC; If you want ordered by Slot: ORDER BY Slot ASC; ## :List Non-Full Volumes Bacula thinks are in changer (By Pool) SELECT Slot,VolumeName,MediaId AS Id,Pool.Name AS Pool,VolStatus, VolBytes/(1024*1024*1024) AS GB FROM Media,Pool,Storage WHERE Media.PoolId=Pool.PoolId AND VolStatus!='Full' AND Slot0 AND InChanger=1 AND Media.StorageId=Storage.StorageId ORDER BY Pool,Slot ASC; If you want ordered by Slot: ORDER BY Slot ASC; ## (Change Media.MediaType entry below to match your settings) :List All Tape Volumes Bacula knows about (By VolumeName) SELECT Slot,VolumeName,MediaId AS Id,Pool.Name AS Pool,VolStatus, VolBytes/(1024*1024*1024) AS GB FROM Media,Pool,Storage WHERE Media.PoolId=Pool.PoolId AND Media.StorageId=Storage.StorageId AND Media.MediaType='LTO-2' ORDER BY VolumeName ASC; If you want ordered by Pool and Slot: ORDER BY Pool,Slot ASC; If you want ordered by Slot: ORDER BY Slot ASC; ## :List All Volumes in a Pool *Enter Pool name: SELECT MediaId AS Id,VolumeName,VolBytes/(1024*1024*1024) AS GB,Slot, Pool.Name AS Pool,VolStatus FROM Media,Pool,Storage WHERE Media.PoolId=Pool.PoolId AND Pool.Name='%1' AND Media.StorageId=Storage.StorageId ORDER BY VolumeName ASC; ## (Not as useful as I thought it would be, but here it is) :Show Log for JobId *Enter JobId: SELECT Time,LogText FROM Log WHERE JobId='%1' ORDER BY Time; -- Do not try the patience of wizards, for they are subtle and quick to anger. --- John M. Lockard | U of Michigan - School of Information Unix and Security Admin | 1214 SI North - 1075 Beal Ave. jlock...@umich.edu |Ann Arbor, MI 48109-2112 www.umich.edu/~jlockard | 734-615-8776 | 734-647-8045 FAX --- -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] Anyone written any handy queries (query.sql)???
On Tue, Aug 11, 2009 at 2:39 PM, John Lockardjlock...@umich.edu wrote: I have modified my query.sql to include some queries that I use frequently and I thought maybe someone else would find them useful additions. Also, I was wondering if anyone had queries which they find useful and would like to share. In my setup, I need to rotate tapes on a weekly basis to keep offsites in case of emergency, so I need to find certain groups of tapes for easy removal and it's easier to group them in query output than having to scan down a 57 item long list and pick out the ones I need (and other similar needs). I hope someone finds this useful, -John ## :List Volumes Bacula thinks are in changer (By Slot) SELECT Slot,VolumeName,MediaId AS Id,VolBytes/(1024*1024*1024) AS GB,Storage.Name AS Storage,Pool.Name AS Pool,VolStatus FROM Media,Pool,Storage WHERE Media.PoolId=Pool.PoolId AND Slot0 AND InChanger=1 AND Media.StorageId=Storage.StorageId ORDER BY Slot ASC; If you want ordered by VolumeName: ORDER BY VolumeName ASC; If you want ordered by Pool, then Slot: ORDER BY Pool,Slot; ## :List Full Volumes Bacula thinks are in changer (By Pool) SELECT Slot,VolumeName,MediaId AS Id,Pool.Name AS Pool,VolStatus, VolBytes/(1024*1024*1024) AS GB FROM Media,Pool,Storage WHERE Media.PoolId=Pool.PoolId AND VolStatus='Full' AND Slot0 AND InChanger=1 AND Media.StorageId=Storage.StorageId ORDER BY Pool,Slot ASC; If you want ordered by Slot: ORDER BY Slot ASC; ## :List Non-Full Volumes Bacula thinks are in changer (By Pool) SELECT Slot,VolumeName,MediaId AS Id,Pool.Name AS Pool,VolStatus, VolBytes/(1024*1024*1024) AS GB FROM Media,Pool,Storage WHERE Media.PoolId=Pool.PoolId AND VolStatus!='Full' AND Slot0 AND InChanger=1 AND Media.StorageId=Storage.StorageId ORDER BY Pool,Slot ASC; If you want ordered by Slot: ORDER BY Slot ASC; ## (Change Media.MediaType entry below to match your settings) :List All Tape Volumes Bacula knows about (By VolumeName) SELECT Slot,VolumeName,MediaId AS Id,Pool.Name AS Pool,VolStatus, VolBytes/(1024*1024*1024) AS GB FROM Media,Pool,Storage WHERE Media.PoolId=Pool.PoolId AND Media.StorageId=Storage.StorageId AND Media.MediaType='LTO-2' ORDER BY VolumeName ASC; If you want ordered by Pool and Slot: ORDER BY Pool,Slot ASC; If you want ordered by Slot: ORDER BY Slot ASC; ## :List All Volumes in a Pool *Enter Pool name: SELECT MediaId AS Id,VolumeName,VolBytes/(1024*1024*1024) AS GB,Slot, Pool.Name AS Pool,VolStatus FROM Media,Pool,Storage WHERE Media.PoolId=Pool.PoolId AND Pool.Name='%1' AND Media.StorageId=Storage.StorageId ORDER BY VolumeName ASC; ## (Not as useful as I thought it would be, but here it is) :Show Log for JobId *Enter JobId: SELECT Time,LogText FROM Log WHERE JobId='%1' ORDER BY Time; -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users Here are mine.. The most useful one is #17. I see that you do similar with your full / not full queries. # 17 :List Volumes Bacula thinks are full and in changer SELECT MediaId,VolumeName,VolBytes/(1024*1024*1024) AS GB,Storage.Name AS Storage,Slot,Pool.Name AS Pool,MediaType,Media.lastwritten,VolStatus FROM Media,Pool,Storage WHERE Media.PoolId=Pool.PoolId AND Slot0 AND InChanger=1 AND (VolStatus='Full' OR VolStatus='Archive') AND Media.StorageId=Storage.StorageId ORDER BY MediaType ASC, Media.lastwritten ASC; # 18 :Get all the Jobids for a job *Enter Job Name: SELECT jobid,job,level,clientid,jobstatus,jobfiles,jobbytes FROM Job WHERE Name = '%1'; # 19 :List Volumes by status *Enter volume status to find SELECT MediaId,VolumeName,VolBytes/(1024*1024*1024) AS GB,Storage.Name AS Storage,Slot,Pool.Name AS Pool,MediaType,VolStatus FROM Media,Pool,Storage WHERE Media.PoolId=Pool.PoolId AND (VolStatus='%1') AND Media.StorageId=Storage.StorageId ORDER BY Storage ASC,MediaType ASC, Slot ASC; -- John M. Drescher -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] Anyone written any handy queries (query.sql)???
On Tue, 11 Aug 2009, John Drescher might have said: On Tue, Aug 11, 2009 at 2:39 PM, John Lockardjlock...@umich.edu wrote: I have modified my query.sql to include some queries that I use frequently and I thought maybe someone else would find them useful additions. Also, I was wondering if anyone had queries which they find useful and would like to share. Here are my custom queries. Mike # 17 :List pool space allocated by status SELECT Pool.Name AS Pool, VolStatus AS Status, sum(VolBytes) AS Size, count(*) AS Number FROM Media, Pool WHERE Media.PoolID = Pool.PoolId GROUP by Pool.Name, VolStatus ORDER by Pool.Name, VolStatus; # 18 :List Volumes by pool, name SELECT VolumeName AS Volume, VolMounts AS Mounts, VolErrors AS Errors, VolBytes AS Size, VolWrites AS Writes, VolStatus AS Status, Pool.Name AS Pool FROM Media, Pool WHERE Media.PoolID = Pool.PoolId ORDER by Pool.Name, VolumeName; # 19 :List Volumes by pool, age SELECT VolumeName AS Volume, VolMounts AS Mounts, VolErrors AS Errors, VolBytes AS Size, VolWrites AS Writes, VolStatus AS Status, LastWritten AS 'Last Written', Pool.Name AS Pool FROM Media, Pool WHERE Media.PoolID = Pool.PoolId ORDER by Pool.Name, LastWritten Desc; # 20 :List storage used by client and pool SELECT Client.Name AS Client, Pool.Name as Pool, sum(Job.JobFiles) as Files, sum(Job.JobBytes) as Bytes FROM Client, Job, Pool WHERE Job.ClientID = Client.ClientID and Job.PoolID = Pool.PoolID GROUP by Client.ClientID ORDER by Client.Name; -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] Anyone written any handy queries (query.sql)???
In the message dated: Tue, 11 Aug 2009 14:39:39 EDT, The pithy ruminations from John Lockard on [Bacula-users] Anyone written any handy queries (query.sql)??? were: = I have modified my query.sql to include some queries that = I use frequently and I thought maybe someone else would = find them useful additions. Also, I was wondering if anyone = had queries which they find useful and would like to share. Sure. Here's my collection, largely drawn from earlier postings to this list (check the archives...hint, hint!) and from direct help from other bacula users. My SQL knowledge is infintesimal, so any improvements would be welcome (the wildcard search query, in particular, is terribly slow). -===- :List Volumes in the changer that are in need of replacement SELECT VolumeName As VolName,Storage.Name AS Storage,Slot,Pool.Name AS Pool,MediaType,VolS tatus AS Status, VolErrors AS Errors FROM Media,Pool,Storage WHERE Media.PoolId=Pool.PoolId AND Slot0 AND InChanger=1 AND Media.StorageId=Storage.StorageId AND ( (VolErrors0) OR (VolStatus='Error') OR (VolStatus='Disabled') OR (VolStatus='Full')) ORDER BY Slot ASC, VolumeName; :List tapes in expiration order # thanks to Eric Bollinger # From: Eric Bollengier e...@eb.homelinux.org # Date: Sat, 5 Aug 2006 20:31:37 +0200 SELECT Media.VolumeName AS volname, Media.VolStatus AS status, Media.LastWritten AS lastwritten, Media.InChanger AS Loaded, Pool.Name AS pool, FROM_UNIXTIME( UNIX_TIMESTAMP(Media.LastWritten) + (Media.VolRetention) ) AS expire FROM Media INNER JOIN Pool ON (Pool.PoolId = Media.PoolId) AND Media.Recycle = 1 AND Media.MediaType IN ('LTO2') AND Pool.Name IN ('Default','Full','Incremental') ORDER BY expire ASC, Media.VolUseDuration DESC LIMIT 25; :Find next volumes to load SELECT VolumeName AS VolName,Pool.Name AS Pool,MediaType AS Type,VolStatus AS Status, InCh anger FROM Media,Pool,Storage WHERE Media.PoolId=Pool.PoolId AND InChanger=0 AND Media.StorageId=Storage.StorageId AND ( VolStatus IN ('Purged', 'Recycle') OR Pool.Name='Scratch') ORDER BY VolumeName; :List Volumes in Error status SELECT Media.MediaId AS MediaId,Pool.Name AS Pool,VolStatus AS Status FROM Media,Pool WHERE (VolStatus='Error') ORDER BY Pool.Name,MediaId; :List all places where a File is saved *Enter Filename (no path): SELECT DISTINCT Client.Name as Client, Path.Path,Filename.Name,File.MD5 as Checksum, Job.JobId as JobId FROM Client,Job,File,Filename,Path WHERE Client.ClientId=Job.ClientId AND JobStatus='T' AND Job.JobId=File.JobId AND Path.PathId=File.PathId AND Filename.FilenameId=File.FilenameId AND Filename.Name='%1' ORDER BY Path.Path; :Search for files with wildcards (% for *): *Enter Filename (no path): SELECT DISTINCT Job.JobId as JobId, Client.Name as Client, Path.Path,Filename.Name,StartTime FROM Client,Job,File,Filename,Path WHERE Client.ClientId=Job.ClientId AND Filename.Name like '%1' ORDER BY Filename.Name LIMIT 50; # AND JobStatus='T' AND Job.JobId=File.JobId # AND Path.PathId=File.PathId AND Filename.FilenameId=File.FilenameId = = In my setup, I need to rotate tapes on a weekly basis to = keep offsites in case of emergency, so I need to find certain = groups of tapes for easy removal and it's easier to group = them in query output than having to scan down a 57 item long = list and pick out the ones I need (and other similar needs). = = I hope someone finds this useful, = -John = [SNIP!] = -- = Do not try the patience of wizards, = for they are subtle and quick to anger. = --- = John M. Lockard | U of Michigan - School of Information = Unix and Security Admin | 1214 SI North - 1075 Beal Ave. = jlock...@umich.edu |Ann Arbor, MI 48109-2112 = www.umich.edu/~jlockard | 734-615-8776 | 734-647-8045 FAX = --- = = -- [Advertisement from SourceForge SNIPPED!] Mark Bergman voice: 215-662-7310 mark.berg...@uphs.upenn.edu fax: 215-614-0266 System Administrator Section of Biomedical Image Analysis Department of RadiologyUniversity of Pennsylvania PGP Key: https://www.rad.upenn.edu/sbia/bergman The information contained in this e-mail message is intended only for the personal and confidential use of the recipient(s) named above. If the reader of this message is not the intended recipient or an agent responsible for delivering it to the intended recipient, you are hereby notified that you have received this document in error and that any review, dissemination, distribution, or copying of
[Bacula-users] Bad Hello command from Director at client
Dear I have compiled latest bacula version with the following tokens ./configure --config-cache --prefix=/usr --sysconfdir=/etc/bacula --with-scriptdir=/etc/bacula/scripts --sharedstatedir=/var/lib/bacula --localstatedir=/var/lib/bacula --with-pid-dir=/var/run/bacula --with-smtp-host=localhost --with-working-dir=/var/lib/bacula --with-subsys-dir=/var/lock --mandir=\${prefix}/share/man --infodir=\${prefix}/share/info --enable-smartalloc --with-tcp-wrappers --with-libiconv-prefix=/usr/include --with-readline=yes'; --with-libintl-prefix=/usr/include --without-x --with-readline=yes --with-mysql --without-postgresql --without-sqlite3 --enable-bwx-console --without-sqlite when i'm connecting trough bconsole : r...@pc-dtouzeau:~# bconsole -d 500 bconsole: lex.c:186-0 Open config file: /etc/bacula/bconsole.conf bconsole: lex.c:186-0 Open config file: /etc/bacula/bconsole.conf Connexion au Director PC-DTOUZEAU:9103 bconsole: bsock.c:221-0 Current host[ipv4:127.0.0.1:9103] All host[ipv4:127.0.0.1:9103] host[ipv4:127.0.1.1:65535] host[ipv4:127.0.0.1:65535] bconsole: bsock.c:155-0 who=Director daemon host=PC-DTOUZEAU port=9103 bconsole: cram-md5.c:133-0 cram-get received: authenticate.c:81 Bad Hello command from Director at client: Hello *UserAgent* calling bconsole: cram-md5.c:138-0 Cannot scan challenge: authenticate.c:81 Bad Hello command from Director at client: Hello *UserAgent* calling Director authorization problem. Most likely the passwords do not agree. If you are using TLS, there may have been a certificate validation error during the TLS handshake. Please see http://www.bacula.org/en/rel-manual/Bacula_Freque_Asked_Questi.html#SECTION00376 for help. What's wrong ? I have read the documentation page, but nothing appears wrong in my configuration console config -- Director { Name = PC-DTOUZEAU-dir DIRport = 9103 address = PC-DTOUZEAU Password = jflcVFlBiDrO0C3lkPQFXwfRSxE9QnkTDoO6uz8dRVbu } director config (bacula-dir.conf) -- Director {# define myself Name = PC-DTOUZEAU-dir DIRport = 9103# where we listen for UA connections QueryFile = /etc/bacula/scripts/query.sql WorkingDirectory = /var/lib/bacula PidDirectory = /var/run/bacula Maximum Concurrent Jobs = 1 Password = jflcVFlBiDrO0C3lkPQFXwfRSxE9QnkTDoO6uz8dRVbu # Console password Messages = Daemon } Client { Name = PC-DTOUZEAU-fd Address = PC-DTOUZEAU FDPort = 9102 Catalog = MyCatalog Password = jflcVFlBiDrO0C3lkPQFXwfRSxE9QnkTDoO6uz8dRVbu # password for FileDaemon File Retention = 30 days# 30 days Job Retention = 6 months# six months AutoPrune = yes # Prune expired Jobs/Files } File directives (bacula-fd.conf) -- Director { Name = PC-DTOUZEAU-dir Password = jflcVFlBiDrO0C3lkPQFXwfRSxE9QnkTDoO6uz8dRVbu } Storage directives (bacula-sd.conf) -- Storage { # definition of myself Name = PC-DTOUZEAU-sd SDPort = 9103 WorkingDirectory = /var/lib/bacula Pid Directory = /var/run/bacula Maximum Concurrent Jobs = 20 } Director { Name = PC-DTOUZEAU-dir Password = jflcVFlBiDrO0C3lkPQFXwfRSxE9QnkTDoO6uz8dRVbu } -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users