<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body text="#000000" bgcolor="#FFFFFF">
I'm in the process of learning python and migrating away from bash
scripting. I'm in the process of converting my bash scripts that
essentially ssh to another host via shared keys, execute commands
remotely, and exit. To do this I started using paramiko but
eventually decided to do it w/ subprocess since I am more familiar
with that as a result of me converting other scripts. <br>
<br>
This is what I'm currently working on, the purpose of this is to ssh
into another machine, make a tarball of dumped .sql files, save the
tarball with the result of
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
timestamp() as the naming convention, then it will eventually clean
it up based on file age: <br>
<br>
<br>
<a href="http://dpaste.com/817874/">http://dpaste.com/817874/</a><br>
<br>
This is the result after executing the script:<br>
<br>
<br>
<br>
<br>
rev@omega:~/code/beavis/test$ ls<br>
bleh1.sql bleh2.sql bleh3.sql ssh-jobs.py<br>
<br>
rev@omega:~/code/beavis/test$ ./ssh-jobs.py <br>
tar: Removing leading `/' from member names<br>
/home/rev/code/beavis/test/bleh2.sql<br>
/home/rev/code/beavis/test/bleh3.sql<br>
tar: /home/rev/code/beavis/test/24.10.2012: Cannot stat: No such
file or directory<br>
tar: 15\:06\:52.tgz: Cannot stat: No such file or directory<br>
tar: Exiting with failure status due to previous errors<br>
rev@omega:~/code/beavis/test$ <br>
<br>
As you can see it looks like its having issues with the way I'm
using timestamp() for string formatting, as far as I can tell it is
not a tar specific problem? Any help/insight on this would be
greatly appreciated.<br>
</body>
</html>