Archives week 34 of 2010
Aug. 23, 2010 - Aug. 29, 2010
Was looking up something for a backup operation and saw a command where someone was catting from ssh... I'd never thought of doing it before, but it does make sense:
ssh dbhost.example.com "pg_dumpall | gzip -c" > ~/cluster.sql.gzshould connect and dump the entire DB cluster (gzipped) to your local machine.
ssh dbhost.example.com "gunzip -c ...
x.split( '.' )Is an idiom that shows up all over the place, particularly in list comprehensions. Run your code through 2to3 and it fails when x is a str (bytes) object, as 3.x thinks the '.' is unicode. It fails with a rather cryptic
TypeError: Type str doesn't support the buffer APIerror as ...