<?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>Screenage &#187; Tar</title>
	<atom:link href="http://www.screenage.de/blog/category/tar/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.screenage.de/blog</link>
	<description></description>
	<lastBuildDate>Sun, 13 Nov 2011 10:33:53 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Bashup &#8211; a first example for a simple tree backup over ssh</title>
		<link>http://www.screenage.de/blog/2008/01/28/bashup-a-first-example-for-a-simple-tree-backup-over-ssh/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=bashup-a-first-example-for-a-simple-tree-backup-over-ssh</link>
		<comments>http://www.screenage.de/blog/2008/01/28/bashup-a-first-example-for-a-simple-tree-backup-over-ssh/#comments</comments>
		<pubDate>Mon, 28 Jan 2008 21:13:17 +0000</pubDate>
		<dc:creator>ccm</dc:creator>
				<category><![CDATA[Backup]]></category>
		<category><![CDATA[Bashup]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Network]]></category>
		<category><![CDATA[SSH]]></category>
		<category><![CDATA[Tar]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.screenage.de/blog/2008/01/28/bashup-a-first-example-for-a-simple-tree-backup-over-ssh/</guid>
		<description><![CDATA[Some days (weeks?) ago I told you about the release of &#8220;Bashup&#8221; a bourne shell compatible backup script on sourceforge. As the script is still in heave Alpha I&#8217;d like to give you a first insight into it&#8217;s development. Bashup &#8230; <a href="http://www.screenage.de/blog/2008/01/28/bashup-a-first-example-for-a-simple-tree-backup-over-ssh/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Some days (weeks?) ago I told you about the release of &#8220;<a href="https://sourceforge.net/projects/bashup">Bashup</a>&#8221; a bourne shell compatible backup script on sourceforge. As the script is still in heave Alpha I&#8217;d like to give you a first insight into it&#8217;s development.</p>
<p>Bashup is written in heavy Bash syntax and has few dependencies to external programs. You should image it as a scripting library for backups as it allows to call different backup methods and is more a framework than a fully integrated solution. The power of this is the ability to be free in the creation of a backup process while still using easy methods.</p>
<p>The following is a fairly easy setup of bashup for backing up some directories over ssh. You see that we only source the bashup library here, setup some variables and call the bashup method then which executes the backup.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/bash</span>
<span style="color: #666666; font-style: italic;"># source bashup lob</span>
. bashup_lib.sh
&nbsp;
<span style="color: #666666; font-style: italic;"># set setup source - we want to backup a tree</span>
<span style="color: #007800;">SOURCE</span>=<span style="color: #c20cb9; font-weight: bold;">tree</span>
<span style="color: #666666; font-style: italic;"># set source dirs</span>
<span style="color: #007800;">TREE_DIRECTORIES</span>=<span style="color: #ff0000;">&quot;<span style="color: #007800;">$HOME</span>/PDF <span style="color: #007800;">$HOME</span>/ogg&quot;</span>
<span style="color: #666666; font-style: italic;"># setup filter for compression</span>
<span style="color: #007800;">FILTER</span>=<span style="color: #c20cb9; font-weight: bold;">bzip2</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># set destination - we want to ssh</span>
<span style="color: #007800;">DESTINATION</span>=ssh_file
<span style="color: #666666; font-style: italic;"># set ssh host, you could be clever</span>
<span style="color: #666666; font-style: italic;"># and setup access in .ssh/config</span>
<span style="color: #007800;">SSH_HOST</span>=host.name.tld
<span style="color: #666666; font-style: italic;"># set remote file name</span>
<span style="color: #007800;">FILE</span>=file.name.bz2
&nbsp;
<span style="color: #666666; font-style: italic;"># we want two types of logging</span>
<span style="color: #007800;">USE_REPORTERS</span>=<span style="color: #ff0000;">&quot;console log&quot;</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># set the log file names</span>
<span style="color: #007800;">COMBINED_LOG</span>=combined.log
<span style="color: #007800;">ERROR_LOG</span>=error.log
&nbsp;
<span style="color: #666666; font-style: italic;"># call bashup</span>
bashup</pre></td></tr></table></div>

<p>I admit this example won&#8217;t win a Noble award but if you are busy with setting up backups on very different servers you might like the idea of a scripting environment which only needs bash. Imagine your power when digging deeper into the bashup lib and calling the special methods directly while piping output and more. This is possible of course.</p>
<p>In the next weeks I&#8217;ll show you how to use backup rotation (yes, also over ssh, ftp and other methods), mysql/postresql/oracle/subversion backup, nagios feedback integration and more.</p>
<p>If you like to test and tell me what you think or even want to provide patches, feel free to checkout bashup:</p>
<p><code>svn co https://bashup.svn.sourceforge.net/svnroot/bashup bashup</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.screenage.de/blog/2008/01/28/bashup-a-first-example-for-a-simple-tree-backup-over-ssh/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Using netcat and tar for network file transfer</title>
		<link>http://www.screenage.de/blog/2007/12/30/using-netcat-and-tar-for-network-file-transfer/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=using-netcat-and-tar-for-network-file-transfer</link>
		<comments>http://www.screenage.de/blog/2007/12/30/using-netcat-and-tar-for-network-file-transfer/#comments</comments>
		<pubDate>Sun, 30 Dec 2007 07:18:40 +0000</pubDate>
		<dc:creator>ccm</dc:creator>
				<category><![CDATA[Allgemein]]></category>
		<category><![CDATA[CommandLine]]></category>
		<category><![CDATA[FileTransfer]]></category>
		<category><![CDATA[Netcat]]></category>
		<category><![CDATA[Network]]></category>
		<category><![CDATA[Tar]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.screenage.de/blog/2007/12/30/using-netcat-and-tar-for-network-file-transfer/</guid>
		<description><![CDATA[Imagine you are on lan party or on the road and quickly want to transfer a file or directory to another computer. Both computer owners are just to lazy to setup something like ftp, smb, nfs. A very simple and &#8230; <a href="http://www.screenage.de/blog/2007/12/30/using-netcat-and-tar-for-network-file-transfer/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Imagine you are on lan party or on the road and quickly want to transfer a file or directory to another computer. Both computer owners are just to lazy to setup something like ftp, smb, nfs. A very simple and even cross platform solution is using netcat and in case of a directory in combination with tar like the following steps. I will just show you how to use it without compression for a directory. Fell free to play around. You can test it locally of course.</p>
<p>1. The sender</p>
<p>The sender has to call netcat in server mode and pipe content into it. The next line tells tar to build a tarball and write it to standard output which is redirected via a pipe to netcat. Netcat is told to start in server mode (-l), listen on port 7878 (-p 7878) and shutdown itself after waiting 10 seconds after having seen an end of file in standard input (-q 10):</p>
<p><code>$ tar c directory | nc -q 10 -l -p 7878</code></p>
<p>2. The receiver</p>
<p>The receiver has to call netcat and tell him to <span id="more-13"></span>connect to the remote machine and the correct port and redirects the standard output to a file. For convenience he also sets a timeout parameter (-w 10):</p>
<p><code>$ nc -w 10 remotehost 7878 &gt; nameoftar.tar</code></p>
<p>That&#8217;s all. You just setup a very fast file transfer. For testing purposes use localhost. Please note that on the receiver side you are completely free to choose a file name for the .tar file. If you use something like gzip or bzip2 compression you should choose something like .tar.gz or .tar.bz2 of course.</p>
<p>Thanks to mnemonik pointing this out.</p>
<p>Feel free to add your file transfer quick hack here.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.screenage.de/blog/2007/12/30/using-netcat-and-tar-for-network-file-transfer/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
	</channel>
</rss>

