<?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>Andrew Katasonov &#187; Backup Your CVS/SVN Repository to Amazon S3 &#8211; katasonov.com</title>
	<atom:link href="http://www.katasonov.com/category/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.katasonov.com</link>
	<description>(not so) random thoughts about everything</description>
	<lastBuildDate>Mon, 24 Oct 2011 10:48:58 +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>Backup Your CVS/SVN Repository to Amazon S3</title>
		<link>http://www.katasonov.com/2010/01/backup-your-cvssvn-repository-to-amazon-s3/</link>
		<comments>http://www.katasonov.com/2010/01/backup-your-cvssvn-repository-to-amazon-s3/#comments</comments>
		<pubDate>Tue, 19 Jan 2010 18:34:45 +0000</pubDate>
		<dc:creator>Andrew</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.katasonov.com/?p=155</guid>
		<description><![CDATA[Recently I decided to implement one additional layer of protection for our CVS repository. It was only backed up to another folder on the same server, the same virtual disk (RAID 0). &#8220;Why not use Amazon S3 storage for additional protection?&#8221;,- I thought. Step 1: Compile FUSE support into the kernel and install s3fs Step [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I decided to implement one additional layer of protection for our CVS repository. It was only backed up to another folder on the same server,<br /> the same virtual disk (RAID 0). &#8220;Why not use Amazon S3 storage for additional protection?&#8221;,- I thought.</p>
<p><strong>Step 1:</strong> Compile FUSE support into the kernel and install s3fs <br /><strong>Step 2:</strong> Mount S3 bucket to a local folder on the server. To achieve this create a file /etc/passwd-s3fs and put your Access Key and Secret Access keyseparated by the colon there.<br /><strong>Step 3: </strong>Edit your fstab and put the following line there:<br /> s3fs#your_bucket_name       /mnt/s3_storage       fuse    auto            0 0</p>
<p>This script leaves only the most recent copy of the backup in the BACKUPSDIR and 7 copies (for 7 days in a row) on the remote storage. All backups on the remote storage are encrypted with your password. Don&#8217;t forget to change it (&#8211;passphrase pwd ). Enjoy!</p>
<pre class="brush: bash; title: ; notranslate">
#!/bin/bash
#
# Back up CVS
#
CVSDIR=/home/cvs
BACKUPSDIR=/home/andrew/backups
S3DIR=/mnt/s3_storage
#
# Get current date and time
set `date +&quot;%Y %m %d %H %M&quot;`

# Remove any backups older than 1 days
echo &quot;Removing backups older than 1 days...&quot;
TO_DELETE=$(find $BACKUPSDIR -atime +1 -name &quot;cvstree*&quot;)

if [ -z &quot;$TO_DELETE&quot; ]; then
    echo &quot;No backups to delete&quot;
else
    # remove them!
    rm -f $TO_DELETE
fi

#echo &quot;Backing up CVS tree...&quot;
/bin/tar -cj -C $CVSDIR --totals . &gt; $BACKUPSDIR/cvstree_$1-$2-$3.tar.bz

echo &quot;Encrypting the backup&quot;
/usr/bin/gpg -c --batch --passphrase pwd $BACKUPSDIR/cvstree_$1-$2-$3.tar.bz
echo &quot;Moving to the remote storage&quot;
/usr/bin/mv $BACKUPSDIR/cvstree_$1-$2-$3.tar.bz.gpg $S3DIR

# Remove any backups older than 7 days on the remote storage
echo &quot;Removing backups older than 7 days from the remote storage...&quot;
TO_DELETE=$(find $S3DIR -mtime +7 -name &quot;cvstree*&quot; )

if [ -z &quot;$TO_DELETE&quot; ]; then
    echo &quot;No backups to delete&quot;
else
    # remove them!
    rm -f $TO_DELETE
fi

exit 0
</pre>
<hr /><small>Copyright &copy; 2009<br /> This feed is for personal, non-commercial use only. <br /> The use of this feed on other websites breaches copyright. If this content is not in your news reader, it makes the page you are viewing an infringement of the copyright. (Digital Fingerprint:<br /> 8ba82a5365a2e5cce2dc4f75a79b3112 (38.107.179.229) )</small>]]></content:encoded>
			<wfw:commentRss>http://www.katasonov.com/2010/01/backup-your-cvssvn-repository-to-amazon-s3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Haircut Showing Support To Linux :)</title>
		<link>http://www.katasonov.com/2009/05/haircut-showing-support-to-linux/</link>
		<comments>http://www.katasonov.com/2009/05/haircut-showing-support-to-linux/#comments</comments>
		<pubDate>Tue, 19 May 2009 17:51:30 +0000</pubDate>
		<dc:creator>Andrew</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Crazy]]></category>

		<guid isPermaLink="false">http://www.katasonov.com/?p=114</guid>
		<description><![CDATA[Last week I made a special haircut to show my support to Linux and Gentoo in particular. Isn&#8217;t it beautiful? Copyright &#169; 2009 This feed is for personal, non-commercial use only. The use of this feed on other websites breaches copyright. If this content is not in your news reader, it makes the page you [...]]]></description>
			<content:encoded><![CDATA[<p>Last week I made a special haircut to show my support to Linux and Gentoo in particular. Isn&#8217;t it beautiful? <img src='http://www.katasonov.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<div id="attachment_115" class="wp-caption aligncenter" style="width: 278px"><a href="http://www.katasonov.com/wp-content/uploads/2009/05/img_1338_mod.jpg"><img class="size-medium wp-image-115" title="Haircut showing Linux support" src="http://www.katasonov.com/wp-content/uploads/2009/05/img_1338_mod-268x300.jpg" alt="Haircut showing Linux support" width="268" height="300" /></a><p class="wp-caption-text">Haircut showing Linux support - side A</p></div>
<div id="attachment_116" class="wp-caption aligncenter" style="width: 234px"><a href="http://www.katasonov.com/wp-content/uploads/2009/05/img_1339_mod.jpg"><img class="size-medium wp-image-116" title="Haircut showing Linux support - side B" src="http://www.katasonov.com/wp-content/uploads/2009/05/img_1339_mod-224x300.jpg" alt="Haircut showing Linux support - side B" width="224" height="300" /></a><p class="wp-caption-text">Haircut showing Linux support - side B</p></div>
<hr /><small>Copyright &copy; 2009<br /> This feed is for personal, non-commercial use only. <br /> The use of this feed on other websites breaches copyright. If this content is not in your news reader, it makes the page you are viewing an infringement of the copyright. (Digital Fingerprint:<br /> 8ba82a5365a2e5cce2dc4f75a79b3112 (38.107.179.229) )</small>]]></content:encoded>
			<wfw:commentRss>http://www.katasonov.com/2009/05/haircut-showing-support-to-linux/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Coremoid &#8211; Simple CPU Usage Plasmoid For KDE4</title>
		<link>http://www.katasonov.com/2009/04/simple-cpu-usage-plasmoid-for-kde4/</link>
		<comments>http://www.katasonov.com/2009/04/simple-cpu-usage-plasmoid-for-kde4/#comments</comments>
		<pubDate>Sat, 11 Apr 2009 16:05:00 +0000</pubDate>
		<dc:creator>Andrew</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.katasonov.com/?p=95</guid>
		<description><![CDATA[Update: There is a nice replacement for coremoid plasmoid in KDE 4.3.x. It shows kernel and user space usage in different colors, shows swap usage, etc. I find it more useful than coremoid. You may want to try it instead of coremoid plasmoid. I&#8217;ve been using Coremoid plasmoid since KDE 4 was available only in [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Update</strong>: <em>There is a nice replacement for coremoid plasmoid in KDE 4.3.x. It shows kernel and user space usage in different colors, shows swap usage, etc. I find it more useful than coremoid. You may want to try it instead of coremoid plasmoid.<br />
</em></p>
<p>I&#8217;ve been using Coremoid plasmoid since KDE 4 was available only in SVN and it provides everything I want. The plasmoid sits in the tray and displays processor usage on all cores (in case your processor has more than one core) plus the processor governor and frequency. It is useful to see whether your computer is doing something CPU intensive that you didn&#8217;t want it to do (for example there is a program hanging in memory and consuming your CPU).</p>
<div id="attachment_96" class="wp-caption aligncenter" style="width: 338px"><img class="size-full wp-image-96" title="The look &amp; feel of Coremoid plasmoid" src="http://www.katasonov.com/wp-content/uploads/2009/04/the_look_of_coremoid.png" alt="The look &amp; feel of Coremoid plasmoid" width="328" height="37" /><p class="wp-caption-text">The look &amp; feel of Coremoid plasmoid</p></div>
<p>It hasn&#8217;t been actively supported since last year and the sources from kde-look.org don&#8217;t compile with latest KDE 4.2.x stable. I have made few adjustments to the code to make it compile and decided to share it with you <img src='http://www.katasonov.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><a title="coremoid-0.3.1 modified by me to compile with KDE 4.2.x" href="http://www.katasonov.com/files/coremoid-0.3.1-andrew.tar.bz2" target="_self">Download coremoid-0.3.1-andrew.tar.bz2</a></p>
<hr /><small>Copyright &copy; 2009<br /> This feed is for personal, non-commercial use only. <br /> The use of this feed on other websites breaches copyright. If this content is not in your news reader, it makes the page you are viewing an infringement of the copyright. (Digital Fingerprint:<br /> 8ba82a5365a2e5cce2dc4f75a79b3112 (38.107.179.229) )</small>]]></content:encoded>
			<wfw:commentRss>http://www.katasonov.com/2009/04/simple-cpu-usage-plasmoid-for-kde4/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>&#8220;No&#8221; to genkdesvn</title>
		<link>http://www.katasonov.com/2009/03/no-to-genkdesvn/</link>
		<comments>http://www.katasonov.com/2009/03/no-to-genkdesvn/#comments</comments>
		<pubDate>Sun, 01 Mar 2009 13:43:30 +0000</pubDate>
		<dc:creator>Andrew</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.katasonov.com/?p=63</guid>
		<description><![CDATA[As many of you already know the KDE team has released a stable version of KDE 4.2. I&#8217;ve been running KDE compiled from trunk (genkdesvn) with the latest features and bugs for a half year but now I feel tired of fighting with the bugs and since I don&#8217;t report them to KDE team anyway [...]]]></description>
			<content:encoded><![CDATA[<p>As many of you already know the KDE team has released a stable version of KDE 4.2. I&#8217;ve been running KDE compiled from trunk (genkdesvn) with the latest features and bugs for a half year but now I feel tired of fighting with the bugs and since I don&#8217;t report them to KDE team anyway I decided to switch from genkdesvn to the stable 4.2. I just feel I don&#8217;t have time for this right now and I need a stable desktop.<br />
Thanks to the KDE team for their wonderful piece of software!! I wish ATI drivers for linux were stable too..</p>
<hr /><small>Copyright &copy; 2009<br /> This feed is for personal, non-commercial use only. <br /> The use of this feed on other websites breaches copyright. If this content is not in your news reader, it makes the page you are viewing an infringement of the copyright. (Digital Fingerprint:<br /> 8ba82a5365a2e5cce2dc4f75a79b3112 (38.107.179.229) )</small>]]></content:encoded>
			<wfw:commentRss>http://www.katasonov.com/2009/03/no-to-genkdesvn/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Caveats About Restoring Linux Root Partition From TAR Archive</title>
		<link>http://www.katasonov.com/2009/01/caveats-about-restoring-linux-root-partition-from-tar-archive/</link>
		<comments>http://www.katasonov.com/2009/01/caveats-about-restoring-linux-root-partition-from-tar-archive/#comments</comments>
		<pubDate>Sat, 31 Jan 2009 14:40:53 +0000</pubDate>
		<dc:creator>Andrew</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.katasonov.com/?p=51</guid>
		<description><![CDATA[Recently I had to create a new partition on my laptop&#8217;s hdd to install OS X (I wanted to have a dual boot of Gentoo and OS X). I had no free space on the disk so the only way to create a new partition was to shrink the existing root partition with Gentoo. Since [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I had to create a new partition on my laptop&#8217;s hdd to install OS X (I wanted to have a dual boot of Gentoo and OS X). I had no free space on the disk so the only way to create a new partition was to shrink the existing root partition with Gentoo. Since it was formatted as JFS and JFS doesn&#8217;t allow shrinking I had to back up all the data on the root partition, delete it, create a new (smaller) one and format it as JFS. So the steps were:</p>
<ol>
<li>Create a backup of the root partition with <code>tar -cvpjf --sparse --one-file-system backup_of_root.tar.bz2 / </code><strong><br />
Note</strong>: only the contents of the root partition will be archived since &#8211;one-file-system option is specified (no dev, proc, &#8230;) <strong>WARNING</strong>! If your filesystem is mounted with extended attributes support (see /etc/fstab) and you use programs utilizing this feature (such as SELinux) <strong>you shouldn&#8217;t use tar</strong> since it won&#8217;t store any extended attributes. Use sta, pax or cpio</li>
<li>Boot with a live CD and delete the partition as well as create a new one with fdisk</li>
<li><code>jfs_mkfs /dev/sdaN</code> (where N is the partition number)</li>
<li>Extract the backup with <code>tar -xvpjf  backup_of_root.tar.bz2</code></li>
<li>Reboot and &#8230; a kernel panic <img src='http://www.katasonov.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />   On my system it was &#8220;Kernel panic &#8211; not syncing: Attempted to kill init!&#8221;</li>
</ol>
<p>After a week of kernel debugging, initrd debugging and browsing of forums I have finally found out that init script is missing character files in /dev filesystem: /dev/console and /dev/null. Without these two your Gentoo installation (and some other distributions as well) just won&#8217;t boot without telling you why!</p>
<p>So all you need to do to make your restored system boot again are two commands:<br />
<code>mknod /dev/null c 3 1<br />
mknod /dev/console c 5 1</code></p>
<p>Happy fixing! <img src='http://www.katasonov.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<hr /><small>Copyright &copy; 2009<br /> This feed is for personal, non-commercial use only. <br /> The use of this feed on other websites breaches copyright. If this content is not in your news reader, it makes the page you are viewing an infringement of the copyright. (Digital Fingerprint:<br /> 8ba82a5365a2e5cce2dc4f75a79b3112 (38.107.179.229) )</small>]]></content:encoded>
			<wfw:commentRss>http://www.katasonov.com/2009/01/caveats-about-restoring-linux-root-partition-from-tar-archive/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>JFS &#8211; My Choice as FS for Gentoo Root Partition</title>
		<link>http://www.katasonov.com/2009/01/jfs-my-choice-as-fs-for-gentoo-root-partition/</link>
		<comments>http://www.katasonov.com/2009/01/jfs-my-choice-as-fs-for-gentoo-root-partition/#comments</comments>
		<pubDate>Sun, 11 Jan 2009 17:50:51 +0000</pubDate>
		<dc:creator>Andrew</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.katasonov.com/?p=35</guid>
		<description><![CDATA[I would like to share my experience with JFS &#8211; Journaling File System developer by IBM. While searching for a fast and robust file system for the root partition of my Gentoo installation I noticed that most pick either ext3 or ReiserFS. Both are good FS and I have dealed with both of them. However [...]]]></description>
			<content:encoded><![CDATA[<p>I would like to share my experience with JFS &#8211; Journaling File System developer by IBM. While searching for a fast and robust file system for the root partition of my Gentoo installation I noticed that most pick either ext3 or ReiserFS. Both are good FS and I have dealed with both of them. However I wanted something other than that &#8211; ReiserFS behaves very good when there are many rather small files on the partition but becomes significantly slower over the time and is not very stable in case of power downs. Moreover as Hans Reiser, the main developer behind ReiserFS, was found guilty of first degree murder in court the development of this FS is under big question. For the reasons stated above I would use ReiserFS for a partition holding web proxy cache &#8211; but not for root partition. Ext3 is rather robust too and is selected as default FS in many Linux distribution. However it becomes <strong>really</strong> slow with many small files located in one directory &#8211; &#8216;ls&#8217; command takes few seconds to complete and God bless you if you run fsck on a large (1 TB) partition since it takes <strong>hours</strong> to complete.</p>
<p>So I decided to go with JFS though it seemed not many use it. I&#8217;ve been using it for 6+ months and so far I haven&#8217;t got any problem. On a 100Gb partition fsck takes 10-15 minutes to run. In terms of performance &#8211; it seems to be faster than Ext3, especially with Deadline IO scheduler (vs. CFQ selected by default). Very low CPU consumption is also a big plus (vs. Reiser that will eat up to 30% of your CPU on heavy file operations). Deleting of big files (&gt; 1Gb) takes fractions of a second.</p>
<p>I think JFS is much undervalued in the Linux world. The only drawback that I could find is that it seems to be impossible to shrink JFS partition under Linux. However enlarging the filesystem is really easy &#8211; all the code is built into the kernel so to enlarge your existing JFS partition (after you&#8217;ve enlarged the underlaying partition) you only need to remount it with the &#8216;resize&#8217; option:</p>
<p><code>#mount -o remount,resize /home</code></p>
<p>As easy as this! So far JFS is the filesystem of my choice <img src='http://www.katasonov.com/wp-includes/images/smilies/icon_cool.gif' alt='8-)' class='wp-smiley' /> </p>
<p>You can see more info about JFS <a title="more about JFS" href="http://wiki.archlinux.org/index.php/JFS" target="_blank">here</a></p>
<hr /><small>Copyright &copy; 2009<br /> This feed is for personal, non-commercial use only. <br /> The use of this feed on other websites breaches copyright. If this content is not in your news reader, it makes the page you are viewing an infringement of the copyright. (Digital Fingerprint:<br /> 8ba82a5365a2e5cce2dc4f75a79b3112 (38.107.179.229) )</small>]]></content:encoded>
			<wfw:commentRss>http://www.katasonov.com/2009/01/jfs-my-choice-as-fs-for-gentoo-root-partition/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

