Hi Jörg,

thanks for your reply! I found triggerjob.py and created a new job 
backup-AO-fd. After that I started triggerjob manually with ./triggerjob.py -p 
MYPASS and got an error:
DA-fd skipped, no matching job (backup-DA-fd) found (that is right, job don't 
exist)
daniel-VirtualBox-fd skipped, no matching job (backup-daniel-VirtualBox-fd) 
found (that is right, job don't exist)
Traceback (most recent call last):
  File "./triggerjob.py", line 73, in <module>
    trigger(director, jobs, clients)
  File "./triggerjob.py", line 26, in trigger
    job = director.call('list jobs client={} hours=24 
last'.format(client))['jobs'][0]
IndexError: list index out of range


with debugmode:
DEBUG triggerjob.<module>: address: localhost
DEBUG triggerjob.<module>: port: 9101
DEBUG triggerjob.<module>: dirname: ""
DEBUG triggerjob.<module>: name: *UserAgent*
DEBUG triggerjob.<module>: options: {'port': 9101, 'name': '*UserAgent*', 
'address': 'localhost'}
DEBUG lowlevel.__init__: init
DEBUG lowlevel.__connect: connected to localhost:9101
DEBUG lowlevel.send: Hello *UserAgent* calling

DEBUG lowlevel.__get_header:   remaining header len: 4
DEBUG lowlevel.recv_submsg:   submsg len: 55
DEBUG lowlevel._cram_md5_respond: (recv): auth cram-md5 
<2009462362.1522138238@bareos-dir> ssl=0

DEBUG lowlevel.send: gA/xPXt/2A/SD401cxVKjD
DEBUG lowlevel.__get_header:   remaining header len: 4
DEBUG lowlevel.recv_submsg:   submsg len: 13
DEBUG lowlevel.send: auth cram-md5 <8832177391.1522138238@*UserAgent*> ssl=0

DEBUG lowlevel.__get_header:   remaining header len: 4
DEBUG lowlevel.recv_submsg:   submsg len: 23
DEBUG lowlevel._cram_md5_challenge: received: L5+DJn/YC09HL91Lo1/93A
DEBUG lowlevel._cram_md5_challenge: string_to_base64, compatible:     
Lp2DJnXYC09HLN1Lo1793A
DEBUG lowlevel._cram_md5_challenge: string_to_base64, not compatible: 
L5+DJn/YC09HL91Lo1/93A
DEBUG lowlevel.send: 1000 OK auth

DEBUG lowlevel.__get_header:   remaining header len: 4
DEBUG lowlevel.recv_submsg:   submsg len: 50
DEBUG lowlevel.recv_msg: msg "1000 OK: bareos-dir Version: 17.2.4 (21 Sep 
2017)" matches regex "^1000 OK.*$"
DEBUG lowlevel.send: .api json
DEBUG lowlevel.__get_header:   remaining header len: 4
DEBUG lowlevel.__set_status: Command succeeded (-15)
DEBUG lowlevel.__get_header:   remaining header len: 4
DEBUG lowlevel.recv_submsg:   submsg len: 68
DEBUG lowlevel.__get_header:   remaining header len: 4
DEBUG lowlevel.__set_status: Messages pending (-17)
DEBUG lowlevel.__get_header:   remaining header len: 4
DEBUG lowlevel.__set_status: Server ready and waiting (-18)
DEBUG directorconsolejson._init_connection: {u'api': 2}
DEBUG lowlevel.send: .api json compact=yes
DEBUG lowlevel.__get_header:   remaining header len: 4
DEBUG lowlevel.__set_status: Start command execution (-16)
DEBUG lowlevel.__get_header:   remaining header len: 4
DEBUG lowlevel.__set_status: Command succeeded (-15)
DEBUG lowlevel.__get_header:   remaining header len: 4
DEBUG lowlevel.recv_submsg:   submsg len: 46
DEBUG lowlevel.__get_header:   remaining header len: 4
DEBUG lowlevel.__set_status: Server ready and waiting (-18)
DEBUG directorconsolejson._init_connection: {u'api': 2}
DEBUG triggerjob.<module>: authentication successful
DEBUG lowlevel.send: .jobs
DEBUG lowlevel.__get_header:   remaining header len: 4
DEBUG lowlevel.__set_status: Start command execution (-16)
DEBUG lowlevel.__get_header:   remaining header len: 4
DEBUG lowlevel.__set_status: Command succeeded (-15)
DEBUG lowlevel.__get_header:   remaining header len: 4
DEBUG lowlevel.recv_submsg:   submsg len: 2273
DEBUG lowlevel.__get_header:   remaining header len: 4
DEBUG lowlevel.__set_status: Server ready and waiting (-18)
DEBUG lowlevel.send: status director
DEBUG lowlevel.__get_header:   remaining header len: 4
DEBUG lowlevel.__set_status: Start command execution (-16)
DEBUG lowlevel.__get_header:   remaining header len: 4
DEBUG lowlevel.__set_status: Command succeeded (-15)
DEBUG lowlevel.__get_header:   remaining header len: 4
DEBUG lowlevel.recv_submsg:   submsg len: 255
DEBUG lowlevel.__get_header:   remaining header len: 4
DEBUG lowlevel.__set_status: Server ready and waiting (-18)
DA-fd skipped, no matching job (backup-DA-fd) found
DEBUG lowlevel.send: list jobs client=AO-fd hours=24
DEBUG lowlevel.__get_header:   remaining header len: 4
DEBUG lowlevel.__set_status: Start command execution (-16)
DEBUG lowlevel.__get_header:   remaining header len: 4
DEBUG lowlevel.__set_status: Command succeeded (-15)
DEBUG lowlevel.__get_header:   remaining header len: 4
DEBUG lowlevel.recv_submsg:   submsg len: 48
DEBUG lowlevel.__get_header:   remaining header len: 4
DEBUG lowlevel.__set_status: Server ready and waiting (-18)
DEBUG lowlevel.send: list jobs client=AO-fd hours=24 last
DEBUG lowlevel.__get_header:   remaining header len: 4
DEBUG lowlevel.__set_status: Start command execution (-16)
DEBUG lowlevel.__get_header:   remaining header len: 4
DEBUG lowlevel.__set_status: Command succeeded (-15)
DEBUG lowlevel.__get_header:   remaining header len: 4
DEBUG lowlevel.recv_submsg:   submsg len: 48
DEBUG lowlevel.__get_header:   remaining header len: 4
DEBUG lowlevel.__set_status: Server ready and waiting (-18)
Traceback (most recent call last):
  File "./triggerjob.py", line 73, in <module>
    trigger(director, jobs, clients)
  File "./triggerjob.py", line 26, in trigger
    job = director.call('list jobs client={} hours=24 
last'.format(client))['jobs'][0]
IndexError: list index out of range

Can you help me to find the reason for it?

Am Montag, 26. März 2018 15:48:31 UTC+2 schrieb Daniel:
> Hello,
> I have been using bareos for backups in the company for some time. Currently, 
> the backups are triggered at night. Since some colleagues turn off their 
> computers at night, I use the following settings:
>   MaxFullInterval = 1 months
>   MaxDiffInterval = 1 weeks
>   Reschedule On Error = yes
>   Reschedule interval = 2 hours
>   Reschedule Times = 8
> This will back up the computers until noon, if they are then switched on.
> Now it can also be that colleagues are not in the office for a few days. I 
> then receive an e-mail every day that the backup has not been executed. I 
> would like to avoid that.
> 
> The solution mentioned in the documentation is Client Initiated Connection. I 
> have now integrated them into a test environment. 
> I have added the following to 
> /etc/bareos/bareos-fd.d/director/bareos-dir.conf on the client:
> Address = 192.168.1.233 #address of the backup server
> Connection From Client to Director = yes
> Connection From Director to Client = no
> 
> I also added the following to the configuration of my client on the backup 
> server:
>   Heartbeat interval = 60 
>   Connection From Client To Director = yes 
>   Connection From Director To Client = no 
>   Passive = yes 
>   Enabled = yes
> 
> If I now run "status dir" on the backup server, I get:
> Client initiated connections (waiting for jobs): 
> Connect time Protocol Authenticated Name 
> ===================================================
> 26-Mar018 15:11 54 1 daniel VirtualBox-fd
> 
> If I now start a job manually via bconsole, I first get "Using Client 
> Initiated Connection (daniel-VirtualBox-fd)" displayed, but later an error. 
> "Mar 26 14:46 bareos-sd JobId 5319: Warning: bsock_tcp.c:128 Could not 
> connect to File Daemon on 10.0.2.15:9102 ERR=The connection wait has expired
> Retrying ... 
> 26-Mar 15:12 bareos-sd JobId 5319: Fatal error: bsock_tcp.c:134 Unable to 
> connect to File Daemon on 10.0.2.15:9102 ERR=interruption during operating 
> system call 
> 26-Mar 15:12 bareos-sd JobId 5319: Fatal error: Failed to connect to File 
> daemon: 10.0.2.15:9102 
> 26-Mar 15:12 bareos-dir JobId 5319: Fatal error: Socket error on Passive 
> client command: ERR=No data available 
> 26-Mar 15:12 bareos-dir JobId 5319: Fatal error: Network error with FD during 
> Backup: ERR=No data available"
> 
> What could be the reason for this?
> And how does it work that a backup is created as soon as a client connects 
> and the last backup is older than one day? I know I can enforce full and 
> differential backup using MaxFullInterval = 1 months and MaxDiffInterval = 1 
> weeks. But how can I trigger it?

-- 
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 [email protected].
To post to this group, send email to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to