Re: [Bacula-users] Howto make bacula unmount a disk after backup?
2009-08-31 10:39:34
Thomas wrote:
> one year ago i ran into the same problem:
>
> http://www.adsm.org/lists/html/Bacula-users/2008-07/msg00885.html
>
> i did only a few tests with usb-sticks
> so there is no solution until now
>
I find it far simpler to use the autofs daemon to automount removable
drives at a static mountpoint. Then the Bacula config is exactly as for
fixed disk drives.
> Best Regards
>
> Thomas
>
>
> Cedric Tefft schrieb:
>
>> > [Bacula-users] Howto make bacula unmount a disk after backup?
>> > From: Adam <ald.bulk@go...> - 2009-08-24 23:10
>> >
>> > I have looked at bug report 830 on the bug reports list and it would
>> appear
>> > that it has not been fixed. I am using version 3.0.2 of Bacula with the
>> > following device configuration. The device is not unmounted after the
>> job is
>> > executed.
>> >
>> > Device {
>> > Name = USBBackup1
>> > Media Type = ExtUSB
>> > Device Type = File
>> > LabelMedia = yes
>> > Random Access = yes
>> > Requires Mount = yes
>> > Removable Media = yes
>> > AlwaysOpen = yes
>> > Mount Point = "/dev/disk/by-label/usb-backup-1"
>> > Mount Command = "/bin/mount %m"
>> > Unmount Command = "/bin/umount %m"
>> > Archive Device = "/mnt/usb-backup-1/backup"
>> > Maximum File Size = 10485760
>> > }
>> >
>> > Regards,
>> >
>> > Adam
>>
>> From what I can tell, I'm having exactly the same problem. I am also
>> running 3.0.2. As a test, I tried logging calls to the mount and
>> unmount commands with wrapper scripts like so:
>>
>> Device {
>> Name = BackupDrive
>> Media Type = File
>> Archive Device = /mnt/backup/volumes
>> Mount Point = /mnt/backup
>> Mount Command = "/etc/bacula/mount-wrapper %m"
>> Unmount Command = "/etc/bacula/umount-wrapper %m"
>> Requires Mount = yes
>> LabelMedia = yes
>> Random Access = Yes
>> AutomaticMount = yes
>> RemovableMedia = yes
>> AlwaysOpen = no
>> Offline On Unmount = Yes # Also tried "no"
>>
>> }
>>
>> The wrappers are pretty much what you would expect:
>>
>> # cat /etc/bacula/umount-wrapper
>> #!/bin/sh
>> echo umount-wrapper called as $0 $1 $2 $3 $4 $5 $6 $7 $8 $9 >>
>> /tmp/mount.log
>> /bin/umount $1 $2 $3 $4 $5 $6 $7 $8 $9 >> /tmp/mount.log 2>&1
>>
>> +++++++
>>
>> # cat /etc/bacula/mount-wrapper
>> #!/bin/sh
>> echo mount-wrapper called as $0 $1 $2 $3 $4 $5 $6 $7 $8 $9 >> /tmp/mount.log
>> /bin/mount $1 $2 $3 $4 $5 $6 $7 $8 $9 >> /tmp/mount.log 2>&1
>>
>> +++++++
>>
>> After running a couple of backup jobs, I looked at the mount log:
>>
>> # cat /tmp/mount.log
>> mount-wrapper called as /etc/bacula/mount-wrapper /mnt/backup
>> mount-wrapper called as /etc/bacula/mount-wrapper /mnt/backup
>>
>> It appears bacula calls the mount command as expected, but it never
>> calls the unmount command. Not only does it not do it automatically
>> after a backup job completes, it doesn't even do it on an explicit
>> "umount" issued from the console.
>>
>> Like you, I looked at bug 830 ( http://bugs.bacula.org/view.php?id=830 )
>> which was closed as "fixed" on 2007-07-16 with the comment:: "Fixed in
>> current SVN. You must have the appropriate Mount/Unmount commands
>> defined in the Device resource and you must declare the device as
>> removable otherwise Bacula will not try to mount/unmount it."
>>
>> Am I missing something? Is there some reason bug 830 should NOT be
>> reopened?
>>
>> Thx,
>>
>> - Cedric
>>
>>
>>
>>
>>
>>
>>
>> ------------------------------------------------------------------------------
>> 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 AT lists.sourceforge DOT 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 AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users
|
|
|