<?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>Ubuntu Linux Help &#187; backup</title> <atom:link href="http://ubuntulinuxhelp.com/tag/backup/feed/" rel="self" type="application/rss+xml" /><link>http://ubuntulinuxhelp.com</link> <description>Tips, Tricks and How To&#039;s for the Ubuntu Linux User</description> <lastBuildDate>Thu, 19 Jan 2012 13:15:19 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=</generator> <item><title>Sharing the Same Files Between Two PC&#8217;s</title><link>http://ubuntulinuxhelp.com/sharing-the-same-files-between-two-pcs/</link> <comments>http://ubuntulinuxhelp.com/sharing-the-same-files-between-two-pcs/#comments</comments> <pubDate>Mon, 30 Nov 2009 17:16:45 +0000</pubDate> <dc:creator>Roger Wheatley</dc:creator> <category><![CDATA[How To]]></category> <category><![CDATA[backup]]></category> <category><![CDATA[nas]]></category> <category><![CDATA[network]]></category> <category><![CDATA[samba]]></category> <category><![CDATA[share]]></category> <category><![CDATA[smb]]></category> <category><![CDATA[smbfs]]></category><guid
isPermaLink="false">http://ubuntulinuxhelp.com/?p=1762</guid> <description><![CDATA[Here&#8217;s the scenario: Box #1: Ubuntu Linux 8.04LTS Box #2: Windows XP SP3 Box #3: Remote storage (NAS) DLink DNS-321 Linux and Windows both need read and write access to the remote files stored on the DNS-321 backup unit. This way there is only one set of files and directories to manage, that both computers [...]]]></description> <content:encoded><![CDATA[<p>Here&#8217;s the scenario:</p><p>Box #1: <strong>Ubuntu</strong> Linux 8.04LTS<br
/> Box #2: <strong>Windows</strong> XP SP3<br
/> Box #3: Remote storage (<strong>NAS</strong>) DLink DNS-321</p><p>Linux and Windows both need <strong>read and write access to the remote files</strong> stored on the DNS-321 backup unit. This way there is only one set of files and directories to manage, that both computers will share. In other words the data stored on the backup unit (NAS) is common to both computers on the network.</p><p>Some time ago, I wrote a post on another blog, <a
href="http://bloggersavvy.com/saving-your-data-when-disaster-strikes/" title="Saving Your Data When Disaster Strikes"  target="_blank">Saving Your Data When Disaster Strikes</a>, that dealt with the issues of losing data because there were no backups. In that post I mentioned:</p><p><span
style="color: #3366ff;">&#8220;&#8230;I also opted to install a proactive solution and purchased a D-Link DNS-321 network storage unit, to which I added two more hard drives again, and had one mirroring all it’s contents to the other. In the event when one of those drives fails &#8211; and eventually they will, the second drive in that unit will be a duplicate of the failed drive&#8230;&#8221;</span></p><p>At that time the solution was great! The only <strong>drawback (in the way I approached it) was having to synchronize files across all computers</strong> (over the network) and then backup a copy of those files to the remote storage. I played around with quite a few tools, but ended up just using plain old FTP, to send files back and forth. Needless to say, this resulted in <strong>unproductive use of my time</strong>.</p><p>I don&#8217;t really know what took me so long, but it finally dawned on me (what was I thinking before!?) that a better use would be to<strong> have all common files on the remote server</strong> (that&#8217;s the DNS-321 unit). It&#8217;s a much more efficient to operate, (saves wasting time with synchronization)  using it as a fileserver / backup unit. I should point out, that while my solution does revolve around that Dlink unit (because that&#8217;s what I bought), this <strong>solution can use any type of network storage uni</strong>t (NAS) or networked server. I should also mention, the NAS has two hard drives in it. I configured those drives to operate as RAID 1. This means that <strong>one hard drive will mirror the other one</strong>. If one hard drive fails, the data can be rebuilt by using the mirror image of the other one.</p><p>First, it&#8217;s important to ensure the NAS is configured to your needs. This means <strong>enabling SMB</strong>. Why SMB (Samba) and not NSF? Remember, there&#8217;s a Windows box on the network and it needs access too. If you intent to use<span
id="more-1762"></span> the same NAS I have, log into it and go to the following screen:</p><p><img
class="alignnone size-full wp-image-1764" title="DNS-321" src="http://ubuntulinuxhelp.com/wp-content/uploads/2009/11/001.png?9d7bd4" alt="DNS-321" width="472" height="399" /></p><p>Enable SMB and select the account you wish to allow access for. Remember to allow read and write access. In my case that&#8217;s CHMOD 777</p><p>I&#8217;m assuming of course, that you&#8217;ve already set up user accounts on your NAS, and have enabled FTP. In the case of the NAS I used, there is no SSH server, as such I had to use FTP to create directories on it (so I could share them later). Via FTP, I created two directories. One called &#8220;stock&#8221; (to contain all the stock photos) and one called &#8220;sites&#8221; (to contain all client site files and data). I then <strong>shared the directories (via SMB)</strong> as &#8220;stock&#8221; and the other as &#8220;sites&#8221;; so they will be visible shares on the network.</p><p><strong>Windows Access:</strong></p><p>To access the shares on WinXP, double click the &#8220;My Computer&#8221; icon, then on the top navigation, select&#8221; Tools&#8221; and &#8220;Map Network Drive&#8221;.</p><p><img
class="alignnone size-full wp-image-1765" title="Windows - My Computer" src="http://ubuntulinuxhelp.com/wp-content/uploads/2009/11/002.png?9d7bd4" alt="Windows - My Computer" width="472" height="355" /></p><p>In the pop-up that appears, enter the following information (syntax is <strong>\servernamesharename</strong>):</p><p><img
class="alignnone size-full wp-image-1766" title="Windows - Map Network Drive" src="http://ubuntulinuxhelp.com/wp-content/uploads/2009/11/003.png?9d7bd4" alt="Windows - Map Network Drive" width="472" height="340" /></p><p>Remember to select &#8220;Reconnect at logon&#8221; then click &#8220;Finish&#8221;. Your new networked drive will appear and you can copy data to it.</p><p><strong>Linux Access:</strong></p><p>To access the shares on Ubuntu and have them <strong>automatically mount at boot time</strong>, I did the following.</p><p>Installed <a
href="http://www.debian-administration.org/articles/165" title="Mounting remote filesystems with smbfs"  target="_blank">smbfs</a>:</p><p><strong><span
style="color: #ff6600;">sudo aptitude install smbfs</span></strong> or <a
href="apt:smbfs">apt:smbfs</a></p><p>Still in terminal I<strong> created two mount points</strong> within the /media directory</p><p><strong><span
style="color: #ff6600;">sudo mkdir /media/stock &amp;&amp; sudo mkdir /media/sites</span></strong></p><p>Because the backup <strong>box requires login credentials</strong>, I added them as an external file (called .smbcredentials &#8211; the &#8220;dot&#8221; in front of the file name makes it a hidden file).</p><p><strong><span
style="color: #ff6600;">sudo gedit ~/.smbcredentials</span></strong></p><p>is the command to create the file. (You can use nano or pretty much any plain text editor).</p><p>Inside that file I placed the username and password (that I <strong>originally created on the NAS</strong>). Place only that text in the file. It will look something like this:</p><p><span
style="color: #3366ff;">username=roger<br
/> password =%^GkdA5m6_)c</span></p><p>What I&#8217;m posting online is not a real password (just an example), but it&#8217;s important to note that the .smbcredentials file stores your password in plain text. Therefore, you may want to <strong>help prevent non-root users from seeing the password</strong> by using the command:</p><p><span
style="color: #ff6600;"><strong>sudo chmod o= ~/.smbcredentials</strong></span></p><p>The above command makes the file visible to root only. If you are not worried about security, then you don&#8217;t have to take this step. I did use this because I didn&#8217;t want the less experience Linux users on this network, to try using my password to fix issues and potentially cause even more problems.</p><p>Next, I <strong>edited the file system table</strong> (fstab), which tells Linux <a
rel="nofollow" href="http://en.wikipedia.org/wiki/Fstab" title="fstab"  target="_blank">what disks are available and how to mount them</a>. The command to edit that file is:</p><p><strong><span
style="color: #ff6600;">sudo gedit /etc/fstab</span></strong></p><p>Your file will look something like this:</p><p><span
style="color: #3366ff;"># /etc/fstab: static file system information.<br
/> #<br
/> # &lt;file system&gt; &lt;mount point&gt;   &lt;type&gt;  &lt;options&gt;       &lt;dump&gt;  &lt;pass&gt;<br
/> proc            /proc           proc    defaults        0       0<br
/> # /dev/sda1<br
/> UUID=2e2d4d1d-c65f-4d84-bcdc-665b7033ba18 /               ext3    relatime,errors=remount-ro 0       1<br
/> # /dev/sda5<br
/> UUID=6993ff17-6e9f-4d55-814a-04ad1dfd6d60 none            swap    sw              0       0<br
/> /dev/scd0       /media/cdrom0   udf,iso9660 user,noauto,exec,utf8 0       0<br
/> /dev/scd1       /media/cdrom1   udf,iso9660 user,noauto,exec,utf8 0       0<br
/> /dev/fd0        /media/floppy0  auto    rw,user,noauto,exec,utf8 0       0<br
/> /dev/sdb1    /media/sdb-storage    ext3    defaults    0    0</span></p><p>At the bottom we need to <strong>add the shares we created</strong>. Remember that we created the following:</p><p>On the NAS a share called &#8220;stock&#8221; and another called &#8220;sites&#8221;.<br
/> On the Ubuntu box a mountpoint at <strong>/media/stock</strong> and another at <strong>/media/sites</strong></p><p>I didn&#8217;t want to add the hostname of the NAS box (nas001.localdomain) to the <strong>/etc/hosts</strong> file (so that Ubuntu can find the NAS via a hostname), so I <strong>mapped the shares directly to the IP address</strong> of the backup unit as 192.168.3.10</p><p>Finally the following two lines would be added as:</p><p><span
style="color: #3366ff;">//192.168.3.10/sites /media/sites smbfs credentials=/home/roger/.smbcredentials,uid=roger,gid=users 0 0<br
/> //192.168.3.10/stock /media/stock smbfs credentials=/home/roger/.smbcredentials,uid=roger,gid=users 0 0</span></p><p>The first above line stipulates:</p><p>Connect to the SMB server at 192.168.3.10 and access the share named &#8220;sites&#8221;. Mount that share in /media/sites and use the .smbcredentials file to provide access to the roger account. Set the owner of the data (uid) to &#8220;roger&#8221; and the group (gid) to &#8220;users&#8221;.</p><p>Hopefully this post will help some of you out there &#8211; Let me know! Also, if you have a better way or some tips about this, I&#8217;d enjoy hearing from you!</p><p>Thanks!</p><p><strong>UPDATE:</strong> I started getting CIFS VFS errors (during reboot, shut down, etc.) shortly after setting up the above &#8220;sharing&#8221; connections on a clean install of Ubuntu Jaunty, 9.04. After some research, I found a solution and posted the information at &#8220;<a
href="http://ubuntulinuxhelp.com/cifs-vfs-shutdown-error-when-using-smbfs/" title="CIFS VFS Shutdown Error When Using SMBFS"  target="_self">CIFS VFS Shutdown Error When Using SMBFS</a>&#8220;.</p> ]]></content:encoded> <wfw:commentRss>http://ubuntulinuxhelp.com/sharing-the-same-files-between-two-pcs/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Automate Your Web Site Backup!</title><link>http://ubuntulinuxhelp.com/automate-your-web-site-backup/</link> <comments>http://ubuntulinuxhelp.com/automate-your-web-site-backup/#comments</comments> <pubDate>Mon, 05 May 2008 14:39:13 +0000</pubDate> <dc:creator>Roger Wheatley</dc:creator> <category><![CDATA[Hands On]]></category> <category><![CDATA[How To]]></category> <category><![CDATA[automate]]></category> <category><![CDATA[backup]]></category> <category><![CDATA[cron]]></category> <category><![CDATA[data]]></category> <category><![CDATA[hosting]]></category> <category><![CDATA[how to]]></category> <category><![CDATA[redundancy]]></category> <category><![CDATA[rsync]]></category> <category><![CDATA[safe]]></category> <category><![CDATA[server]]></category> <category><![CDATA[website]]></category><guid
isPermaLink="false">http://ubuntulinuxhelp.com/automate-your-web-site-backup/</guid> <description><![CDATA[During the weekend (Saturday), UbuntuLinuxHelp was down for almost 12 hours. Fortunately the hosting provider had data backups and there was no data loss. In any event, I also keep backups, so the added redundancy helps to protect the content. Up to now, the server has been configured to create a daily backup of databases [...]]]></description> <content:encoded><![CDATA[<p>During the weekend (Saturday), UbuntuLinuxHelp was down for almost 12 hours.<img
src="http://ubuntulinuxhelp.com/wp-content/uploads/2008/03/spacer_gif.gif?9d7bd4" /> Fortunately the hosting provider had data backups and there was no data loss. In any event, I also keep backups, so the added redundancy helps to protect the content. Up to now, the server has been configured to create a daily backup of databases and certain directories; and those (.gz files) are downloaded manually to another location later.<img
src="http://ubuntulinuxhelp.com/wp-content/uploads/2008/03/spacer_gif.gif?9d7bd4" /></p><p>But, what if there were no backups? What if your hosting provider cannot restore  data at their end? To be blunt, you&#8217;d be back to square one! Developing a whole new site or blog from the beginning!<img
src="http://ubuntulinuxhelp.com/wp-content/uploads/2008/03/spacer_gif.gif?9d7bd4" /> That&#8217;s a chilling thought, to lose everything and start again.<img
src="http://ubuntulinuxhelp.com/wp-content/uploads/2008/03/spacer_gif.gif?9d7bd4" /></p><p>For peace of mind and data (intellectual property) , today&#8217;s post will highlight some of the steps we&#8217;ve taken to fully automate the backup process. Hopefully this will help many of you who may encounter the same issues, or are simply looking for a proactive, automated backup system for your web sites, blogs, ecommerce sites, etc.</p><p>We&#8217;ll need 5 things to ensure this system works:<img
src="http://ubuntulinuxhelp.com/wp-content/uploads/2008/03/spacer_gif.gif?9d7bd4" /><span
id="more-1280"></span></p><ul><li>The remote host (your web hosting server).<img
src="http://ubuntulinuxhelp.com/wp-content/uploads/2008/03/spacer_gif.gif?9d7bd4" /></li><li>The local host (your Ubuntu or other Linux based desktop).<img
src="http://ubuntulinuxhelp.com/wp-content/uploads/2008/03/spacer_gif.gif?9d7bd4" /></li><li>The open source Rsync package.<img
src="http://ubuntulinuxhelp.com/wp-content/uploads/2008/03/spacer_gif.gif?9d7bd4" /></li><li>OpenSSH.<img
src="http://ubuntulinuxhelp.com/wp-content/uploads/2008/03/spacer_gif.gif?9d7bd4" /></li><li>Cron.<img
src="http://ubuntulinuxhelp.com/wp-content/uploads/2008/03/spacer_gif.gif?9d7bd4" /></li></ul><p>Let&#8217;s start with our desktop,<img
src="http://ubuntulinuxhelp.com/wp-content/uploads/2008/03/spacer_gif.gif?9d7bd4" /> which is the &#8216;localhost&#8217;. In my case the desktop is Ubuntu Linux 7.10, but this can be any Linux based system. This could also be another Linux server, if you tweak this a bit more. ;) <img
src="http://ubuntulinuxhelp.com/wp-content/uploads/2008/03/spacer_gif.gif?9d7bd4" /></p><p>I know &#8216;cron&#8217; is enabled (because it&#8217;s part of the default installation) of my Linux desktop. I also know SSH is installed (because it&#8217;s installed by default and I&#8217;ve used it), but I&#8217;m not sure if &#8216;rsych&#8217; is there and if it works over SSH.<img
src="http://ubuntulinuxhelp.com/wp-content/uploads/2008/03/spacer_gif.gif?9d7bd4" /></p><p>Side note:<img
src="http://ubuntulinuxhelp.com/wp-content/uploads/2008/03/spacer_gif.gif?9d7bd4" /> For those not familiar with Rsync, &#8220;<em>rsync is an open source utility that provides fast incremental file transfer. rsync is freely available under the GNU General Public License and is currently being maintained by Wayne Davison.</em>&#8221; Source: <a
href="http://samba.anu.edu.au/rsync/"  title="http://samba.anu.edu.au/rsync/" target="_blank">http://samba.anu.edu.au/rsync/</a></p><p>To see if rsych is installed, use the following terminal command:<img
src="http://ubuntulinuxhelp.com/wp-content/uploads/2008/03/spacer_gif.gif?9d7bd4" /></p><p><code>apt-cache search rsync</code></p><p>If you see it&#8217;s installed,<img
src="http://ubuntulinuxhelp.com/wp-content/uploads/2008/03/spacer_gif.gif?9d7bd4" /> to determine if rsync works over SSH, open a terminal and type the following command (substituting your correct information):<img
src="http://ubuntulinuxhelp.com/wp-content/uploads/2008/03/spacer_gif.gif?9d7bd4" /></p><p><code>rsync -avz -e ssh Your Remote Username@Your Remote Server Host:/The Remote/dir /Your Local/dir/</code></p><p>Here is what the switches mean:<img
src="http://ubuntulinuxhelp.com/wp-content/uploads/2008/03/spacer_gif.gif?9d7bd4" /></p><p>a: Use &#8216;archive&#8217; mode.<img
src="http://ubuntulinuxhelp.com/wp-content/uploads/2008/03/spacer_gif.gif?9d7bd4" /><br
/> v: Use &#8216;verbose&#8217; output.<img
src="http://ubuntulinuxhelp.com/wp-content/uploads/2008/03/spacer_gif.gif?9d7bd4" /><br
/> z: Use &#8216;compression&#8217; during file transfer.<img
src="http://ubuntulinuxhelp.com/wp-content/uploads/2008/03/spacer_gif.gif?9d7bd4" /><br
/> e: Specify the &#8216;command&#8217; to run. In this case SSH.<img
src="http://ubuntulinuxhelp.com/wp-content/uploads/2008/03/spacer_gif.gif?9d7bd4" /></p><p>In my case the command could look something like this:<img
src="http://ubuntulinuxhelp.com/wp-content/uploads/2008/03/spacer_gif.gif?9d7bd4" /></p><p><code>rsync -avz -e ssh backupadmin@ubuntulinuxhelp.com :/backupdir/daily /home/ubplay/sitebackups</code></p><p>After entering the above command, I&#8217;m prompted to enter the password and the file transfer begins.<img
src="http://ubuntulinuxhelp.com/wp-content/uploads/2008/03/spacer_gif.gif?9d7bd4" /></p><p>In my case this is simple because the hosting provider uses &#8216;The&#8217; industry standard software (Linux) as the standard applications, openssh, rsych, cron, etc.<img
src="http://ubuntulinuxhelp.com/wp-content/uploads/2008/03/spacer_gif.gif?9d7bd4" /> And my local Linux system already had the tools installed. Now that I&#8217;ve determined it works, cron can automate the system. However, before moving to cron, make sure your server is configured to backup the files and databases on a daily (or other) schedule.<img
src="http://ubuntulinuxhelp.com/wp-content/uploads/2008/03/spacer_gif.gif?9d7bd4" /></p><p>If you&#8217;re using industry standard hosting services, you&#8217;ll be on a Linux box using cPanel.<img
src="http://ubuntulinuxhelp.com/wp-content/uploads/2008/03/spacer_gif.gif?9d7bd4" /> Personally, I&#8217;ve tried several others including Plesk, ISPConfig, etc, however in my opinion, they don&#8217;t have the amount of flexibility or options that cPanel does. In terms of a LAN however, in my opinion nothing beats Webmin. Webmin has the greatest flexibility and options. However, I&#8217;m going off topic here, back to the subject at hand!&#8230;<img
src="http://ubuntulinuxhelp.com/wp-content/uploads/2008/03/spacer_gif.gif?9d7bd4" /> Log into your hosting control panel and use the interface to configure your scheduled backups to occur during low-traffic periods. Make a note of the directory the backups are saved to. WHM/cPanel is great for this as it&#8217;s configured via a simple GUI, and is easy to use. :) In my case the server backs up the web site files and databases and stores them in /backupdir (so that my cron job can download any files in this directory later).<img
src="http://ubuntulinuxhelp.com/wp-content/uploads/2008/03/spacer_gif.gif?9d7bd4" /> For privacy issues, I&#8217;m not going to post the script as it contains a username and password among other &#8220;exposures&#8221;.</p><p>Before moving to cron itself,<img
src="http://ubuntulinuxhelp.com/wp-content/uploads/2008/03/spacer_gif.gif?9d7bd4" /> I needed to configure a script that will rsync over the SSH connection. Here are some example I found on the rsync site: <a
href="http://samba.anu.edu.au/rsync/examples.html"  title="http://samba.anu.edu.au/rsync/examples.html" target="_blank">Rsync Examples</a>. Another great resource we found is here: <a
href="http://colas.nahaboo.net/software/rsync-incr/"  title="http://colas.nahaboo.net/software/rsync-incr/" target="_blank">resync-incr</a>. On this site you&#8217;ll see another methodology and example scripts. And finally another great backup scripting resource here: <a
href="http://wiki.splitbrain.org/wiki:tips:backup_script"  title="http://wiki.splitbrain.org/wiki:tips:backup_script" target="_blank">Backup Script</a>. I&#8217;m sure some of you have other great sites and resources listed, please comment below and add them. :) <img
src="http://ubuntulinuxhelp.com/wp-content/uploads/2008/03/spacer_gif.gif?9d7bd4" /></p><p>After you&#8217;ve set up your script, however you want it (there are hundreds of ways!),<img
src="http://ubuntulinuxhelp.com/wp-content/uploads/2008/03/spacer_gif.gif?9d7bd4" /> use cron to run it. Setting up the cron job is not very difficult:<img
src="http://ubuntulinuxhelp.com/wp-content/uploads/2008/03/spacer_gif.gif?9d7bd4" /></p><p><code>0 2 * * * /home/ubplay/cron/rsync-ubuntulinuxhelp</code></p><p>This (above) downloads the backup at 2am every day. Remember to ensure that your server has finished creating its backup by this time.<img
src="http://ubuntulinuxhelp.com/wp-content/uploads/2008/03/spacer_gif.gif?9d7bd4" /> Otherwise you&#8217;ll not be downloading the files you expect. In my case I use nano to create the file called &#8220;rsync-ubuntulinuxhelp&#8221; placed in the &#8230;/cron director. The file named rsync-ubuntulinuxhelp contains the actual bash script. To create the cron job itself (that calls the script), complete the following in a terminal:<img
src="http://ubuntulinuxhelp.com/wp-content/uploads/2008/03/spacer_gif.gif?9d7bd4" /></p><p><code>sudo crontab -e</code></p><p>and use the following parameters:<img
src="http://ubuntulinuxhelp.com/wp-content/uploads/2008/03/spacer_gif.gif?9d7bd4" /></p><p>* * * * * path to script/command to be executed and script/command<img
src="http://ubuntulinuxhelp.com/wp-content/uploads/2008/03/spacer_gif.gif?9d7bd4" /><br
/> -   &#8211;   &#8211;   &#8211;   -<br
/> |   |   |   |   |<br
/> |   |   |   |   &#8212; Day of week (0 &#8211; 7)<img
src="http://ubuntulinuxhelp.com/wp-content/uploads/2008/03/spacer_gif.gif?9d7bd4" /><br
/> |   |   |   &#8212;&#8212;- Month (1 &#8211; 12)<img
src="http://ubuntulinuxhelp.com/wp-content/uploads/2008/03/spacer_gif.gif?9d7bd4" /><br
/> |   |   &#8212;&#8212;&#8212; Day of month (1 &#8211; 31)<img
src="http://ubuntulinuxhelp.com/wp-content/uploads/2008/03/spacer_gif.gif?9d7bd4" /><br
/> |   &#8212;&#8212;&#8212;&#8211; Hour (0 &#8211; 23)<img
src="http://ubuntulinuxhelp.com/wp-content/uploads/2008/03/spacer_gif.gif?9d7bd4" /><br
/> &#8212;&#8212;&#8212;&#8212;- Minute (0 &#8211; 59)<img
src="http://ubuntulinuxhelp.com/wp-content/uploads/2008/03/spacer_gif.gif?9d7bd4" /></p><p>(&#8216;*&#8217; means &#8216;every&#8217;).<img
src="http://ubuntulinuxhelp.com/wp-content/uploads/2008/03/spacer_gif.gif?9d7bd4" /></p><p>Side note: to view your existing cron jobs, in a terminal, type:<img
src="http://ubuntulinuxhelp.com/wp-content/uploads/2008/03/spacer_gif.gif?9d7bd4" /></p><p><code>sudo cron -l</code></p><p>to delete a cron job:<img
src="http://ubuntulinuxhelp.com/wp-content/uploads/2008/03/spacer_gif.gif?9d7bd4" /></p><p><code>sudo cron -r</code></p><p>As usual, I hope this helps some of you!<img
src="http://ubuntulinuxhelp.com/wp-content/uploads/2008/03/spacer_gif.gif?9d7bd4" /></p><p>Enjoy :)</p><p>[tags]linux, ubuntu, automatic, backup, website, cron, rsync, how to, openssh, save website[/tags]</p> ]]></content:encoded> <wfw:commentRss>http://ubuntulinuxhelp.com/automate-your-web-site-backup/feed/</wfw:commentRss> <slash:comments>10</slash:comments> </item> <item><title>Digital Forensics in Linux &#8211; Reclaiming Data Off a Failed Hard Drive.</title><link>http://ubuntulinuxhelp.com/digital-forensics-in-linux-reclaiming-data-off-a-failed-hard-drive/</link> <comments>http://ubuntulinuxhelp.com/digital-forensics-in-linux-reclaiming-data-off-a-failed-hard-drive/#comments</comments> <pubDate>Tue, 11 Mar 2008 19:53:13 +0000</pubDate> <dc:creator>Roger Wheatley</dc:creator> <category><![CDATA[Applications]]></category> <category><![CDATA[Hands On]]></category> <category><![CDATA[How To]]></category> <category><![CDATA[afconvert]]></category> <category><![CDATA[aifflib]]></category> <category><![CDATA[autopsy]]></category> <category><![CDATA[backup]]></category> <category><![CDATA[data]]></category> <category><![CDATA[forensic]]></category> <category><![CDATA[hard drive]]></category> <category><![CDATA[reclaim]]></category> <category><![CDATA[save data]]></category> <category><![CDATA[sleuthkit]]></category> <category><![CDATA[tools]]></category> <category><![CDATA[ubcd]]></category><guid
isPermaLink="false">http://ubuntulinuxhelp.com/digital-forensics-in-linux-reclaiming-data-off-a-failed-hard-drive/</guid> <description><![CDATA[I recently spoke with a lady who operates a Forensic Accounting consultancy. During the course of our conversation, she indicated that from time-to-time she receives requests for computer data related assistance. Namely, obtaining deleted information off hard drives or data off failed drives. Her business operates on Windows based platforms and she was wondering how [...]]]></description> <content:encoded><![CDATA[<p>I recently spoke with a lady who operates a Forensic Accounting consultancy. During the course of our conversation, she indicated that from time-to-time she receives requests for computer data related assistance. Namely, obtaining deleted information off hard drives or data off failed drives. Her business operates on Windows based platforms and she was wondering how productive I had found Linux. (I&#8217;m an Ubuntu Linux user). And if I could use Linux to garner &#8220;lost&#8221; data (sending drives to professional labs is very expensive for her clients). While I&#8217;m not a data &#8220;reclamation&#8221; or computer data forensic expert (by any stretch of the imagination), nevertheless I&#8217;ve delved into this aspect on occasion. (Mostly when a hard drive fails).</p><p>It left me wondering as to the status of some of the software I have used in the past. Now that I&#8217;ve garnered much more experience, I was intrigued as to how (if possible) I could provide this business limited services. If not, could I at least access the data on the failed drive?</p><p>Here&#8217;s the scenario. I have an older 10GB hard drive that had failed and<span
id="more-1196"></span> I&#8217;ve stored away (for the last 2 weeks). I remember there was almost no data on it. I wondered if I was able to get the  data off that drive, it had Ubuntu Linux 7.10 on it (ext3). I already had one backup of the data prior to the failure so simply stored the drive on the shelf for no particular reason. If I was unable to get the data off the drive, I wouldn&#8217;t have cared because I already had a backup. I just want to see if I could do it. And, if I could, share this information with others &#8211; to help them.</p><p>Back to the present. I plugged the drive back into a working system and sure enough, I cannot access it. It powers up and spins, but the GUI cannot access it. I read some years ago that one tactic is to place the drive in a freezer for a couple of hours or so before trying to reclaim data. I kept the PDF I read back then, and it was called &#8220;<a
rel="nofollow" href="http://www.hddrecovery.com.au/downloads/200ways.pdf"  title="http://www.hddrecovery.com.au/downloads/200ways.pdf" target="_blank">200 Ways to Revive a Hard Drive</a>&#8220;.</p><p>While freezing the drive might enable access, I still might need some applications to actually grab a copy of the data. I though, I&#8217;d only have one shot at booting up and accessing the drive, so assumed the best course of action was to create an image of the drive and work with that. Creating images in Ubuntu Linux is not a difficult task to do and can easily be performed on the command line ( in terminal), using the following commands:</p><p><code>sudo mkdir /mnt/image<br
/> sudo mount -t ext3 /dev/hdb1 /mnt/image<br
/> sudo dd if=/dev/hda of=/mnt/image/10gdrive.raw</code></p><p>So I was set to go. I had the following ready:</p><p>The existing PC with another working 10GB hard drive in it (which I formated to ext3, the same as the failed drive), to be booted up with an Ubuntu Linux LiveCD. This is important because I wanted to create the image of the failed drive and needed to put it on the working drive. If the working drive were in use, then that would not be possible, therefore booting off the LiveCD would provide this functionality.</p><p>I plugged the failed (frozen) hard drive and turned on the system. After the LiveCD boot completed, I was able to use the above commands to initiate the image creation (of the failed drive). Will it run? If it does, will it remain operating for the period of the image creation?</p><p>Well, it did last the surprising hour and a half it took for the image to be made. So I suppose, the hard drive failure must have been just something simple that prevented reading of data.  I now had the image to work with and see if I could get any data.</p><p>I powered down the system and removed both hard drives. The &#8220;bad&#8221; hard drive can be used as a paper weight :) and the good &#8220;image&#8221; drive I set aside for the next step.</p><p>I plugged a new hard drive into the system, actually it was the original one that already had Linux on it (Ubuntu Feisty), and plugged the imaged drive into the second ATA connector and powered up the system.</p><p>However, let&#8217;s stand back for one moment so that I can explain the next steps (at least what worked for me). A couple years ago I was introduced to <a
href="http://www.sleuthkit.org/sleuthkit/desc.php"  title="http://www.sleuthkit.org/sleuthkit/desc.php" target="_blank">Sleuthkit</a> which is a series of command line scripts used for data forensics. Also <a
href="http://www.sleuthkit.org/autopsy/desc.php"  title="http://www.sleuthkit.org/autopsy/desc.php" target="_blank">Autopsy</a>, which provides a GUI interface and aff (which needs <a
href="http://www.afflib.org/"  title="http://www.afflib.org/" target="_blank">afflib</a>). Why aff? I&#8217;m not overly trained in the technical aspects, but I do know that the use of other compression formats requires Autopsy to have the file decompressed first, but using the afflib was the best (at least that&#8217;s what was in my notes at that time. I don&#8217;t remember where I originally read this), as it allows Autopsy to use the compressed file. Also, I want to see if I can burn a 10GB hard drive to a DVD because:</p><p>&#8220;<em>&#8230;AFF implements the LZMA compression system, which can produce disk image files that are dramatically smaller than other tools on the market today. Compared with the Expert Witness format used by EnCase and other tools, AFF images are typically 30% to 50% smaller&#8230;</em>&#8221;</p><p>To clarify, Install Sleuthkit, Autopsy and aff compression, so you can work with the image. The disk image is currently in raw format so aff format gives us something we can work with and burn to DVD. The command to install the tools is:</p><p><code>sudo apt-get install autopsy afflib</code></p><p>Note: I didn&#8217;t have to install Sleuthkit because it gets installed automatically when you install Autopsy.</p><p>Now that we have the required tools, lets convert the  image to something burnable to DVD:</p><p><code>sudo afconvert -X9 -o /root/10gdrive.aff /media/dvdrecorder/10gdrive.raw</code></p><p>Here are what the switches in the above command mean:</p><p>-X9 Sets the compression to 9 (the maximum).<br
/> -o Output to a file.</p><p>Note: &#8220;afconvert &#8211;help&#8221; will give you the switch option explanations.</p><p>What this command actually does is convert the image back to a compressed .raw and send it to the DVD. The data did fit, but only because there were hardly any files on the original bad disk, so the empty space was compressed to virtually nothing. (At least that&#8217;s how I interpreted it). If I messed something up, I had the backed up image on DVD.</p><p>The rest was a simpler matter of using Autopsy and following the instructions.</p><p>The PC now has the following:</p><p>A working hard drive, using Linux (Ubuntu).<br
/> The &#8220;imaged drive&#8221; plugged into the PC as well.</p><p>To start up Autopsy open a terminal and type: &#8220;autopsy&#8221; and you will see a screen that shows you this:</p><p><img
src="http://ubuntulinuxhelp.com/wp-content/uploads/2008/03/autopsy-start.jpg?9d7bd4" alt="Start Autopsy" /></p><p>Just follow the instructions and you&#8217;ll see:</p><p><img
src="http://ubuntulinuxhelp.com/wp-content/uploads/2008/03/autopsy-browser.jpg?9d7bd4" alt="Autopsy in Firefox Web Browser" /></p><p>I ignored the Javascript warning because security was not an issue. Remember, I just wanted to see if I could do this and share what I learned.</p><p>Moving on&#8230;</p><p><img
src="http://ubuntulinuxhelp.com/wp-content/uploads/2008/03/autopsy-create-case.jpg?9d7bd4" alt="Autopsy Create the Case" /></p><p>Oh&#8230; I need to add a &#8220;host&#8221;&#8230;</p><p><img
src="http://ubuntulinuxhelp.com/wp-content/uploads/2008/03/autopsy-host-addition.jpg?9d7bd4" alt="Autopsy Add Host" height="348" width="545" /></p><p>Simply follow along and play with the tools. You&#8217;ll be surprised what you can see! ;)</p><p>Needless to say this was a good exercise for me. The real motivation for me to do this (and document my &#8220;journey&#8221; in this blog), is to see how much I can learn. That&#8217;s also what Opensource is about right? The more I play with Linux, the more I learn and the greater the confidence level.</p><p>And&#8230; just  a side note, for those readers not aware. A very good (and free) trouble shooting tool I also use is UBCD (<a
href="http://www.ultimatebootcd.com/"  title="http://www.ultimatebootcd.com/" target="_blank">Ultimate Boot CD</a>). It&#8217;s a troubleshooting, fixer upper, data scanning, high speed formating, disk testing&#8230; the tools go on and on. Very cool, try that one out too, as you won&#8217;t be disappointed.</p><p>On a lighter &#8220;fun&#8221; note, we can still put those dead drives to good use! ;)</p><p><a
href="http://www.instructables.com/id/Hard-Drive-Speaker-System/"  title="http://www.instructables.com/id/Hard-Drive-Speaker-System/" target="_blank"> Hard Drive Speaker System.</a><a
href="http://www.instructables.com/id/Build-a-15%2c000-rpm-Tesla-Turbine-using-hard-drive-/"  title="http://www.instructables.com/id/Build-a-15%2c000-rpm-Tesla-Turbine-using-hard-drive-/" target="_blank">Build a 15,000 rpm Tesla Turbine using hard drive platters.</a><br
/> <a
href="http://www.instructables.com/id/Pulling-apart-a-desktop-hard-drive-to-get-rare-ear/"  title="http://www.instructables.com/id/Pulling-apart-a-desktop-hard-drive-to-get-rare-ear/" target="_blank">Pulling apart a desktop hard drive to get rare earth magnets.</a><br
/> <a
href="http://www.instructables.com/id/Hard-drive-platter-clock./"  title="http://www.instructables.com/id/Hard-drive-platter-clock./" target="_blank">Hard drive platter clock.</a><br
/> <a
href="http://www.instructables.com/id/Hard-Drive-Fridge-Magnet/"  title="http://www.instructables.com/id/Hard-Drive-Fridge-Magnet/" target="_blank">Hard Drive Fridge Magnet.</a></p><p>Hopefully some of you will find the above information of help. :)</p> ]]></content:encoded> <wfw:commentRss>http://ubuntulinuxhelp.com/digital-forensics-in-linux-reclaiming-data-off-a-failed-hard-drive/feed/</wfw:commentRss> <slash:comments>5</slash:comments> </item> </channel> </rss>
<!-- Served from: ubuntulinuxhelp.com @ 2012-02-10 16:48:31 by W3 Total Cache -->
