On 05/10/2013 04:12 PM, Martin Simmons wrote: >>>>>> On Fri, 10 May 2013 09:09:39 +0200, Kern Sibbald said: >> I am a bit surprised that no one mentioned Bacula's built-in virtual >> autochanger feature that has been there for years. The syntax for >> enabling it is a bit of a "kludge" in my opinion, but it is the way >> that Bacula >> Systems is recommending to handle multiple disk backup. >> >> In the bacula-dir.conf file, define the autochanger in >> the normal way for a physical tape autochanger library. >> >> In the bacula-sd.conf, one defines: >> >> Autochanger { >> Name = FileChgr1 >> Device = FileChgr1-Dev1, FileChgr1-Dev2 >> Changer Command = "" >> Changer Device = /dev/null >> } >> >> Device { >> Name = FileChgr1-Dev1 >> Media Type = File1 >> Archive Device = /tmp >> LabelMedia = yes # lets Bacula label unlabeled media >> Random Access = Yes >> AutomaticMount = yes # when device opened, read it >> RemovableMedia = no >> AlwaysOpen = no >> Maximum Concurrent Jobs = 5 >> } >> >> Device { >> Name = FileChgr1-Dev2 >> Media Type = File1 >> Archive Device = /tmp >> LabelMedia = yes # lets Bacula label unlabeled media >> Random Access = Yes >> AutomaticMount = yes # when device opened, read it >> RemovableMedia = no >> AlwaysOpen = no >> Maximum Concurrent Jobs = 5 >> } > Can you indicate where the kludge is please? Changer Command = "" and Changer Device = /dev/null
I probably should have called the resource VirtualChanger. I guess I can still do so ... > > Also, do the Device resources need AutoChanger = yes like in the other > examples? No, and I you don't need the Drive Index = either, since in both cases it is not a real autochanger. The autochanger code is called, but when it sees it is a virtual changer, it just returns, and the Bacula SD core code just handles it correctly. The main effect of this form of the Autochanger resource is to group the Devices so you can access any one of them with a single name. If you start using different directories as Archive Device names, there might be problems, unless you make a simultaneous change to the Media Type. It was so simple that in the beginning I couldn't believe that it would work correctly in all cases, but it does. Kern ------------------------------------------------------------------------------ Learn Graph Databases - Download FREE O'Reilly Book "Graph Databases" is the definitive new guide to graph databases and their applications. This 200-page book is written by three acclaimed leaders in the field. The early access version is available now. Download your free book today! http://p.sf.net/sfu/neotech_d2d_may _______________________________________________ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users