Safekeep czyli wstęp do Pytonga

Posted on Thu 30 April 2009 in Uncategorized

Próbuję (uwaga! okragłe informatyczne słowo) zaimplementować Safekeep do robienia backapów ale są problemsy.
Safekeep jest fajny bo to nakładka na rdiff-backup, w którą wklejono zarządzanie kluczami dla SSH oraz dumpy z baz SQL.
Ale cóż z tego kiedy wciąż i od nowa mam babole podczas jego ustawiania. Przy okazji muszę się szkolić w Pythona więc nie jest źle, a nawet ciekawie, nie mówiąc już o podciągnięciu się z angielskiego bo na koniec maznąłem mesga na grupę deweloperską następującej treści:

Hello folks,
I've just installed latest Safekeep on server and one client station (both Mandriva Linux, server is 2008.1, workstation is 2008).
I'm running safekeep as root.
My backup file is very simply:
prosiak# cat test.backup
<backup>
<host name="gw2"
key-ctrl="/root/.ssh/backup_id_dsa"
key-data="/root/.ssh/backup2_id_dsa"
/>
<data>
<include path="/root/bin"/>
</data>
</backup>
When I run safekeep to test how it works I get error saying:
debug1: Sending command: safekeep --client
dbg: Do client main loop
dbg: Server versions: 1.1, 1.2.0
dbg: Do client_side_script: step STARTUP
dbg: Do client_side_script: step PRE-SETUP
dbg: Do setup of gw2
dbg: Doing DB dumps
dbg: Working root is /
dbg: Do client_side_script: step POST-SETUP
ERR: cannot concatenate 'str' and 'int' objects
ERR: Server backup for client test: FAILED
I don't programme in Python but trying to figure out what is going on I've found that error is generated on client's side by send() function which is called from do_client().
When I comment out 'print msg' statement from send() function :
def send(msg):
# print msg
sys.stdout.flush()
Server waits endlessly in do_server_getanswer() function (there's no error) but, in my opinion, should quit with message "client died unexpectedly" because no line was sent from client side.
I've tried to debug script with pdb but I'm to novice to do it, can anyone could help me to resolve this problem?

IMHO problem leży w Mandrivie, piździelstwie strasznym, ale żeby dać podstawę do mych, na razie bezpodstawnych, podejrzeń zaciągam Slackware 12.2 po torrencie. Postawię na VirtualBoxie i wtedy pogadamy! :)