Hello,

I've seen requests like yours before, and never really answered them because I 
didn't really know what to do with them.  However, for some reason, this 
email peaked my interest, and I dug out an old 64MB USB device that I 
received from Dell when I bought a computer some time ago.  I plugged the 
silly thing into my laptop and after a bit of scrounging around found that 
all I needed to do was mount it, and presto, I had a removable filesystem.

I've now ordered myself two of these little goodies (2GB each) to play with as 
I can see that they can be quite useful, and will probably replace DVDs in 
the near future (once the price comes down a bit more).

Anyway, concerning Bacula working with these USB removable filesystems. The 
big problem is that Bacula doesn't understand what a removable filesystem is 
(except for DVDs) and hence expects *all* your Volumes to be online all the 
time.

It seems to me that with a bit of tweaking, not only could Bacula be made to 
know what is and what is not online, but it could also automatically mount 
the Volume if needed.  All I need to do is steal (well, adapt is a better 
word) a bit of the DVD code.

In the mean time, dealing with these things won't be so simple for you. What 
you need to do is write two little scripts that you run: 1. a script that you 
run just before you remove a device, and 2. a script that you run when you 
insert the device.

The first script should find all the Bacula Volumes on the device (simple if 
you only have Bacula Volumes on it) then mark them with status "Disabled" in 
the catalog if the current catalog status is "Append".

The second script would do the inverse -- for each Bacula Volume on the device 
that is marked with status "Disabled" in the catalog, it would change it to 
"Append".

This would solve 90% of all the problems -- there will be additional problems 
with Volumes that are marked Purged or Recycled.   If you really want to 
handle those correctly, in the first script, you will mark all the Volumes 
currently on the device as "Disabled", and save their prior status (and 
Volume name) in a file on the device.  The second script would then reverse 
the process by setting the catalog status back to what it previously was.

The above is a bit of a kludge, but I don't see any other way to do it without 
modifying Bacula code -- perhaps some clever user knows a better way.  I see 
no reason why Bacula could not be modified to handle this automatically, but 
that requires some code and programming time ...


On Tuesday 13 December 2005 15:18, Greg Cope wrote:
> Hi All,
>
> A little confused as to how I might recycle/switch USB drives.
>
> An SD (config below) that uses a /media/usbdisk.
>
> If I switch usbdrives and remount it, the next backup reports;
>
> 3-Dec 13:18 trigger-sd: trottersOracleArchLogs.2005-12-13_13.18.00
> Warning: Volume "baculaFile" not on device
> "FileStorage" (/media/usbdisk).
>
> It then gets placed into error state.
>
> If (re)move the bacula file it asks for it to be mounted.
>
> What is the correct procedure/config for rotating USB disk devices so
> that I can restore / backup to either without placing one into error or
> getting these mount requests?
>
> Thanks
>
> Greg
>
>
> ##### sd config
>
> Device {
>   Name = FileStorage
>   Media Type = File
>   #Archive Device = /var/bacula/backup
>   Archive Device = /media/usbdisk
>   LabelMedia = yes;                   # lets Bacula label unlabeled
> media
>   Random Access = Yes;
>   AutomaticMount = yes;               # when device opened, read it
>   RemovableMedia = no;
>   AlwaysOpen = no;
>   Maximum Spool Size = 20Gb
>   SpoolDirectory = /var/bacula/spool;
> }
>
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc. Do you grep through log
> files for problems?  Stop!  Download the new AJAX search engine that makes
> searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
> http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
> _______________________________________________
> Bacula-users mailing list
> Bacula-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/bacula-users

-- 
Best regards,

Kern

  (">
  /\
  V_V


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to