<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom"><title>Michael Jay Lissner</title><link href="https://michaeljaylissner.com/" rel="alternate"></link><link href="https://michaeljaylissner.com/feeds/tag/archive" rel="self"></link><id>https://michaeljaylissner.com/</id><updated>2008-12-19T21:35:28-08:00</updated><entry><title>Cheney is so shady, it pisses me off.</title><link href="https://michaeljaylissner.com/posts/2008/12/19/cheney-is-so-fing-shady-it-pisses-me-off/" rel="alternate"></link><updated>2008-12-19T21:35:28-08:00</updated><author><name>Mike Lissner</name></author><id>tag:michaeljaylissner.com,2008-12-19:posts/2008/12/19/cheney-is-so-fing-shady-it-pisses-me-off/</id><summary type="html">&lt;p&gt;Cheney is &lt;a href="http://www.google.com/hostednews/ap/article/ALeqM5jz2z92QFdgFrIMAJC-4GQcHOm3MgD955ETCO0"&gt;at work&lt;/a&gt; to keep his records from becoming public as part of 
the National Archives when he goes out of&amp;nbsp;office. &lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;The vice president alone may determine what constitutes vice presidential
 records or personal records, how his records will be created, maintained, 
 managed and disposed, and are all actions that are committed to his 
 discretion by&amp;nbsp;law.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I can think of no reason why this would be necessary unless he&amp;#8217;s the shadiest 
person ever in office. Oh,&amp;nbsp;right.&lt;/p&gt;
&lt;p&gt;As an ex-government worker, I can testify to how ridiculous this is: It&amp;#8217;s 
really fucking&amp;nbsp;ridiculous.&lt;/p&gt;</summary><category term="rant"></category><category term="archive"></category><category term="cheney"></category><category term="government"></category></entry><entry><title>Rsnapshot Backup Solution OR Why Backing Up Is Hard To Do</title><link href="https://michaeljaylissner.com/posts/2008/12/09/rsnapshot-backup-solution-or-why-backing-up-is-hard-to-do/" rel="alternate"></link><updated>2008-12-09T22:06:48-08:00</updated><author><name>Mike Lissner</name></author><id>tag:michaeljaylissner.com,2008-12-09:posts/2008/12/09/rsnapshot-backup-solution-or-why-backing-up-is-hard-to-do/</id><summary type="html">&lt;p&gt;I&amp;#8217;ve been working on getting this post figured out for about five months. In this post, I am going to try to explain exactly how my backup works, and why. It&amp;#8217;s ridiculously complicated at times, but the detail is necessary on paper in some form or&amp;nbsp;other.&lt;/p&gt;
&lt;p&gt;For my backup system, I rely heavily on &lt;a href="http://rsnapshot.org"&gt;rsnapshot&lt;/a&gt;, which is a tool that uses rsync and some perl scripting to create snapshots of directories. Rsync is a pretty awesome tool. It functions like a simple copy/paste, except that it will check the destination directory of the paste and will only copy the necessary rsnapshot. As such, it can be interrupted in the middle of a copy, and will be able to continue later where it left off. Perl is a scripting language that has been used with rsync to give it some extra&amp;nbsp;power.&lt;/p&gt;
&lt;p&gt;This power is the ability to perform incremental backups, which is to say that if I have &lt;span class="caps"&gt;5GB&lt;/span&gt; of data that I backup 10 days in a row, it will only take up about &lt;span class="caps"&gt;5GB&lt;/span&gt; of data, total. However, if I have &lt;span class="caps"&gt;5GB&lt;/span&gt; of data today, an additional &lt;span class="caps"&gt;5GB&lt;/span&gt; tomorrow, and another &lt;span class="caps"&gt;5GB&lt;/span&gt; the day after, which I backup each day for ten days, it will only require a total of &lt;span class="caps"&gt;5GB&lt;/span&gt; of space the first day, &lt;span class="caps"&gt;10GB&lt;/span&gt; the second day, &lt;span class="caps"&gt;15GB&lt;/span&gt; the third day, and no more space after that for the remaining 7&amp;nbsp;days.&lt;/p&gt;
&lt;p&gt;This is important if you want to backup your data on a regular basis. Since I run a server, I have several things that I must backup. I back these up on a daily, weekly, and monthly basis. The list&amp;nbsp;includes:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;My laptop is backed up wirelessly to the server&amp;#8217;s hard&amp;nbsp;drive&lt;/li&gt;
&lt;li&gt;The email server gets copied to an external &lt;span class="caps"&gt;USB&lt;/span&gt; drive (this includes all the Zimbra configuration rsnapshot as well as thousands of&amp;nbsp;emails)&lt;/li&gt;
&lt;li&gt;The web server gets backed up to the &lt;span class="caps"&gt;USB&lt;/span&gt; drive (this includes the Drupal installation and the MySQL&amp;nbsp;database)&lt;/li&gt;
&lt;li&gt;Lots of configuration rsnapshot for the servers go to the &lt;span class="caps"&gt;USB&lt;/span&gt; drive (i.e. the /etc/&amp;nbsp;directory)&lt;/li&gt;
&lt;li&gt;And finally, the backup configuration itself goes to the &lt;span class="caps"&gt;USB&lt;/span&gt;&amp;nbsp;drive&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Each of these backups presents some challenging difficulties. For the web server, it is challenging because it is backing up MySQL, Zimbra and Drupal. In order to do this, I have to coordinate the MySQL database dump so that when the Drupal backup is triggered, it will copy the MySQL information over to the &lt;span class="caps"&gt;USB&lt;/span&gt; drive along with the normal Drupal information. For Zimbra, the email server has to be stopped, backed up, and then started again, which means control of the email server has to be carefully&amp;nbsp;scripted.&lt;/p&gt;
&lt;p&gt;The laptop presents a challenge because it is the only thing that is backed up wirelessly, and in order to do so, the server must authenticate itself to the laptop before it is allowed to log in and make the copies. If that wasn&amp;#8217;t complicated enough, in addition, the laptop needs to be set up with a static &lt;span class="caps"&gt;IP&lt;/span&gt; address so that the server can find it to perform the backup. Finally, the laptop needs to be &lt;span class="caps"&gt;ON&lt;/span&gt;, and connected to the network when the server attempts the&amp;nbsp;backup. &lt;/p&gt;
&lt;p&gt;Once all of that is figured out logically, you have to authenticate the laptop to the server, create the scripts, backup configurations and cron rsnapshot. I have attached some of these configuration rsnapshot to this post, provided they don&amp;#8217;t reveal too much of my network&amp;nbsp;topology.&lt;/p&gt;
&lt;p&gt;One final challenge that had to be overcome was connecting the &lt;span class="caps"&gt;USB&lt;/span&gt; drive to the server in such a way that it would always be mounted in the same location. In addition, I learned that &lt;span class="caps"&gt;FAT32&lt;/span&gt; doesn&amp;#8217;t support file system links, and so I had to format the &lt;span class="caps"&gt;USB&lt;/span&gt; drive as&amp;nbsp;ext3.&lt;/p&gt;
&lt;p&gt;As of today, it&amp;#8217;s about five months since I began this project, and I believe I can say that the backup happens flawlessly on a daily, weekly and monthly basis. There are a few things I&amp;#8217;d like to change&amp;nbsp;however:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;del&gt;I&amp;#8217;d like to get an email notification when a backup fails&lt;/del&gt; &amp;mdash; Done - See comment&amp;nbsp;below.&lt;/li&gt;
&lt;li&gt;&lt;del&gt;I&amp;#8217;d like to begin backing up /etc/ on my laptop&lt;/del&gt; &amp;mdash;&amp;nbsp;Done&lt;/li&gt;
&lt;li&gt;&lt;del&gt;At one point, I was backing up a list of all the installed software on my system - it&amp;#8217;d be nice to have that again&lt;/del&gt; &amp;mdash; Done - I wrote a python script to do&amp;nbsp;so&lt;/li&gt;
&lt;li&gt;&lt;del&gt;The backup is unencrypted, so anybody can take the &lt;span class="caps"&gt;USB&lt;/span&gt; drive and have a heck of a lot of emails. Gotta fix that.&lt;/del&gt; &amp;mdash; See the note below in the comments for&amp;nbsp;details.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Files of&amp;nbsp;Interest&lt;/strong&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href="https://michaeljaylissner.com/archive/rsnapshot/rsnapshotOpal.conf"&gt;rsnapshot configuration for my&amp;nbsp;laptop&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://michaeljaylissner.com/archive/rsnapshot/rsnapshotDrupal.conf"&gt;rsnapshot configuration for the Drupal&amp;nbsp;server&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://michaeljaylissner.com/archive/rsnapshot/rsnapshotEtcHome.conf"&gt;rsnapshot configuration for the backup configuration rsnapshot and the 
&lt;code&gt;/etc&lt;/code&gt; directory&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://michaeljaylissner.com/archive/rsnapshot/rsnapshotZimbra.conf"&gt;rsnapshot configuration for the Zimbra&amp;nbsp;server&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Scripts to &lt;a href="https://michaeljaylissner.com/archive/rsnapshot/ZimbraStop"&gt;stop&lt;/a&gt; and &lt;a href="https://michaeljaylissner.com/archive/rsnapshot/ZimbraStart"&gt;start&lt;/a&gt;&amp;nbsp;Zimbra&lt;/li&gt;
&lt;li&gt;My &lt;a href="https://michaeljaylissner.com/archive/rsnapshot/cronlist.txt"&gt;cron&amp;nbsp;file&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;All in all, this just goes to show that backing up is a very difficult thing to do properly and automatically. It&amp;#8217;s one thing if you have a desktop that backs up to a &lt;span class="caps"&gt;USB&lt;/span&gt; drive. It&amp;#8217;s another if you have a server and a laptop. Had I known how long this would take going into it, I&amp;#8217;m not sure I would have figured it all out. How the average computer user is supposed to figure this out is beyond&amp;nbsp;me.&lt;/p&gt;</summary><category term="rsnapshot"></category><category term="archive"></category><category term="backup"></category><category term="project"></category></entry></feed>