<?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>Nithin Kamath&#039;s Weblog &#187; DIY</title>
	<atom:link href="http://nithinkamath.info/archives/category/diy/feed/" rel="self" type="application/rss+xml" />
	<link>http://nithinkamath.info</link>
	<description>Experiences and Adventures of a techie</description>
	<lastBuildDate>Sun, 29 Aug 2010 15:45:40 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Scheduling automatic backups in Linux</title>
		<link>http://nithinkamath.info/archives/2010/08/scheduling-automatic-backups-in-linux/</link>
		<comments>http://nithinkamath.info/archives/2010/08/scheduling-automatic-backups-in-linux/#comments</comments>
		<pubDate>Sun, 29 Aug 2010 15:30:35 +0000</pubDate>
		<dc:creator>Nithin</dc:creator>
				<category><![CDATA[DIY]]></category>
		<category><![CDATA[GNU/Linux]]></category>

		<guid isPermaLink="false">http://nithinkamath.info/?p=751</guid>
		<description><![CDATA[Imagine yourself waking up one fine morning with a crashed hard disk. How would you feel, all your precious documents, photos and videos all lost in one shot without any warning. That&#8217;s where data backups come into the picture and with data growing like never before it is vital not just for enterprises but also [...]]]></description>
			<content:encoded><![CDATA[<p><p>Imagine yourself waking up one fine morning with a crashed hard disk. How would you feel, all your precious documents, photos and videos all lost in one shot without any warning. That&#8217;s where data backups come into the picture and with data growing like never before it is vital not just for enterprises but also for the normal users. </p>
<p>First I will be mentioning the applications I am using to scheduling the auto backup, then I will be mentioning my backup methods. </p>
<p>For the auto backup I am using Cron and RSync. The choice of the applications is a personal one, I choose RSync for making the actual backup because it is a excellent file copying application which finds files that need to be transferred using  a  &#8220;quick  check&#8221; algorithm  which looks for files that have changed in size or in  last-modified time.</p>
<div style="border-bottom: silver 1px solid; font-weight: bold; border-top: #2282bc 2px solid ">The steps to schedule auto-backups are as follow:</div>
<div style="border-bottom:#2282bc 1px dashed;"> 1. Run the following command:<br />
<code>$ crontab -e</code></div>
<div style="border-bottom:#2282bc 1px dashed;"> 2. Then enter the following line:<br />
<code>05 22 * * 0 rsync -av --delete --progress -exclude=**/*cache*/ --exclude=**/*Cache*/ ~/.thunderbird/ ~/Dropbox/backup/thunderbird/</code><br />
Explanation:<br />
The structure is : <code>[minute] [hour] [day] [month] [day of Week] [command]</code><br />
where, all the parameters are numbers except the [command]. Hence in the above example cron is scheduled to run rsync at 10:05pm every Sunday (0=Sunday, 1=Monday,&#8230;).<br />
Rsync has it own parameters, one can check what each parameter means by giving &#8216;man rsync&#8217;. Basically in the above, it will backup all the contents of the .thunderbird folder in the logged in user&#8217;s home directory to the the directory &#8216;Dropbox/backup/thunderbird&#8217; in the logged in user&#8217;s home. While taking the backup it will exclude the cache and Cache folders and delete any files which was present in the earlier backup but not present in the current backup.</div>
<div style="border-bottom:#2282bc 1px dashed;"> 3. Exit the editor, if you are in Nano, Press [ctrl]+X to write the file and exit. That&#8217;s it. The schedule had been created and the backups will take place. </div>
<p>&nbsp;<br />
Ideally the backups should go to a separate external backup source, but as I am yet to buy an external HDD, I am saving it to the same HDD. This is where the cloud services come into the picture, I will be using Dropbox and Ubuntu One to ensure that I have at least one copy some place other than my HDD. Even in the above example if you notice I have copied the files into the Dropbox folder from where it will be automatically picked up by the Dropbox client and uploaded to the Dropbox servers. This will ensure that the files are accessible from anywhere.</p>
<p>Now that the backup method is in place the next step is identification of the files which require backup. For me that would be:<br />
1. Documents : All of these are present in one main folder, so this makes backup very easy.<br />
2. Mails and profiles : Having used Thunderbird since early 2005 it has lots of mails so this has to be backed up. Other than the Thunderbird mails, I am looking at backing up the Firefox profile, the Liferea profile and the Pidgin profile folder.<br />
3. Photos and Videos: 25 GB of photos in the past three years.</p>
<p>The first two are easily taken care by Dropbox and Ubuntu One. Only thing to note here is that don&#8217;t directly sync your profile folders of Thunderbird or for that matter any application as it will result in a strange situation where at the time profile is getting updated the cloud application also tried to upload. Ultimately give a sluggish performance. So to avoid this always move it to a separate folder. For the photos and video, there is no free cloud service which will provide me 25GB so for the moment only the important ones will go to the cloud servers, rest will be move to the external HDD which I will soon be buying. </p>
<p>There are still a few other things which need backup like my blog which I am still looking at.</p>
<p>This was my backup plan, please comment and let me know about any better options if you know about or if you do it differently.</p>
<p>For reference reason I am putting the whole contents of the crontab below:<br />
<code>05 22 * * 0 rsync -av --delete --progress -exclude=**/*cache*/ --exclude=**/*Cache*/ ~/.thunderbird/ ~/Dropbox/backup/thunderbird/<br />
07 22 * * 0 rsync -av --delete --progress -exclude=**/*cache*/ --exclude=**/*Cache*/ ~/.mozilla/ ~/Dropbox/backup/firefox/<br />
30 23 * * 6 rsync -av --delete --progress -exclude=**/*cache*/ --exclude=**/*Cache*/ ~/.liferea_1.6/ ~/Dropbox/backup/liferea/<br />
05 22 * * 6 rsync -av --delete --progress -exclude=**/*cache*/ --exclude=**/*Cache*/ ~/.purple/ ~/Dropbox/backup/pidgin/</code></p>
</p>]]></content:encoded>
			<wfw:commentRss>http://nithinkamath.info/archives/2010/08/scheduling-automatic-backups-in-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>DIY &#8211; Backup light using UPS</title>
		<link>http://nithinkamath.info/archives/2009/04/diy-backup-light-using-ups/</link>
		<comments>http://nithinkamath.info/archives/2009/04/diy-backup-light-using-ups/#comments</comments>
		<pubDate>Thu, 23 Apr 2009 18:10:41 +0000</pubDate>
		<dc:creator>Nithin</dc:creator>
				<category><![CDATA[DIY]]></category>
		<category><![CDATA[Featured]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[UPS]]></category>

		<guid isPermaLink="false">http://nithinkamath.info/?p=514</guid>
		<description><![CDATA[Electricity, Who can live with out it? During day time it would be possible by going out, reading a book or cleaning the room etc. But at night time it is extremely boring since none of the above can be done.
A couple of months back I hit upon a idea of pulling a wire from [...]]]></description>
			<content:encoded><![CDATA[<p><p>Electricity, Who can live with out it? During day time it would be possible by going out, reading a book or cleaning the room etc. But at night time it is extremely boring since none of the above can be done.</p>
<p>A couple of months back I hit upon a idea of pulling a wire from the APC UPS used for my desktop computer and using it to light a bulb. After thinking over hard I felt now is the right time to do this and do it by myself as a Do It Yourself (DIY) task.</p>
<p>The timing was essential as elections have just got over. Wondering what has elections got to do with power supply? You are probably not from India then, the politicians try every trick in the book to keep the the voters happy and ensuring uninterrupted power supply during election time is one of them. Once the elections are over then the situation returns to normal, ok&#8230;ok&#8230;now back to the main topic <img src='http://nithinkamath.info/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p><strong>Items required:</strong><br />
1. UPS<br />
2. Wire<br />
3. Bulb holder<br />
4. Bed lamp switch<br />
5. Computer AC socket adaptor<br />
6. Two pin plug<br />
7. Bulb</p>
<p><strong>Steps:</strong><br />
1. Take one end of the wire and attach the two pin plug to it.<br />
2. Take the other end and attach the bulb holder to it.<br />
3. Starting from two pin plug point end measure and cut the wire around the four/five feet height and attach the bed lamp switch.<br />
4. Attach the computer AC socket adaptor to the UPS.<br />
5. Now attach the two pin point to the computer AC socket adaptor.<br />
6. Attach a bulb to the bulb holder.<br />
7. Turn the bed lamp switch to ON state.<br />
6. Enjoy <img src='http://nithinkamath.info/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p><strong>Points to note:</strong><br />
1. The length of the wire would depend on your requirement, I bought around 7 meters at the rate of Rs.4/meter.<br />
2. The bulb holder, bed lamp switch and the two pin plug are all available cheaply, I paid Rs.10, Rs.10 and Rs.6 respectively.<br />
3. The computer AC socket adaptor was the most difficult item to get, I had to search a lot of shops to find this, in the end I had to pay for it at MRP without bargaining. If the shopkeeper where you are trying to buy this is ignorant of the adaptor let him know ofthe use then he may be able to help you out. It cost me Rs.80/-<br />
4. Instead of the incadesant bulb it is better to use a CFL unit, though the initial investment is on the higher side, the advantages it provides is huge. The power consumption is low, the light is good enough to read a book.<br />
5. Always be careful when doing any activity which involves electricity be very careful.</p>
<p><strong>Results:</strong><br />
For an investment of just around Rs.200 I was able to complete the setup. Though I was unable to do a complete run till the UPS ran dry, I was still able to test it for one continuous hour thanks to the electricity board which turned off the power the moment I completed my set-up. So I was able to get good light using the 18W CFL and it ran for one hour and the UPS still had some juice left. So not sure how long it could run, will do a benchmark run some other day. Overall 100%  worth for the amount spent and I am happy with the set-up.</p>
<p>Ps. I was complaining to my friend today when I bought the adapter that as usual now that I have bought this the power would not go similar to the day when you take the umbrella it doesn&#8217;t rain. But the power board proved me wrong and cut power for full one hour!! Look who is listening to the consumers and taking consumer satisfaction to a whole new level <img src='http://nithinkamath.info/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p><strong>Images</strong>:<br />
<center><br />
<div id="attachment_515" class="wp-caption aligncenter" style="width: 420px"><img src="http://nithinkamath.info/wp-content/uploads/2009/04/diy_in_action_01.jpg" alt="DIY in Action" title="DIY in Action" width="410" height="320" class="size-full wp-image-515" /><p class="wp-caption-text">DIY in Action</p></div></p>
<p><div id="attachment_516" class="wp-caption aligncenter" style="width: 420px"><img src="http://nithinkamath.info/wp-content/uploads/2009/04/diy_in_action_02.jpg" alt="DIY in Action" title="DIY in Action" width="410" height="310" class="size-full wp-image-516" /><p class="wp-caption-text">DIY in Action</p></div><br />
Messy set-up at the moment <img src='http://nithinkamath.info/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /><br />
</center></p>
</p>]]></content:encoded>
			<wfw:commentRss>http://nithinkamath.info/archives/2009/04/diy-backup-light-using-ups/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
	</channel>
</rss>
