<?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>tolaris.com &#187; facepalm</title>
	<atom:link href="http://www.tolaris.com/tag/facepalm/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.tolaris.com</link>
	<description>When the going gets tough, the tough sniff packets.</description>
	<lastBuildDate>Tue, 24 Jan 2012 17:47:01 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>It has been *0* days since the last &#8216;rm -rf *&#8217;</title>
		<link>http://www.tolaris.com/2009/02/06/it-has-been-0-days-since-the-last-rm-rf/</link>
		<comments>http://www.tolaris.com/2009/02/06/it-has-been-0-days-since-the-last-rm-rf/#comments</comments>
		<pubDate>Fri, 06 Feb 2009 16:52:47 +0000</pubDate>
		<dc:creator>Tyler Wagner</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[bacula]]></category>
		<category><![CDATA[facepalm]]></category>

		<guid isPermaLink="false">http://www.tolaris.com/?p=214</guid>
		<description><![CDATA[Sometimes running Bacula is a real pain. It&#8217;s too much infrastructure for someone who doesn&#8217;t use tape backups (we just use a big RAID store). But today it saved me. It all began when I accidentally copied /home/tyler/bin on my laptop to another workstation&#8217;s /bin. I have a lot of little scripts and doodads for [...]]]></description>
			<content:encoded><![CDATA[<p>Sometimes running <a href="http://www.bacula.org">Bacula</a> is a real pain.  It&#8217;s too much infrastructure for someone who doesn&#8217;t use tape backups (we just use a big RAID store).  But today it saved me.</p>
<p>It all began when I accidentally copied /home/tyler/bin on my laptop to another workstation&#8217;s /bin.  I have a lot of little scripts and doodads for my personal use in /home/tyler/bin, but none of them are named for real executables in /bin.  So I think, &#8220;No big deal, just manually remove those scripts from /bin and no harm done.&#8221;</p>
<p><span id="more-214"></span>So I quickly listed the programs in bin, copied and pasted them into the other terminal with &#8216;rm&#8217;, and let fly.</p>
<p>Wait, was that /bin or /home/tyler/bin I just listed?  Oh shit.</p>
<pre>root@boned-workstation:/bin#
ls
bash: ls: command not found</pre>
<p>When you&#8217;ve just deleted /bin, you&#8217;re screwed.  You can&#8217;t do anything.  Quickly rsync replacements over?  Nope.  How about a tarball?  Nope.  In fact you probably cannot even login, so don&#8217;t logout of the SSH session you&#8217;ve still got open. Booting from a Live CD/USB/DVD is about your only hope.</p>
<p>And then I remembered Bacula.  The Bacula file daemon needs only itself to do its job, and it doesn&#8217;t even need that once the daemon is running.  You could delete /usr/sbin/bacula-fd and it will still work unless you stop the daemon.</p>
<p>We don&#8217;t back up system files on workstations, just user files and the dpkg database.  But Ubuntu workstations and servers run the same software.  So I restored the previous night&#8217;s backup of /bin/ from the backup server itself to the affected workstation.  Bacula&#8217;s restore process is quite flexible, and is happy to let you restore from any archive to any host it knows.</p>
<p>A quick rsync from a similar workstation to make sure all the binaries are there, and we&#8217;re saved!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tolaris.com/2009/02/06/it-has-been-0-days-since-the-last-rm-rf/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

