<?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>fugaz &#187; bash</title>
	<atom:link href="http://www.fugaz.net/tag/bash/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.fugaz.net</link>
	<description>stateless version</description>
	<lastBuildDate>Thu, 02 Feb 2012 13:44:00 +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>Remote encrypted backup using gpg and rsync</title>
		<link>http://www.fugaz.net/2009/10/29/remote-encrypted-backup-using-gpg-and-rsync/</link>
		<comments>http://www.fugaz.net/2009/10/29/remote-encrypted-backup-using-gpg-and-rsync/#comments</comments>
		<pubDate>Thu, 29 Oct 2009 20:38:55 +0000</pubDate>
		<dc:creator><span property="dc:creator" resource="http://www.fugaz.net/2009/10/29/remote-encrypted-backup-using-gpg-and-rsync/">fugaz</span></dc:creator>
				<category><![CDATA[Utilities]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[gpg]]></category>
		<category><![CDATA[rsync]]></category>

		<guid isPermaLink="false">http://www.fugaz.net/?p=149</guid>
		<description><![CDATA[Bare bones script to encrypt and copy all .pdf, .xls and .csv files in current directory to a remote server using rsync (I recommend rsync.net) #! /bin/bash R_USER="&#60;your_user&#62;" R_HOST="&#60;your_host&#62;" BASENAME=`basename "$PWD"` echo "Your destination:" read GPG_DEST find . -iname '*[pdf&#124;xls&#124;csv]' -exec echo '{}' \; &#124; while read f do if [ ! -f "$f".gpg ]; [...]]]></description>
			<content:encoded><![CDATA[<p>Bare bones script to encrypt and copy all .pdf, .xls and .csv files in current directory to a remote server using rsync (I recommend <a href="http://rsync.net">rsync.net</a>)</p>
<pre>#! /bin/bash
R_USER="&lt;your_user&gt;"
R_HOST="&lt;your_host&gt;"
BASENAME=`basename "$PWD"`

echo "Your destination:"

read GPG_DEST

find . -iname '*[pdf|xls|csv]' -exec echo '{}' \; | while read f
do
    if [ ! -f "$f".gpg ]; then
        gpg -e -r $GPG_DEST "$f"
    fi
done

rsync -r --exclude=*.pdf --exclude=*.xls --exclude=*.csv --include=*.pdf.gpg . "$R_USER@$R_HOST:Documents/$BASENAME"</pre>
<div><span style="font-family: Consolas, Monaco, 'Courier New', Courier, monospace; font-size: small;"><span style="line-height: 18px; white-space: pre;"><br />
</span></span></div>
]]></content:encoded>
			<wfw:commentRss>http://www.fugaz.net/2009/10/29/remote-encrypted-backup-using-gpg-and-rsync/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

