hi Patricio,

I use autofs to automatically mount and dismount USB harddrives

Regards

Stefan

Am 27.06.2017 um 04:39 schrieb desarro...@opcode.cl:
>
> Hello, sorry for the delay. I was testing other things with Bareos.
> Now I retake this issue, but not luck anyway. The only way it work for
> me is your hint in point 2): using linux auto mount with some params
> in fstab. But I don't want to have that configuration outside Bareos,
> is easily to me forget it.
>
> Problem is that Bareos can't automount partition disk inside a custom
> folder. What it does is put files directly into folder to save
> backups, using / device space.
>
> Device config in Storage Daemon is:
>
> Device {
>   Name = HD320GbExterno
> #  Description = "Disco externo de 320Gb"
>   Device Type = File
>   Media Type = Archivos
>   LabelMedia = yes                   # lets Bareos label unlabeled media
>   Random Access = yes
>   Automatic Mount = yes               # when device opened, read it
>   Removable Media = no
>   #AlwaysOpen = yes
>   Archive Device = /media/BareosBackup
>
>   Requires Mount = Yes
>   Mount Point = /media/BareosBackup
>   Mount Command = "mount -t auto -U
> cf811039-f8c4-486d-9d30-8239750e3eec %m"
>   Unmount Command = "umount %m"
> }
>
> When I run mount command manually it mounts correctly. But every time
> i run the job Bareos doesn't mount it for me. Media Type match with
> Director storage file.
>
> 26-Jun 22:16 opcodecl-dir JobId 22: No prior Full backup Job record found.
> 26-Jun 22:16 opcodecl-dir JobId 22: No prior or suitable Full backup
> found in catalog. Doing FULL backup.
> 26-Jun 22:16 opcodecl-dir JobId 22: Start Backup JobId 22,
> Job=patriciodesktop-bkp.2017-06-26_22.16.42_53
> 26-Jun 22:16 opcodecl-dir JobId 22: Using Device "HD320GbExterno" to
> write.
> 26-Jun 22:18 opcodecl-HD320GbExterno.conf JobId 22: Volume "test"
> previously written, moving to end of data.
> 26-Jun 22:18 opcodecl-HD320GbExterno.conf JobId 22: Warning: For
> Volume "test":
> The sizes do not match! Volume=7963812872 Catalog=7103351840
> Correcting Catalog
> 26-Jun 22:17 opcodecl-dir JobId 22: Fatal error: Network error with FD
> during Backup: ERR=Interrupted system call
> 26-Jun 22:17 opcodecl-dir JobId 22: Fatal error: No Job status
> returned from FD.
> 26-Jun 22:17 opcodecl-dir JobId 22: Bareos opcodecl-dir 16.2.5 (03Mar17):
>   Build OS:               x86_64-suse-linux-gnu suse (none)
>   JobId:                  22
>   Job:                    patriciodesktop-bkp.2017-06-26_22.16.42_53
>
> Volume "test" means that there was a moment that I erase data in
> /media/BareosBackup (inside / to save space) and bareos need more
> volumes to label when trying to make it work, so I give a "test" label
> in the console to create a new volume. I think is not the issue
> because before always write in /media/BareosBackup inside / and not in
> automounted /media/BareosBackup inside external hard drive anyway.
>
> 2017-06-26 22:34:13    opcodecl-HD320GbExterno.conf JobId 23: Warning:
> mount.c:248 Open device "HD320GbExterno" (/media/BareosBackup) Volume
> "test" failed: ERR=dev.c:661 Could not open: /media/BareosBackup/test,
> ERR=No such file or directory
>
> 2017-06-26 22:34:13    opcodecl-HD320GbExterno.conf JobId 23: Job
> patriciodesktop-bkp.2017-06-26_22.32.13_10 is waiting. Cannot find any
> appendable volumes.
> Please use the "label" command to create a new Volume for:
> Storage: "HD320GbExterno" (/media/BareosBackup)
> Pool: patriciodesktop-full
> Media type: Archivos
>
> I think I miss something, but don't know what. Thanks in advance
>
> Patricio Mercado G.
>
>
> El 01/06/17 a las 11:04, Stephan Duehr escribió:
>> Hi,
>>
>> 1) may some permission is missing in the whole path, may be try like
>> this if the user bareos can really access the directory:
>> su -s /bin/bash - bareos
>> touch /run/media/patricio/500Gb/BareosBackup/testfile.txt
>>
>> 2) I think you need
>> Archive Device = /home/patricio/respaldos
>> Mount Command = mount -t auto %m
>>
>> It's better to use the uuid instead of /dev/sdc1, because that may change,
>> so find out the uuid of /dev/sdc1 by using
>> blkid /dev/sdc1
>>
>> and add something like this to /etc/fstab
>> UUID=1b9ba4bc-f754-470b-9925-8f221395a20a /home/patricio/respaldos ext4 
>> noauto,user 0 0
>>
>> Regards,
>>
>> Stephan
>>
>> On 05/25/2017 11:01 PM, desarro...@opcode.cl wrote:
>>> Hi again. I'm trying to backup some computers in a network. My new 
>>> configuration is one dir-fd in a computer, mariadb database in a docker 
>>> container in same computer and sd-fd in other computer. Configuration with 
>>> default values works fine. All is over openSUSE Leap 42.2
>>>
>>> Currently I'm trying to configure an external usb hardrive where to write 
>>> data, but have troubles with it. I've tested two configurations but not 
>>> luck. Here is what I tryed:
>>>
>>> 1) Storage daemon configuration: path to an already user mounted device in 
>>> /run/media/patricio/500Gb, BareosBackup is a folder, bareos:bareos and 777 
>>> permissions.
>>>
>>> bareos-sd.d # cat device/DiscoExterno320Gb.conf
>>> Device {
>>>   Name = DiscoExterno320Gb
>>>   Media Type = File
>>>   Archive Device = /run/media/patricio/500Gb/BareosBackup/
>>>   LabelMedia = yes;                   # lets Bareos label unlabeled media
>>>   Random Access = yes;
>>>   AutomaticMount = yes;               # when device opened, read it
>>>   RemovableMedia = no;
>>>   AlwaysOpen = no;
>>>   Description = "Disco externo"
>>> }
>>>
>>> director/server-dir.conf
>>> Director {
>>>   Name = server-dir
>>>   Password = "bareosstoragedaemon"
>>>   Description = "Director, who is permitted to contact this storage daemon."
>>> }
>>>
>>> storage/server-sd.conf 
>>> Storage {
>>>   Name = server-sd
>>>   Maximum Concurrent Jobs = 10
>>>
>>>   # remove comment from "Plugin Directory" to load plugins from specified 
>>> directory.
>>>   # if "Plugin Names" is defined, only the specified plugins will be loaded,
>>>   # otherwise all storage plugins (*-sd.so) from the "Plugin Directory".
>>>   #
>>>   # Plugin Directory = /usr/lib64/bareos/plugins
>>>   # Plugin Names = ""
>>> }
>>>
>>>
>>> Running the job I got following messages:
>>> Job queued. JobId=32
>>> You have messages.
>>> *messages
>>> 25-May 16:22 server-dir JobId 32: No prior Full backup Job record found.
>>> 25-May 16:22 server-dir JobId 32: No prior or suitable Full backup found in 
>>> catalog. Doing FULL backup.
>>> 25-May 16:22 server-dir JobId 32: Start Backup JobId 32, 
>>> Job=backup-patriciodesktop-fd.2017-05-25_16.22.27_04
>>> *messages
>>> 25-May 16:24 server-sd JobId 32: Error: dev.c:153 Unable to stat device 
>>> /run/media/patricio/500Gb/BareosBackup/: ERR=No such file or directory
>>> 25-May 16:24 server-sd JobId 32: Warning: 
>>>      Device "DiscoExterno320Gb" requested by DIR could not be opened or 
>>> does not exist.
>>> 25-May 16:24 server-sd JobId 32: Error: dev.c:153 Unable to stat device 
>>> /run/media/patricio/500Gb/BareosBackup/: ERR=No such file or directory
>>> 25-May 16:24 server-sd JobId 32: Warning: 
>>>      Device "DiscoExterno320Gb" requested by DIR could not be opened or 
>>> does not exist.
>>> 25-May 16:24 server-sd JobId 32: Error: dev.c:153 Unable to stat device 
>>> /run/media/patricio/500Gb/BareosBackup/: ERR=No such file or directory
>>> 25-May 16:24 server-sd JobId 32: Warning: 
>>>      Device "DiscoExterno320Gb" requested by DIR could not be opened or 
>>> does not exist.
>>> 25-May 16:24 server-sd JobId 32: Fatal error: Device reservation failed for 
>>> JobId=32: Jmsg Job=backup-patriciodesktop-fd.2017-05-25_16.22.27_04 type=5 
>>> level=1495743840 opcode.cl-sd JobId 32: Warning: 
>>>      Device "DiscoExterno320Gb" requested by DIR could not be opened or 
>>> does not exist.
>>>
>>> 25-May 16:22 server-dir JobId 32: Fatal error: 
>>>      Storage daemon didn't accept Device "DiscoExterno320Gb" because:
>>>      3924 Device "DiscoExterno320Gb" not in SD Device resources or no 
>>> matching Media Type.
>>> 25-May 16:22 server-dir JobId 32: Error: Bareos server-dir 16.2.5 (03Mar17):
>>>   Build OS:               x86_64-suse-linux-gnu suse (none)
>>>   JobId:                  32
>>>   Job:                    backup-patriciodesktop-fd.2017-05-25_16.22.27_04
>>>   Backup Level:           Full (upgraded from Incremental)
>>>   Client:                 "patriciodesktop-fd" 16.2.5 (03Mar17) 
>>> x86_64-suse-linux-gnu,suse,(none),,
>>>   FileSet:                "patriciodesktop" 2017-05-24 01:14:17
>>>   Pool:                   "Full" (From Job FullPool override)
>>>   Catalog:                "server" (From Client resource)
>>>   Storage:                "PatricioDesktopSD" (From Job resource)
>>>   Scheduled time:         25-May-2017 16:22:25
>>>   Start time:             25-May-2017 16:22:29
>>>   End time:               25-May-2017 16:22:30
>>>   Elapsed time:           1 sec
>>>   Priority:               10
>>>   FD Files Written:       0
>>>   SD Files Written:       0
>>>   FD Bytes Written:       0 (0 B)
>>>   SD Bytes Written:       0 (0 B)
>>>   Rate:                   0.0 KB/s
>>>   Software Compression:   None
>>>   VSS:                    no
>>>   Encryption:             no
>>>   Accurate:               no
>>>   Volume name(s):         
>>>   Volume Session Id:      1
>>>   Volume Session Time:    1495743813
>>>   Last Volume Bytes:      0 (0 B)
>>>   Non-fatal FD errors:    1
>>>   SD Errors:              0
>>>   FD termination status:  
>>>   SD termination status:  
>>>   FD  Secure Erase Cmd:   <NULL>
>>>   Termination:            *** Backup Error ***
>>>
>>> 2) Storage daemon configuration: device not mounted
>>> patriciodesktop:bareos-sd.d # cat device/DiscoExterno320Gb.conf
>>> Device {
>>>   Name = DiscoExterno320Gb
>>> #  Device Type = File
>>>   Media Type = File
>>>   Archive Device = /dev/sdc1
>>>   LabelMedia = yes;                   # lets Bareos label unlabeled media
>>>   Random Access = yes;
>>>   AutomaticMount = yes;               # when device opened, read it
>>>   RemovableMedia = no;
>>>   Requires Mount = yes;
>>>   Mount Point = /home/patricio/respaldos
>>>   Mount Command = mount -t auto %a %m
>>>   Unmount Command = umount %m
>>>   AlwaysOpen = no;
>>>   Description = "Disco externo 320 para respaldos semanales."
>>> }
>>>
>>> patriciodesktop:bareos-sd.d # cat director/server.conf
>>> Director {
>>>   Name = server
>>>   Password = "bareosstoragedaemon"
>>>   Description = "Director, who is permitted to contact this storage daemon."
>>> }
>>>
>>> patriciodesktop:bareos-sd.d # cat storage/server-sd.conf
>>> Storage {
>>>   Name = server-sd
>>>   Maximum Concurrent Jobs = 10
>>>
>>>   # remove comment from "Plugin Directory" to load plugins from specified 
>>> directory.
>>>   # if "Plugin Names" is defined, only the specified plugins will be loaded,
>>>   # otherwise all storage plugins (*-sd.so) from the "Plugin Directory".
>>>   #
>>>   # Plugin Directory = /usr/lib64/bareos/plugins
>>>   # Plugin Names = ""
>>> }
>>>
>>>
>>> and get this error:
>>>
>>> 25-May 16:52 server-sd JobId 35: No prior Full backup Job record found.
>>> 25-May 16:52 server-sd JobId 35: No prior or suitable Full backup found in 
>>> catalog. Doing FULL backup.
>>> 25-May 16:52 server-sd JobId 35: Start Backup JobId 35, 
>>> Job=backup-patriciodesktop-fd.2017-05-25_16.52.50_08
>>> 25-May 16:54 server-sd JobId 35: Error: dev.c:238 /dev/sdc1 has an unknown 
>>> device type 0
>>> 25-May 16:54 server-sd JobId 35: Warning: 
>>>      Device "DiscoExterno320Gb" requested by DIR could not be opened or 
>>> does not exist.
>>> 25-May 16:54 server-sd JobId 35: Error: dev.c:238 /dev/sdc1 has an unknown 
>>> device type 0
>>> 25-May 16:54 server-sd JobId 35: Warning: 
>>>      Device "DiscoExterno320Gb" requested by DIR could not be opened or 
>>> does not exist.
>>> 25-May 16:54 server-sd JobId 35: Error: dev.c:238 /dev/sdc1 has an unknown 
>>> device type 0
>>> 25-May 16:54 server-sd JobId 35: Warning: 
>>>      Device "DiscoExterno320Gb" requested by DIR could not be opened or 
>>> does not exist.
>>> 25-May 16:54 server-sd JobId 35: Fatal error: Device reservation failed for 
>>> JobId=35: Jmsg Job=backup-patriciodesktop-fd.2017-05-25_16.52.50_08 type=5 
>>> level=1495745663 server-sd JobId 35: Warning: 
>>>      Device "DiscoExterno320Gb" requested by DIR could not be opened or 
>>> does not exist.
>>>
>>> 25-May 16:52 server-sd JobId 35: Fatal error: 
>>>      Storage daemon didn't accept Device "DiscoExterno320Gb" because:
>>>      3924 Device "DiscoExterno320Gb" not in SD Device resources or no 
>>> matching Media Type.
>>> 25-May 16:52 server-sd JobId 35: Error: Bareos server 16.2.5 (03Mar17):
>>>   Build OS:               x86_64-suse-linux-gnu suse (none)
>>>   JobId:                  35
>>>   Job:                    backup-patriciodesktop-fd.2017-05-25_16.52.50_08
>>>   Backup Level:           Full (upgraded from Incremental)
>>>   Client:                 "patriciodesktop-fd" 16.2.5 (03Mar17) 
>>> x86_64-suse-linux-gnu,suse,(none),,
>>>   FileSet:                "patriciodesktop" 2017-05-24 01:14:17
>>>   Pool:                   "Full" (From Job FullPool override)
>>>   Catalog:                "server" (From Client resource)
>>>   Storage:                "PatricioDesktopSD" (From Job resource)
>>>   Scheduled time:         25-May-2017 16:52:49
>>>   Start time:             25-May-2017 16:52:53
>>>   End time:               25-May-2017 16:52:53
>>>   Elapsed time:           0 secs
>>>   Priority:               10
>>>   FD Files Written:       0
>>>   SD Files Written:       0
>>>   FD Bytes Written:       0 (0 B)
>>>   SD Bytes Written:       0 (0 B)
>>>   Rate:                   0.0 KB/s
>>>   Software Compression:   None
>>>   VSS:                    no
>>>   Encryption:             no
>>>   Accurate:               no
>>>   Volume name(s):         
>>>   Volume Session Id:      1
>>>   Volume Session Time:    1495745652
>>>   Last Volume Bytes:      0 (0 B)
>>>   Non-fatal FD errors:    1
>>>   SD Errors:              0
>>>   FD termination status:  
>>>   SD termination status:  
>>>   FD  Secure Erase Cmd:   <NULL>
>>>   Termination:            *** Backup Error ***
>>>
>>>
>>> So really can't find what I'm missing to accomplish this. Can this guide 
>>> http://wiki.bacula.org/doku.php?id=removable_disk help me?
>>>
>>> Thanks in advance.
>>>
>
> -- 
> You received this message because you are subscribed to the Google
> Groups "bareos-users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to bareos-users+unsubscr...@googlegroups.com
> <mailto:bareos-users+unsubscr...@googlegroups.com>.
> To post to this group, send email to bareos-users@googlegroups.com
> <mailto:bareos-users@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout.

-- 
*CaC, Computer and Communication*
Inhaber Stefan Klatt
End-2-End Senior Network Consultant
Triftstrasse 9
60528 Frankfurt
Germany
USt-IdNr.: DE260461592

Tel.: +49-(0)172-6807809
Tel.: +49-(0)69-67808-900
Fax: +49-(0)69-67808-837
Email: stefan.kl...@cac-netzwerk.de
Profil: http://www.cac-netzwerk.de/profil

-- 
You received this message because you are subscribed to the Google Groups 
"bareos-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to bareos-users+unsubscr...@googlegroups.com.
To post to this group, send email to bareos-users@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to