Hi all, the following is an example on page 32 of how to connect a client to the network and start a backup job.
URL: https://archive.fosdem.org/2017/schedule/event/backup_dr_bareos_scripting/attachments/slides/1445/export/events/attachments/backup_dr_bareos_scripting/slides/1445/Interacting_with_Bareos.pdf For this I have some questions? Is the script complete? Where is the script called? On the server or client? In the Director or in FileDaemon or StorageDaemon? In the directory "/ usr / lib / bareos / plugin" I have created the following file "nmanwme1" with the following content: def get_connected_clients(director): result=director.call('status director')['client-connection'] clients = [ client['name'] for client in result ] return clients def trigger(director, jobnames): for client in get_connected_clients(director): jobname = 'backup-{}'.format(client) if jobname in jobnames: jobs = director.call('list jobs client={} hours=24'.format(client))[ if not jobs: jobid = director.call('run {} yes'.format(jobname))['run']['jobid'] print('{}: backup triggered, jobid={}'.format(jobname, jobid)) On the Server i created the following's file: "/etc/bareos/bareos-dir.d/director/bareos-dir.conf" Director { # define myself Name = bareos-dir DIRport = 9101 QueryFile = "/usr/lib/bareos/scripts/query.sql" Maximum Concurrent Jobs = 10 Password = "........mQMZshcuQg........ttpGikVi84........" # Console password Messages = Daemon Auditing = yes Heartbeat Interval = 60 DIRAddress = bareos.intern.example.com } "/etc/bareos/bareos-dir.d/client/nmanwme01-fd.conf": Client { Name = nmanwme01-fd Address = nmanwme01.intern.example.com Password = ........EKEaTcgKB5........JMxDq4oV8M........ Connection from Director To Client = no Heartbeat Interval = 60 Connection from Client To Director = yes } "/etc/bareos/bareos-dir.d/job/backup-nmanwme01-fd.conf" Job { Name = "backup-nmanwme01-fd" JobDefs = "backup-nmanwme01" Client = "nmanwme01-fd" } Where should I insert the python file "nmanwme01"? Is the attached script complete? Thank you in advance for your support. Greetings from Stefan Harbich -- 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.