<?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; Bashup</title>
	<atom:link href="http://www.screenage.de/blog/category/bashup/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>Ubuntu Jaunty Jackalope on Berlin metro system</title>
		<link>http://www.screenage.de/blog/2009/04/23/ubuntu-jaunty-jackalope-on-berlin-metro-system/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=ubuntu-jaunty-jackalope-on-berlin-metro-system</link>
		<comments>http://www.screenage.de/blog/2009/04/23/ubuntu-jaunty-jackalope-on-berlin-metro-system/#comments</comments>
		<pubDate>Thu, 23 Apr 2009 12:58:40 +0000</pubDate>
		<dc:creator>ccm</dc:creator>
				<category><![CDATA[ArtWork]]></category>
		<category><![CDATA[Bashup]]></category>
		<category><![CDATA[JauntyJackalope]]></category>
		<category><![CDATA[ReleaseParty]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.screenage.de/blog/2009/04/23/ubuntu-jaunty-jackalope-on-berlin-metro-system/</guid>
		<description><![CDATA[Again I am happy to announce, that Berliner Fenster, the company behind the Berlin metro tv advertisement system, viewed by approx. 1.5 million people a day, was so kind of providing Ubuntu and Ubuntu Berlin with a spot for the &#8230; <a href="http://www.screenage.de/blog/2009/04/23/ubuntu-jaunty-jackalope-on-berlin-metro-system/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Again I am happy to announce, that <a href="http://www.berliner-fenster.de/intro-engl.html">Berliner Fenste</a>r, the company behind the Berlin metro tv advertisement system, viewed by approx. 1.5 million people a day, was so kind of providing Ubuntu and <a href="http://www.ubuntu-berlin.de/">Ubuntu Berlin</a> with a spot for the release of Ubuntu Jaunty Jackalope and the release party hosted by Ubuntu Berlin at <a href="http://c-base.org/">c-base</a>:</p>
<div class="youtube-video"><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="355" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="wmode" value="transparent" /><param name="src" value="http://www.youtube.com/v/vWxuTF5_L84" /><embed type="application/x-shockwave-flash" width="425" height="355" src="http://www.youtube.com/v/vWxuTF5_L84" wmode="transparent"></embed></object></div>
<p>If you cannot see the embedded spot, click on <a href="http://www.youtube.com/watch?v=vWxuTF5_L84">this link</a>.</p>
<p>The spot runs for three days, showing Ubuntu to a remarkable amount of passengers.</p>
<p>Please note: The background image is from Marvin Kubiak, you can find it among other interesting Jaunty background images on:</p>
<p><a href="https://wiki.ubuntu.com/Artwork/Incoming/Jaunty/AlphaBackgrounds">https://wiki.ubuntu.com/Artwork/Incoming/Jaunty/AlphaBackgrounds</a></p>
<p>Happy release!</p>
<div class="zemanta-pixie"><img class="zemanta-pixie-img" src="http://img.zemanta.com/pixy.gif?x-id=5e0c2ac4-1bff-815e-858e-bdda0243b2cb" alt="" /></div>
]]></content:encoded>
			<wfw:commentRss>http://www.screenage.de/blog/2009/04/23/ubuntu-jaunty-jackalope-on-berlin-metro-system/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>my package of the day &#8211; gpg for symmetric encryption</title>
		<link>http://www.screenage.de/blog/2008/06/19/my-package-of-the-day-gpg-for-symmetric-encryption/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=my-package-of-the-day-gpg-for-symmetric-encryption</link>
		<comments>http://www.screenage.de/blog/2008/06/19/my-package-of-the-day-gpg-for-symmetric-encryption/#comments</comments>
		<pubDate>Thu, 19 Jun 2008 16:00:42 +0000</pubDate>
		<dc:creator>ccm</dc:creator>
				<category><![CDATA[Allgemein]]></category>
		<category><![CDATA[Backup]]></category>
		<category><![CDATA[Bash]]></category>
		<category><![CDATA[Bashup]]></category>
		<category><![CDATA[CommandLine]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[PackeOfTheDay]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[SSH]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.screenage.de/blog/2008/06/19/my-package-of-the-day-gpg-for-symmetric-encryption/</guid>
		<description><![CDATA[Though asymmetric encryption is state of the art today, there are still cases when you probably are in need of a simple symmetric encryption. In my case, I need an easy scriptable interface for encrypting files for backup as transparent &#8230; <a href="http://www.screenage.de/blog/2008/06/19/my-package-of-the-day-gpg-for-symmetric-encryption/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Though asymmetric encryption is state of the art today, there are still cases when you probably are in need of a simple symmetric encryption. In my case, I need an easy scriptable interface for encrypting files for backup as transparent as possible. While you can, of course, use asymmetric encryption for this, symmetric methods can save you a lot of time while still being secure enough.</p>
<p>So there are methods like stupid .zip encryption or a bunch of packages in the repositories like &#8220;bcrypt&#8221; that provide you with their implementations. But there is a tool, you already know and maybe even use, but don&#8217;t think of when considering symmetric encryption: &#8220;<a href="http://www.gnupg.org/">gpg</a>&#8220;. Actually gpg heavily relies on symmetric algorithms as you might know. The public/private key encryption is a combination of asymmetric and symmetric encryption as the latter is quite more cpu efficient. In our case, gpg will use the strong <a href="http://www.gnu.org/software/gnu-crypto/manual/api/gnu/crypto/cipher/Cast5.html">cast5 cipher</a> by default.</p>
<p><strong>Encrypting</strong></p>
<p>So as gpg already knows about a bunch of symmetric encryption algorithms, why not use  them? Let&#8217;s just see an example. You have a file named &#8220;secretfile1.txt&#8221; and want to encrypt it:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ gpg <span style="color: #660033;">--symmetric</span> secretfile1.txt</pre></div></div>

<p>You will be prompted for a password. Afterwards you&#8217;ll have a file named secretfile1.txt.gpg. You are already done!  Please note: The file size of the encrypted file might have decreased as gpg also compresses during encryption and outputs a binary. In my test case the file size went down from 700k to 100k. Nice.</p>
<p><strong>Armoring</strong></p>
<p>In case you need to have an easy portable file that is even ready to be copy-pasted, you can ask gpg to create an ascii armor container:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ gpg <span style="color: #660033;">--armor</span> <span style="color: #660033;">--symmetric</span> secretfile1.txt</pre></div></div>

<p>The output file will be called &#8220;secretfile1.txt.asc&#8221;. Don&#8217;t bother to open it in a text editor of your choice. The beginning will look similar to this:</p>
<pre>$ head secretfile1.txt.asc
-----BEGIN PGP MESSAGE-----
Version: GnuPG v1.4.6 (GNU/Linux)

jA0EAwMChpQrAA/o8IFgye1j3ErZPvXumcnIwbzSvENDD/fYlWMRiY/qqvn949kV
+mo/v+nQi7OFrrA45scQPuPbj8I1T+2f7XAT4ouW2kuHIJ/2zkyrxBMvO04fDH82
273NwUrXd/s+JJXe+wJz149K324rE7+FIHvfImiez8lRs5qyRI/drp/wFK8ZHRvF
gzhDGaTe8Dgj1YqHgWAY4eAjrXhYLI1imbIYrV1OVPia6Roif37FV7C1AT/i/2HX
2ytI2mBhQLdqkSVeqXZ74lgZhsitnOeqZH65IuTLi77PUcroFOuefw6+4qSpMIuM
8dyi4jCqQ1jCR7PRorpGvm3RtXhlkB689vrknKmOa5uztTj3MGrPOgC6jegBpu/L
3419sAxRtw8bj2lP76B+XXPZ2Tuzpg01hC/BWlifSexy+juYXv7iuF5BuQ1z7nTi</pre>
<p><em>(In this case I used &#8216;head&#8221; for displaying the first ten lines. Head is similar to tail, which you might already know.) </em>Though the ascii file is larger than the binary .gpg file it is still much smaller than the original text file (about 200k in the above case). When tampering with binary files like already compressed tarballs the file size of the encrypted file might slightly increase. In my test, the size grew from a 478kB file to a 479kB file when using binary mode. In ascii armor mode the size nearly hit the 650kb mark, which is still pretty acceptable.</p>
<p><strong>Decrypting</strong></p>
<p>Decrypting is as easy. Just call &#8220;gpg &#8211;decrypt&#8221;, for instance:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ gpg <span style="color: #660033;">--decrypt</span> secretfile1.txt.gpg
<span style="color: #666666; font-style: italic;"># or</span>
$ gpg <span style="color: #660033;">--decrypt</span> secretfile1.txt.asc</pre></div></div>

<p>gpg knows by itself, if it is given an ascii armored or binary file. But nevertheless the output will be written to standard output, so the following line might be much more helpful for you:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ gpg <span style="color: #660033;">--output</span> secretfile1.txt <span style="color: #660033;">--decrypt</span> secretfile1.txt.gpg</pre></div></div>

<p>Please note, that you need to stick to the order first &#8211;output, then &#8211;decrypt. Of course you can also use a redirector (&#8220;&gt;&#8221;).</p>
<p><strong>Piping</strong></p>
<p>So, for the sake of it: The real interesting thing is that you can use gpg symmetric encryption in a chain of programs, controlled by pipes. This enables you to encrypt/decrypt on the fly with shell scripts helping you to write strong backup scripts. Gpg already detects, if your are using it in a pipe. So let&#8217;s try it out:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">tar</span> c directory <span style="color: #000000; font-weight: bold;">|</span> gpg <span style="color: #660033;">--symmetric</span> <span style="color: #660033;">--passphrase</span> secretmantra \
<span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">ssh</span> <span style="color: #c20cb9; font-weight: bold;">hostname</span> <span style="color: #ff0000;">&quot;cat &amp;gt; backup.tar.gpg&quot;</span></pre></div></div>

<p>We just made a tarbal, encrypted it and sent it over ssh without creating temporary files. Nice, isn&#8217;t it? To be honest, piping over ssh is not a big deal anymore. But piping to ftp? Check this:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$  <span style="color: #c20cb9; font-weight: bold;">tar</span> c directory <span style="color: #000000; font-weight: bold;">|</span> gpg <span style="color: #660033;">--symmetric</span> <span style="color: #660033;">--passphrase</span> SECRETMANTRA \
<span style="color: #000000; font-weight: bold;">|</span> curl <span style="color: #660033;">--netrc-optional</span> <span style="color: #660033;">--silent</span> <span style="color: #660033;">--show-error</span> <span style="color: #660033;">--upload-file</span> - \
<span style="color: #660033;">--ftp-create-dirs</span> <span style="color: #c20cb9; font-weight: bold;">ftp</span>:<span style="color: #000000; font-weight: bold;">//</span>USER:PASSWORD<span style="color: #000000; font-weight: bold;">@</span>SECRETHOST<span style="color: #000000; font-weight: bold;">/</span>SECRETFILE.tar.gpg</pre></div></div>

<p>With the mighty curl we just piped from tar over gpg directly to a file on a ftp server without any temporary files. You might get a clue of the power of this chain. Now you can start using a dumb ftp server as encrypted backup device now completely transparently.</p>
<p>That&#8217;s all for now. If you like encryption, you should also check symmetric encryption and the possibilities of enhancing daily business scripts security by adding some strong crypto to it. Of course you can complain about the security of the password, the possible visibility via &#8220;ps aux&#8221;, but you should be able to reduce risks by putting some brain in it. In the meantime check &#8220;<a href="http://www.screenage.de/blog/2008/01/28/bashup-a-first-example-for-a-simple-tree-backup-over-ssh/">bashup</a>&#8220;, the bash backup script, which uses methods described here to provide you with a powerful and scriptable backup library written in Bash with minimum depencies. And yes, gpg will be added soon.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.screenage.de/blog/2008/06/19/my-package-of-the-day-gpg-for-symmetric-encryption/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<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>
	</channel>
</rss>

