Coder Social home page Coder Social logo

python-bareos's Introduction

Bareos

Bareos

Bareos (Backup Archiving Recovery Open Sourced) is a reliable, cross-network open source software for backup, archiving and recovery of data for all well-established operating systems. Features of Bareos include amongst others:

  • True open source software; no open-core or other restrictions; License AGPLv3
  • network based
  • multiple backends
  • multiple clients and storages possible; Active / passive clients possible
  • Backup Clients ('Bareos-FD') available on Linux, FreeBSD, Windows, macOS and others
  • Python plugin interface, used by the VMWare Plugin and others
  • SAN-Backups using NDMP (with DAR/DDAR); NDMP tape support
  • Always Incremental Backup scheme
  • Encryption
  • Scriptable CLI
  • web based graphical interface (webui)
  • Role-based ACL support for commands and objects

The source code of Bareos is available on https://github.com/bareos/ under the AGPL v3 license. Additionally Bareos offers binary package repositories for the major Linux distributions, FreeBSD, Windows and macOS.

Documentation

Contribute

If you want to contribute something to this repo please read our contribution policy at

Security policy

If you want to report a security-related problem, please take a look at our security policy.

Mailing list

Issue tracker

Packages

python-bareos's People

Contributors

aussendorf avatar by-erik avatar jacobborisov avatar joergsteffens avatar pstorz avatar sergeymazin avatar wangchuan2008888 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

python-bareos's Issues

the functional of util.path

the comment of util.path is
"""
Class to handle Bareos passwords.
"""
but by reading the code cannot find anything aboat password
is this a mistake or i'm misunderstanding
thinks for provide this conveniently module

Wrong json for 'show jobs'

In [14]: directorconsole.call('show jobs')
Out[14]:
{'error': {'code': 2,
'data': bytearray(b'Job {\n Name = "RestoreFiles"\n Description = "Standard Restore template. Only one such job is needed for all standard Jobs/Clients/Storage ..."\n Type = Restore\n Messages = "Standard"\n Storage = "mia-backup03_storage03-sd"\n Pool = "mia-backup03_mixed_incremental"\n Client = "mia-backup03-fd"\n FileSet = "LinuxAll"\n Where = "/tmp/bareos-restores"\n}\n\n ##CUT##}\n\n{"result":{},"jsonrpc":"2.0","id":null}'),
'message': 'No JSON object could be decoded'}}

% dpkg -l|grep python-bareos
ii  python-bareos                             0.4.1509724938.4a5bd79-48.1                 all          Backup Archiving REcovery Open Sourced - Python module

wrong Json output

I'm trying to get all connected clients;
director.call('status director')['client-connection']

However the output is incomplete (there are two clients in my setup) :
{u'protocol_version': 54, u'connect_time': u'22-Mar-17 12:05', u'authenticated': 1, u'name': u'LaptopSvenn'}

When I call
director.call('status director')

I get both clients but the format is incorrect.
{u'protocol_version': 54, u'connect_time': u'22-Mar-17 12:06', u'authenticated': 1, u'name': u'rocky', u'client-connection': {u'protocol_version': 54, u'connect_time': u'22-Mar-17 12:05', u'authenticated': 1, u'name': u'LaptopSvenn'}}
I ran this on Centos 7 / Python 2.7.5

For reference this is the non-json result :

[root@lungo-02 python]# python test.py
### director.call('status director')
{u'protocol_version': 54, u'connect_time': u'22-Mar-17 12:06', u'authenticated': 1, u'name': u'rocky', u'client-connection': {u'protocol_version': 54, u'connect_time': u'22-Mar-17 12:05', u'authenticated': 1, u'name': u'LaptopSvenn'}}


###  director.call('status director')['client-connection']
{u'protocol_version': 54, u'connect_time': u'22-Mar-17 12:05', u'authenticated': 1, u'name': u'LaptopSvenn'}


### director.call('status director')
bareos-dir Version: 16.2.4 (01 July 2016) x86_64-redhat-linux-gnu redhat CentOS Linux release 7.0.1406 (Core)
Daemon started 22-Mar-17 12:05. Jobs: run=0, running=0 mode=0 db=mysql
 Heap: heap=1,142,784 smbytes=230,022 max_bytes=234,702 bufs=1,388 max_bufs=1,401
Plugin Info:
 Plugin     : python-dir.so
 Description: Python Director Daemon Plugin
 Version    : 3, Date: October 2013
 Author     : Marco van Wieringen
 License    : Bareos AGPLv3
 Usage      : python:instance=<instance_id>:module_path=<path-to-python-mod




Scheduled Jobs:
Level          Type     Pri  Scheduled          Name               Volume
===========================================================================
Incremental    Backup    10  22-Mar-17 21:00    backup-bareos-fd   Incremen
[...]
Full           Backup    11  22-Mar-17 21:10    BackupCatalog      Incremen
====

Running Jobs:
Console connected at 22-Mar-17 12:26
Console connected at 22-Mar-17 12:27
No Jobs running.
====

Terminated Jobs:
 JobId  Level    Files      Bytes   Status   Finished        Name
====================================================================
   145  Incr          0         0   OK       22-Mar-17 02:07 TriggerBackup
   146  Incr          0         0   OK       22-Mar-17 03:07 TriggerBackup
   147  Incr          0         0   OK       22-Mar-17 04:07 TriggerBackup
   148  Incr          0         0   OK       22-Mar-17 05:07 TriggerBackup
   149  Incr          0         0   OK       22-Mar-17 06:07 TriggerBackup
   150  Incr          0         0   OK       22-Mar-17 07:07 TriggerBackup
   151  Incr          0         0   OK       22-Mar-17 08:07 TriggerBackup
   152  Incr          0         0   OK       22-Mar-17 09:07 TriggerBackup
   153  Incr          0         0   OK       22-Mar-17 10:07 TriggerBackup
   154  Incr          2       213   OK       22-Mar-17 11:07 TriggerBackup


Client Initiated Connections (waiting for jobs):
Connect time        Protocol            Authenticated       Name
===========================================================================
22-Mar-17 12:05     54                  1                   LaptopSvenn
22-Mar-17 12:06     54                  1                   rocky
====

Perhaps relevant I get this error :
bareos-dir: ERROR in output_formatter.c:126 Failed to add JSON reference client-connection (stack size: 1) already exists. This should not happen. Ignoring.

Command 'status job=cutejob returns error'

Looks like i found another bug, there is output from bconsole:

*status job=oracle_weekly_ow-backup03
Job "oracle_weekly_ow-backup03" is not running.

Python:

In [136]: console.call("status job=oracle_weekly_ow-backup03")
Out[136]: 
{u'error': {u'code': 1,
  u'data': {u'messages': {u'error': [u'Job "oracle_weekly_ow-backup03" is not running.\n']},
   u'result': {}},
  u'message': u'failed'},
 u'id': None,
 u'jsonrpc': u'2.0'}

Am i wrong and it's expected behavior?

PS
I found another strange behavior, bconsole:

*.status dir current
1000 OK .status

Python:

In [137]: console.call(".status dir current")
Out[137]: {}

Should i open another one issue for that?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.