<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Next Door Hacker &#187; backup</title>
	<atom:link href="http://www.nextdoorhacker.com/tag/backup/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.nextdoorhacker.com</link>
	<description>I&#039;m just your friendly neighborhood hacker</description>
	<lastBuildDate>Mon, 05 Apr 2010 09:44:47 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>I </title>
		<link>http://www.nextdoorhacker.com/2009/03/i-heart-netcat/</link>
		<comments>http://www.nextdoorhacker.com/2009/03/i-heart-netcat/#comments</comments>
		<pubDate>Mon, 02 Mar 2009 22:32:44 +0000</pubDate>
		<dc:creator>Prasanna</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[rants]]></category>
		<category><![CDATA[sysadmin]]></category>
		<category><![CDATA[windows]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[network]]></category>

		<guid isPermaLink="false">http://www.nextdoorhacker.com/?p=68</guid>
		<description><![CDATA[I wonder if I could call it epiphany the moment someone thought
Hmm&#8230;. what if I could cat over the network?
cat: the essential unix tool to read and write files. FYI, the name comes from concatenate (source: comp.unix.shell&#8230;. I mean wikipedia). Possibly the simplest yet the most powerful unix tool ever made.
Meet netcat, called the TCP/IP [...]]]></description>
			<content:encoded><![CDATA[<p>I wonder if I could call it epiphany the moment someone thought</p>
<blockquote><p>Hmm&#8230;. what if I could cat over the network?</p></blockquote>
<p>cat: the essential unix tool to read and write files. FYI, the name comes from concatenate (source: comp.unix.shell&#8230;. I mean wikipedia). Possibly the simplest yet the most powerful unix tool ever made.</p>
<p>Meet netcat, called the TCP/IP swiss army knife. It is probably the most useful networking tool to have been made for unix and with cygwin, for windows too. Some of its possible uses are port scanning, transferring files, turning any command line app to run over the network and oh yeah, to put backdoors. I&#8217;ve used it for these things every once in a while.</p>
<p>So,  I had to backup my /home directory in Linux because the system was fscking up (more on that once I am sure what exactly was wrong with it).  Sending 40+ GBs over the tubes is a terrible idea when you aren&#8217;t sure when your computer is going to hang up. However, I have a windows box with lot of free space. Using winscp is a good idea for small enough files is nice, but bad  for a lot of small/big files but I wasn&#8217;t even sure saving would protect the protect the permissions. Winscp is just slow and makes very little sense in a secure LAN most of the time. I&#8217;ve had problems with that when I move files over the network to windows machines for backup. Another idea was to make a tar file and just move that over the network using ftp.But, I don&#8217;t exactly have any free space to tar a file and then move. Then I thought about netcat. Maybe someone has ported to windows too, afterall it is very useful.</p>
<p>Lo and behold, I found a version at <a href="http://joncraton.org/files/nc111nt.zip">http://joncraton.org/files/nc111nt.zip</a></p>
<p>for most of the things, it seems to work like the unix one and does it pretty well. I even got to spawn the windows  commandline shell using</p>
<blockquote><p>nc -p 3444 -l -e cmd.exe</p></blockquote>
<p>and then</p>
<blockquote><p>telnet &lt;host&gt; 3444</p></blockquote>
<p>on my linux box to get the windows shell.</p>
<p>Anyways, the way I am doing my backup is just the usual set of commands:</p>
<blockquote><p>nc -p 333 -l -v &gt; F:\backup-home.tgz</p></blockquote>
<p>and then</p>
<blockquote><p>sudo su</p>
<p># tar czvf &#8211; /home | nc 192.168.1.135 3333</p></blockquote>
<p>Simple enough and I am getting pretty good speed as my files get backed up. Now I think the catch here is that if the connection is broken or I start downloading some crazy big file, it halts the download. While I was downloading, I decided to write a blog post and i wanted to try the windows live writer. As I was running the web based downloader, it apparently hogged all the bandwidth (overzealous MS products again) and my download halted for a while.</p>
<h2>Further Info:</h2>
<p>If you managed to read/skim through my rant, here are some resources that you might like. I don&#8217;t really like regurgitating everything from another site, so I&#8217;m putting up some interesting links.</p>
<p><a href="http://www.catonmat.net/blog/unix-utilities-netcat/">http://www.catonmat.net/blog/unix-utilities-netcat/</a></p>
<p><a href="http://www.stuartaxon.com/2008/05/22/netcat-in-windows/">http://www.stuartaxon.com/2008/05/22/netcat-in-windows/</a></p>
<p><a href="http://netcat.sourceforge.net/">http://netcat.sourceforge.net/</a></p>
<p><a href="http://www.linux.com/feature/114093">http://www.linux.com/feature/114093</a></p>
<p><a href="http://www.terminally-incoherent.com/blog/2007/08/07/few-useful-netcat-tricks/">http://www.terminally-incoherent.com/blog/2007/08/07/few-useful-netcat-tricks/</a></p>
<p><a href="http://www.rohitab.com/discuss/lofiversion/index.php/t11812.html">http://www.rohitab.com/discuss/lofiversion/index.php/t11812.html</a></p>
<h3>Update:</h3>
<p>Himanshu just pointed out cryptcat: <a href="http://cryptcat.sourceforge.net/">http://cryptcat.sourceforge.net/</a></p>
<p>It uses a is netcat enhanced with twofish encryption with ports for WIndows NT, BSD and Linux. Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nextdoorhacker.com/2009/03/i-heart-netcat/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
