<?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>Backup Articles &#187; Code and Solutions</title>
	<atom:link href="http://www.backupmyhost.com/blog/category/code-and-solutions/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.backupmyhost.com/blog</link>
	<description>All you need to know about data backup</description>
	<lastBuildDate>Mon, 26 Jul 2010 18:29:03 +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>Securing your online backup archives</title>
		<link>http://www.backupmyhost.com/blog/enterprise/securing-your-online-backup-archives/</link>
		<comments>http://www.backupmyhost.com/blog/enterprise/securing-your-online-backup-archives/#comments</comments>
		<pubDate>Wed, 12 May 2010 16:08:44 +0000</pubDate>
		<dc:creator>chribonn</dc:creator>
				<category><![CDATA[Code and Solutions]]></category>
		<category><![CDATA[Remote Backups]]></category>
		<category><![CDATA[enterprise]]></category>
		<category><![CDATA[online backups]]></category>
		<category><![CDATA[remote backup]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://www.backupmyhost.com/blog/?p=496</guid>
		<description><![CDATA[One of the concerns of many people who consider performing online backups is the matter of security. You are uploading sensitive stuff to a foreign site. Can anyone from within read this stuff? And what if the site is hacked and white collar thieves living in some foreign country get hold of the data? What would happen? Use this script to protect your data.]]></description>
			<content:encoded><![CDATA[
<!-- Quick Adsense Wordpress Plugin: http://techmilieu.com/quick-adsense -->
<div style="float:none;margin:10px 0 10px 0;text-align:center;">
<script type="text/javascript"><!--
google_ad_client = "pub-8456896426992435";
/* 468x15, top post */
google_ad_slot = "5294666294";
google_ad_width = 468;
google_ad_height = 15;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div>
<p><a href="http://www.backupmyhost.com/blog/wp-content/uploads/2010/05/key.jpg"><img class="alignleft size-full wp-image-502" style="border: 0px;" title="key" src="http://www.backupmyhost.com/blog/wp-content/uploads/2010/05/key.jpg" alt="" width="129" height="122" />

<!-- Quick Adsense Wordpress Plugin: http://techmilieu.com/quick-adsense -->
<div style="float:none;margin:10px 0 10px 0;text-align:center;">
<!-- AddThis Button BEGIN -->
<div><a href="http://addthis.com/bookmark.php?v=250&username=georgec" title="Bookmark and Share" target="_blank"><img src="http://s7.addthis.com/static/btn/v2/lg-share-en.gif" width="125" height="16" alt="Bookmark and Share" style="border:0"/></a></div>
<!-- AddThis Button END -->
</div>

</a>One of the concerns of many people who consider performing online backups is the matter of security. You are uploading sensitive stuff to a foreign site. Can anyone from within read this stuff? And what if the site is hacked and white collar thieves living in some foreign country get hold of the data? What would happen?</p>
<p>One solution is to protect each and every document using a password. Many programs have such a capability built in.  For many one, two or three person organisations this solution could work; the people would password protect every file using a phrase that is shared amongst colleagues. As the number of employees increase, guaranteeing that everyone is obeying the rules makes this solution one that is too problematic. Besides certain file types cannot be password protected.</p>
<p>The script I am sharing is one that addresses this problem. It makes use of the commercial product WinRar to archive an entire directory (including subdirectories) into a RAR file. The RAR file name is user definable and is placed in a folder under C:\RSB. The RAR archive is password protected using a password passed to the script. The script is called <strong>rsb.cmd</strong>.</p>
<!-- Quick Adsense Wordpress Plugin: http://techmilieu.com/quick-adsense -->
<div style="float:none;margin:10px 0 10px 0;text-align:center;">
<style type="text/css">
@import url(http://www.google.com/cse/api/branding.css);
</style>
<div class="cse-branding-right" style="background-color:#FFFFFF;color:#000000">
  <div class="cse-branding-form">
    <form action="http://www.google.com/cse" id="cse-search-box" target="_blank">
      <div>
        <input type="hidden" name="cx" value="partner-pub-8456896426992435:wi5tiw-g8t3" />
        <input type="hidden" name="ie" value="ISO-8859-1" />
        <input type="text" name="q" size="31" />
        <input type="submit" name="sa" value="Search" />
      </div>
    </form>
  </div>
  <div class="cse-branding-logo">
    <img src="http://www.google.com/images/poweredby_transparent/poweredby_FFFFFF.gif" alt="Google" />
  </div>
  <div class="cse-branding-text">
    Custom Search
  </div>
</div>
</div>

<p><span id="more-496"></span></p>
<p>The example below would archive everything starting from <em>D:\Personal Docs\Articles</em> to an archive called <em>C:\RSB\Documents</em>. The password used to encrypt the archive is <em>123456</em>.</p>
<p><em>rsb Documents &#8220;D:\Personal Docs\Articles&#8221; 123456</em></p>
<p>If you have another folder you would like to archive, simply call the command above with a different archive name and a different directory. Using a different password is up to you.</p>
<p>Below is the script to perform this task:</p>
<blockquote>
<pre><em>@echo off
:: This script archives a directory and all its contents with a
:: password for storage in online backup service. It adds
:: recovery information to the archive thereby increasing the
:: chance of it being opened up if the archive is damaged.
:: This script compresses files thereby reducing the storage
:: requirements as well as upload times.
:: Written by Alan C. Bonnici (email chribonn@gmail.com) 2010/05</em></pre>
<pre><em>set r_Version=1.0</em></pre>
<pre>rem This script takes three parameters:
rem  1. The name of the archive
rem  2. The directory (and its sub-directories) that are to be archived
rem  3. The archive password
rem The archive will be placed into a directory called RSB. Your
rem online backup program should backup all files in this
rem directory</pre>
<pre>rem All 3 parameters are mandatory
if [%1]==[] GOTO :Error
if [%2]==[] GOTO :Error
if [%3]==[] GOTO :Error</pre>
<pre>set r_Archive=%1
call :DeQuote r_Archive</pre>
<pre>set r_Dir=%2
call :DeQuote r_Dir</pre>
<pre>if EXIST C:\RSB\NUL GOTO :DirExists
md C:\RSB</pre>
<pre>:DirExists

echo The contents of this archive are intended only for the person or entity to whom they belong and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. &gt; "%TEMP%\comment.rsb"

if EXIST "%TEMP%\output.rsb" del /q "%TEMP%\output.rsb" &gt; NUL</pre>
<pre>"%PROGRAMFILES%\winrar\winrar.exe" u -as -av -cfg- -ow -r -rr10p -inul -ilog"%TEMP%\output.rsb" -t -hp%3 -z"%TEMP%\comment.rsb" -- "C:\RSB\%r_Archive%" "%r_Dir%"
set r_Err=%ERRORLEVEL%
if %r_Err%==0 GOTO :EndCmd</pre>
<pre>rem An error occurred. Dump the file if it exists
if EXIST "%TEMP%\output.rsb" type "%TEMP%\output.rsb"

echo.</pre>
<pre>if %r_Err%==1 echo Warning. Non fatal error(s) occurred.
if %r_Err%==1 GOTO :EndCmd</pre>
<pre>if %r_Err%==2 echo Error. A fatal error occurred.
if %r_Err%==2 GOTO :EndCmd</pre>
<pre>if %r_Err%==3 echo Error. CRC error occurred when unpacking.
if %r_Err%==3 GOTO :EndCmd</pre>
<pre>if %r_Err%==4 echo Error. Attempt to modify a locked archive.
if %r_Err%==4 GOTO :EndCmd</pre>
<pre>if %r_Err%==5 echo Error. Write error.
if %r_Err%==5 GOTO :EndCmd</pre>
<pre>if %r_Err%==6 echo Error. File open error.
if %r_Err%==6 GOTO :EndCmd</pre>
<pre>if %r_Err%==7 echo Error. Wrong command line option.
if %r_Err%==7 GOTO :EndCmd</pre>
<pre>if %r_Err%==8 echo Error. Not enough memory.
if %r_Err%==8 GOTO :EndCmd</pre>
<pre>if %r_Err%==9 echo Error. File create error.
if %r_Err%==9 GOTO :EndCmd</pre>
<pre>if %r_Err%==255 echo Error. You aborted the process
if %r_Err%==255 GOTO :EndCmd</pre>
<pre>rem Undefined error.
echo Error. Undefined error %r_Err%

goto :EndCmd</pre>
<pre>:EndCmd
rem Clean up
if EXIST "%TEMP%\comment.rsb" del /q "%TEMP%\comment.rsb" &gt; NUL
if EXIST "%TEMP%\output.rsb" del /q "%TEMP%\output.rsb" &gt; NUL
set r_Archive=
set r_Dir=
set r_Err=
<em>set r_Version=</em></pre>
<pre>goto :EOF</pre>
<pre>:Error
echo This script takes three values:
echo    1. The name of the archive
echo    2. The directory (and its sub directories) that are to be archived
echo    3. The archive password
echo The archive will be placed into a directory called RSB (it will be created if it does not exist).
echo Your online backup program should backup all files in this directory.
echo RSB Documents "C:\Users\ACBonnici\Documents" Pa$$w0rd
goto :EOF</pre>
<pre>   :: Removes the outer set of double quotes from a variable.
   :: Written by Frank P. Westlake, 2001.09.22, 2001.09.24
   :: Modified by Simon Sheppard 2002.06.09

   :: Usage as a function within a script:
   ::   CALL :DeQuote VariableName
   ::
   :: Calling as a function from another batch file:
   ::   CALL DeQuote.cmd VariableName
   ::
   :: If the first and last characters of the variable contents are double
   :: quotes then they will be removed. This function preserves cases such as
   ::   Set Height=5'6" and Set Symbols="!@#
   ::
   :: If a variable is quoted twice and has delimiters then you will
   :: need to run the function twice to remove both sets.
   ::   Set var=""Two Quotes;And,Delimiters=Fails""
   ::
   :: If the variable name itself contains spaces the routine will fail
   :: e.g. %v_my_variable% rather than %my variable%

   :DeQuote
   SET DeQuote.Variable=%1
   CALL Set DeQuote.Contents=%%%DeQuote.Variable%%%
   Echo.%DeQuote.Contents%|FindStr/brv ""^"&gt;NUL:&amp;&amp;Goto :EOF
   Echo.%DeQuote.Contents%|FindStr/erv ""^"&gt;NUL:&amp;&amp;Goto :EOF

   Set DeQuote.Contents=####%DeQuote.Contents%####
   Set DeQuote.Contents=%DeQuote.Contents:####"=%
   Set DeQuote.Contents=%DeQuote.Contents:"####=%
   Set %DeQuote.Variable%=%DeQuote.Contents%

   Set DeQuote.Variable=
   Set DeQuote.Contents=
   Goto :EOF</pre>
</blockquote>
<p>If you would like to download this script rather than copy and paste it from this article point your browser to <a href="http://www.remotestoragebackup.com/downloads/RSBArticleCode.rar">http://www.RemoteStorageBackup.com/downloads/RSBArticleCode.rar</a>. What remains is to set your online backup program to backup everything in the c:\RSB directory. Don’t forget to periodically test that everything is working well.</p>
<p>Next time I’ll delve into the code and explain what it does and how it works. This will allow you to customise it to your needs.</p>
<p>If you have any observations or questions send an email to chribonn@gmail.com.<br />
<h3>Last 3 posts by chribonn</h3><ul><li><a href="http://www.backupmyhost.com/blog/basics/when-green-is-bad/">When Green Is Bad</a> - July 5th, 2010</li><li><a href="http://www.backupmyhost.com/blog/basics/what-your-backup-solution-should-be-and-do/">What your backup solution should be and do</a> - June 27th, 2010</li><li><a href="http://www.backupmyhost.com/blog/enterprise/backing-up-resotring-and-tweaking-sage-pastel-evolution/">Backing up, Restoring and Tweaking Sage Pastel Evolution</a> - April 5th, 2010</li></ul></p>

<!-- Quick Adsense Wordpress Plugin: http://techmilieu.com/quick-adsense -->
<div style="float:none;margin:0px;">
<script type="text/javascript"><!--
google_ad_client = "pub-8456896426992435";
/* Homepage, 300x250, side bar */
google_ad_slot = "1042304518";
google_ad_width = 300;
google_ad_height = 250;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div>

<div style="font-size:0px;height:0px;line-height:0px;margin:0;padding:0;clear:both"></div>]]></content:encoded>
			<wfw:commentRss>http://www.backupmyhost.com/blog/enterprise/securing-your-online-backup-archives/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Backing up, Restoring and Tweaking Sage Pastel Evolution</title>
		<link>http://www.backupmyhost.com/blog/enterprise/backing-up-resotring-and-tweaking-sage-pastel-evolution/</link>
		<comments>http://www.backupmyhost.com/blog/enterprise/backing-up-resotring-and-tweaking-sage-pastel-evolution/#comments</comments>
		<pubDate>Mon, 05 Apr 2010 09:09:21 +0000</pubDate>
		<dc:creator>chribonn</dc:creator>
				<category><![CDATA[Code and Solutions]]></category>
		<category><![CDATA[Windows Servers]]></category>
		<category><![CDATA[enterprise]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[Microsoft SQL]]></category>
		<category><![CDATA[Registry]]></category>
		<category><![CDATA[Registry Backup]]></category>
		<category><![CDATA[Sage]]></category>
		<category><![CDATA[Sage Pastel]]></category>
		<category><![CDATA[Sage Pastel Evolution]]></category>
		<category><![CDATA[Windows Registry]]></category>

		<guid isPermaLink="false">http://www.backupmyhost.com/blog/?p=437</guid>
		<description><![CDATA[Storing the settings of each user within a computer’s registry rather than as a record within the Microsoft SQL database is a debatable design decision especially since database technology constitutes a core component of this product. ]]></description>
			<content:encoded><![CDATA[
<!-- Quick Adsense Wordpress Plugin: http://techmilieu.com/quick-adsense -->
<div style="float:none;margin:10px 0 10px 0;text-align:center;">
<script type="text/javascript"><!--
google_ad_client = "pub-8456896426992435";
/* 468x15, top post */
google_ad_slot = "5294666294";
google_ad_width = 468;
google_ad_height = 15;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div>
<p><a href="http://www.backupmyhost.com/blog/wp-content/uploads/2010/03/image001.jpg"><img class="alignright size-full wp-image-438" src="http://www.backupmyhost.com/blog/wp-content/uploads/2010/03/image001.jpg" alt="Sage Pastel Evolution-001" width="206" height="221" />

</a>Sage Pastel Evolution is an Accounting / Stock / Point of Sale program for medium to large sized companies. The program can support a large number of concurrent users and an unlimited number of companies. It uses Microsoft SQL Server as its underlying database. Small setups (up to 10 users) can use Microsoft SQL Server Express with larger shops necessitating the use of the standard edition of SQL Server.</p>
<p>In order to backup Sage Pastel Evolution one needs to backup the Microsoft SQL Server database as well as the appropriate registry entries. In this article I will not discuss how to backup Microsoft SQL Server Express or Standard edition—email me on <a href="mailto:chribonn@gmail.com">chribonn@gmail.com</a> if you are interested in a write-up on how to backup these products.</p>
<h2>The Windows Registry</h2>
<p>A word of warning about handling the registry: unlike many programs, the registry program does not have an undo or an undelete option and changes go into effect immediately. If you delete a file by mistake you can pull it out of limbo by visiting the Recycle Bin. If you screw up a document, pressing undo will take you back one action at a time until you reach the stage before the oops or, if necessary, you can abandon all changes done during that session simply by not saving the updated document. None of this exists in the registry so be cautious. <span id="more-437"></span></p>
<!-- Quick Adsense Wordpress Plugin: http://techmilieu.com/quick-adsense -->
<div style="float:none;margin:10px 0 10px 0;text-align:center;">
<style type="text/css">
@import url(http://www.google.com/cse/api/branding.css);
</style>
<div class="cse-branding-right" style="background-color:#FFFFFF;color:#000000">
  <div class="cse-branding-form">
    <form action="http://www.google.com/cse" id="cse-search-box" target="_blank">
      <div>
        <input type="hidden" name="cx" value="partner-pub-8456896426992435:wi5tiw-g8t3" />
        <input type="hidden" name="ie" value="ISO-8859-1" />
        <input type="text" name="q" size="31" />
        <input type="submit" name="sa" value="Search" />
      </div>
    </form>
  </div>
  <div class="cse-branding-logo">
    <img src="http://www.google.com/images/poweredby_transparent/poweredby_FFFFFF.gif" alt="Google" />
  </div>
  <div class="cse-branding-text">
    Custom Search
  </div>
</div>
</div>

<h2>How Sage Pastel Evolution uses the Windows registry</h2>
<p>The Sage Pastel Evolution program is a thick client that makes use of windows registry to store customisations each user makes to the program. Module settings, what information is shown, how it is formatted and the order of columns are all examples of the type of information that one can find in the registry. This is the approach Sage used to give each user his own personalised environment. If a single Windows login is used by multiple sage users, each user can have his own tweaks.</p>
<p>Storing the settings of each user within a computer’s registry rather than as a record within the Microsoft SQL database is a debatable design decision especially since database technology constitutes a core component of this product. My reasoning is that if a user wants column A to come before column B and column C being hidden, he would want that on each and every computer he uses. A person who uses more than one computer must set the customisations on each computer. When a new account is created, there is no option to copy settings from an existing user to the new one. And, if anyone of the client computers fails, the settings have to be reprogrammed. This article will explain how to tackle each one of these scenarios.</p>
<h2>Backing up the Registry</h2>
<p> <a href="http://www.backupmyhost.com/blog/wp-content/uploads/2010/03/image002.jpg"><img class="aligncenter size-full wp-image-439" src="http://www.backupmyhost.com/blog/wp-content/uploads/2010/03/image002.jpg" alt="Sage Pastel Evolution-002" width="602" height="481" /></a></p>
<p>Sage keeps all program settings in the registry hive HKCU\Software\Softline. Backing up this registry key ensures that all customisations are available if the computer fails.</p>
<p> <a href="http://www.backupmyhost.com/blog/wp-content/uploads/2010/03/image003.jpg"><img class="aligncenter size-full wp-image-440" src="http://www.backupmyhost.com/blog/wp-content/uploads/2010/03/image003.jpg" alt="Sage Pastel Evolution-003" width="602" height="479" /></a></p>
<ol>
<li>Run the program <strong>regedit</strong> either from the command prompt, by clicking on the <strong>Run</strong> option found in the Start Menu (this option is not visible by default in Windows 7) or by typing in the program name in the<strong> Search Program Files and options</strong> box that is situated at the bottom on the Menu that comes up when you click the Start Menu button (this is not available in Windows XP).</li>
<li>Navigate to the <strong>HKCU\Software\Softline</strong> hive. Select the option <strong>File -&gt; Export&#8230;</strong>from regedit (1).</li>
<li>A dialog box comes up. Select the folder and specify the file name you want to call this registry entry (2). As shown in the diagram above, the selected radio button of the group <strong>Export range</strong>should refer to the Softline registry branch (3).</li>
<li>Backup this file and update it whenever settings change.</li>
</ol>
<p>You have to repeat the process above for each Sage Pastel Evolution user who logs into the computer.</p>
<h2>Restoring the registry</h2>
<p><a href="http://www.backupmyhost.com/blog/wp-content/uploads/2010/03/image004.jpg"><img class="aligncenter size-full wp-image-441" src="http://www.backupmyhost.com/blog/wp-content/uploads/2010/03/image004.jpg" alt="Sage Pastel Evolution-004" width="602" height="445" /></a></p>
<p>You may need to restore the registry file you backed up either because a computer failed and had to be reinitialised or to transfer settings from one computer to another.</p>
<p>Because this program retains information in the <strong>HKCU</strong> part of the registry, the user must be logged into the computer before his registry settings are imported.</p>
<p>After the user has logged in, execute the program <strong>regedit.exe</strong>. This time round choose the option <strong>Import&#8230;</strong> from the <strong>File</strong> menu (1). Navigate to the folder where you had previously placed your backup and open the file (2). A final dialog box will confirm that the registry was updated with the contents of that file.</p>
<h2>Changing Agents</h2>
<p>This section is highly technical and should only be performed by people who understand and are comfortable tweaking the Windows registry. An error could, at the very least, end up making this program stop functioning.</p>
<p>Each Sage Pastel Evolution user is known as an agent. A user who logs into this program using the user name Chris would have an entry in the registry starting at <strong>HKCU\Software\Softline\Evolution\Agents\Chris</strong>. Assume that you would like to copy Chris’s agent setting to those belonging to Mary so that Mary does not have to make the changes already done by Chris. Use the following steps:</p>
<ol>
<li>Ask Chris to log into his computer and using regedit export the registry hive <strong>HKCU\Software\Softline\Evolution\Agents\Chris</strong>.</li>
<li>Open the exported registry file within a text editor such as notepad and change all instances of <strong>[HKEY_CURRENT_USER\Software\Softline\Evolution\Agents\Chris</strong> to <strong>[HKEY_CURRENT_USER\Software\Softline\Evolution\Agents\Mary</strong>. Save the modified registry file.</li>
<li>Ask Mary to log into Windows with her credentials and install the program on her PC if it is not already functional.</li>
<li>Test that she can log into the program.</li>
<li>Import the modified registry file created in point (2) into Mary’s Sage.</li>
</ol>
<h2>Conclusion</h2>
<p>If you have any comments or observations or would like to request or share information on how to backup a particular program, send me an email on <a href="mailto:chribonn@gmail.com">chribonn@gmail.com</a>.<br />
<h3>Last 3 posts by chribonn</h3><ul><li><a href="http://www.backupmyhost.com/blog/basics/when-green-is-bad/">When Green Is Bad</a> - July 5th, 2010</li><li><a href="http://www.backupmyhost.com/blog/basics/what-your-backup-solution-should-be-and-do/">What your backup solution should be and do</a> - June 27th, 2010</li><li><a href="http://www.backupmyhost.com/blog/enterprise/securing-your-online-backup-archives/">Securing your online backup archives</a> - May 12th, 2010</li></ul></p>

<!-- Quick Adsense Wordpress Plugin: http://techmilieu.com/quick-adsense -->
<div style="float:none;margin:0px;">
<script type="text/javascript"><!--
google_ad_client = "pub-8456896426992435";
/* Homepage, 300x250, side bar */
google_ad_slot = "1042304518";
google_ad_width = 300;
google_ad_height = 250;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div>

<div style="font-size:0px;height:0px;line-height:0px;margin:0;padding:0;clear:both"></div>]]></content:encoded>
			<wfw:commentRss>http://www.backupmyhost.com/blog/enterprise/backing-up-resotring-and-tweaking-sage-pastel-evolution/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to restore your Microsoft Office 2007 Outlook in its entirety (Windows XP, Windows Vista and Windows 7)</title>
		<link>http://www.backupmyhost.com/blog/faq/how-to-restore-your-microsoft-office-2007-outlook-in-its-entirety-windows-xp-windows-vista-and-windows-7/</link>
		<comments>http://www.backupmyhost.com/blog/faq/how-to-restore-your-microsoft-office-2007-outlook-in-its-entirety-windows-xp-windows-vista-and-windows-7/#comments</comments>
		<pubDate>Sun, 21 Feb 2010 10:22:45 +0000</pubDate>
		<dc:creator>chribonn</dc:creator>
				<category><![CDATA[Code and Solutions]]></category>
		<category><![CDATA[FAQ]]></category>
		<category><![CDATA[Windows 7]]></category>
		<category><![CDATA[Windows Vista]]></category>
		<category><![CDATA[Windows XP]]></category>
		<category><![CDATA[Office 2007]]></category>
		<category><![CDATA[outlook]]></category>
		<category><![CDATA[restore]]></category>

		<guid isPermaLink="false">http://www.backupmyhost.com/blog/?p=335</guid>
		<description><![CDATA[You do not appreciate something until that something is no longer there. Emails, contacts and appointments are three of the most important things in the electronic world we live in. A backup solution that is easy to setup and forget about while being equally easy to restore when the need arises is the ideal candidate to ensure that you do not ever lose one bit of data.]]></description>
			<content:encoded><![CDATA[<!--Ads1-->
<p>In my entry titled “<strong><a href="http://www.backupmyhost.com/blog/faq/vista/how-to-backup-your-microsoft-office-2007-outlook-in-its-entirety/" target="_blank">How to backup your Microsoft Office 2007 Outlook in its entirety (Windows XP, Windows Vista and Windows 7)</a></strong>” I described how to backup the Microsoft Outlook 2007 data file together with that part of the Windows registry that stores within it the email accounts from where Outlook retrieves emails or via which emails are sent out. Today I discuss how to use that backed up information to either recover a failed computer or to transfer the settings from one computer to another. The former may happen if the hard disk fails or as a result of a malware attack while the latter would apply if you are upgrading your computer or operating system.</p>
<p><img class="alignleft size-full wp-image-336" src="http://www.backupmyhost.com/blog/wp-content/uploads/2010/02/image006.png" alt="RestoreOffice2007-1" width="204" height="197" />On your freshly formatted computer you need to install Microsoft Outlook. Accept all the defaults. After the installer completes, run Microsoft Outlook for the first time. You will be asked a number of questions. Enter anything that will allow you to proceed to the end of this process. Do not enter valid email account details because Outlook will attempt to download mail after you complete the process and since this is not the database you will be using, you do not want any messages to end up here (this can be fixed but why create a problem that will need fixing).</p>
<p> </p>
<p><span id="more-335"></span></p>
<p> <img class="aligncenter size-large wp-image-338" src="http://www.backupmyhost.com/blog/wp-content/uploads/2010/02/image007-296x1023.jpg" alt="RestoreOutlook2007-2" width="296" height="1023" /></p>
<p><span style="color: #800000"><strong>1.</strong></span> Restore the files you had previously backed up to their original location. If you followed my previous article, the location would be <em>%USERPROFILE%\Documents</em> if you’re using Windows 7 and <em>%USERPROFILE%\My Documents</em> for Windows XP.</p>
<p>If you were using an online backup solution, you could have had a process that backed up this directory multiple times a day thereby guaranteeing that not even one email was lost when disaster struck.</p>
<p><span style="color: #800000"><strong>2.</strong></span> Delete the files created by Microsoft Outlook when you first ran it. As we did when backing up, we need to find out the default location where Microsoft Outlook places the pst database. The same steps you performed during the backup stage must be repeated:</p>
<p style="text-align: center"><img class="size-full wp-image-339 aligncenter" src="http://www.backupmyhost.com/blog/wp-content/uploads/2010/02/image008.png" alt="RestoreOutlook2007-3" width="611" height="425" /></p>
<ol type="a">
<li>With Outlook running, right click on the Personal Folders entry (1) and choose the option Properties for ‘Personal Folders’ from the short cut menu that comes up.</li>
<li>A dialog box titled Outlook Today – (Personal Folders) Properties comes up. Click on the Advanced&#8230; button (2).</li>
<li>This brings up yet another dialog box titled Personal Folders. The Filename: entry (3) depicts the location of where your Outlook data file currently resides.</li>
<li>Copy the directory location from the Filename: entry and paste it into Windows Explorer.</li>
<li>Click OK on all the dialog boxes you have just opened and shut down Outlook.</li>
<li>Delete the contents of this folder.</li>
</ol>
<p><img class="alignleft size-medium wp-image-342" src="http://www.backupmyhost.com/blog/wp-content/uploads/2010/02/image009-218x300.png" alt="RestoreOutlook2007-4" width="218" height="300" /> <span style="color: #800000"><strong>3.</strong></span> Click on the Microsoft Outlook 2007 icon to run the program. Since the pst data file is no longer there, Outlook prompts you that it cannot find this file and asks that you select the location where this file can be found. Move to the directory you have just restored and select the appropriate database. Outlook will memorize the new location.</p>
<p>A  message box comes up to tell you that Outlook must be restarted. Press the OK button.</p>
<p><span style="color: #800000"><strong>4.</strong></span> Run Outlook again and confirm that all your emails, contacts and calendar entries are present. Although everything should be there, the email account settings are missing. This is because these are not stored within the pst file but are held in the registry.</p>
<p>If you did not follow the article about how to backup this information, you will have to manually setup each email account. Search your mail provider’s website for information about how to go about it. If, on the other hand, you retained a backup of this chunk of the registry then read on.</p>
<p> <strong><span style="color: #800000">5.</span></strong> Close Microsoft Outlook.</p>
<p> <strong><span style="color: #800000">6.</span> </strong>Restore the Registry entries by double clicking on the registry file found in the directory you restored earlier. You will be asked to confirm the operation (1). You need to choose the Yes button. A warning comes up (2) to tell you that mucking up with the registry is dangerous. This is because one can easily render a computer an electronic vegetable if one deletes, adds or modifies incorrect entries to the registry—check out the backup part of this work for more about the Windows registry. Press the Yes button for this dialog box. A third dialog box (3) will tell you that the entries have been successfully added.</p>
<p style="text-align: center"><a href="http://www.backupmyhost.com/blog/wp-content/uploads/2010/02/image005.jpg"></a><img class="aligncenter size-large wp-image-351" src="http://www.backupmyhost.com/blog/wp-content/uploads/2010/02/image0051-1024x644.jpg" alt="image005" width="574" height="361" /> </p>
<p><strong><span style="color: #800000">7.</span></strong> The next time you run Outlook you will get a prompt for the password associated with each email account managed by this program. Type in the password. If you do not wish to have to enter the password every time you run Outlook, click the appropriate checkbox to save the password.</p>
<p><strong><span style="color: #800000">8.</span></strong> Confirm that everything is working as it did before.</p>
<h2>End of part 2 – Conclusion</h2>
<p>You do not appreciate something until that something is no longer there. Emails, contacts and appointments are three of the most important things in the electronic world we live in. A backup solution that is easy to setup and forget about while being equally easy to restore when the need arises is the ideal candidate to ensure that you do not ever lose one bit of data.</p>
<p>Your comments and opinions are welcome. Is there a program you would like to backup but do not know how to go about it? Did I miss something out in my article on how to backup and restore of Microsoft Outlook 2007? Leave a comment or email me on <a href="mailto:chribonn@gmail.com">chribonn@gmail.com</a>.</p>
<h3>Last 3 posts by chribonn</h3><ul><li><a href="http://www.backupmyhost.com/blog/basics/when-green-is-bad/">When Green Is Bad</a> - July 5th, 2010</li><li><a href="http://www.backupmyhost.com/blog/basics/what-your-backup-solution-should-be-and-do/">What your backup solution should be and do</a> - June 27th, 2010</li><li><a href="http://www.backupmyhost.com/blog/enterprise/securing-your-online-backup-archives/">Securing your online backup archives</a> - May 12th, 2010</li></ul>


]]></content:encoded>
			<wfw:commentRss>http://www.backupmyhost.com/blog/faq/how-to-restore-your-microsoft-office-2007-outlook-in-its-entirety-windows-xp-windows-vista-and-windows-7/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to backup your Microsoft Office 2007 Outlook in its entirety</title>
		<link>http://www.backupmyhost.com/blog/faq/vista/how-to-backup-your-microsoft-office-2007-outlook-in-its-entirety/</link>
		<comments>http://www.backupmyhost.com/blog/faq/vista/how-to-backup-your-microsoft-office-2007-outlook-in-its-entirety/#comments</comments>
		<pubDate>Wed, 27 Jan 2010 16:32:00 +0000</pubDate>
		<dc:creator>chribonn</dc:creator>
				<category><![CDATA[Code and Solutions]]></category>
		<category><![CDATA[Windows 7]]></category>
		<category><![CDATA[Windows Vista]]></category>
		<category><![CDATA[Windows XP]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[backup media]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://www.backupmyhost.com/blog/?p=283</guid>
		<description><![CDATA[Many people use Microsoft Outlook to download mail from their POP3 or IMAP server. While some may only link their Outlook to one particular email, many today have multiple email accounts all pouring into the same data file. Backing up Microsoft Outlook consists essentially of backing up two different components; the pst file that stores [...]]]></description>
			<content:encoded><![CDATA[<p>Many people use Microsoft Outlook to download mail from their POP3 or IMAP server. While some may only link their Outlook to one particular email, many today have multiple email accounts all pouring into the same data file. Backing up Microsoft Outlook consists essentially of backing up two different components; the <em>pst</em> file that stores messages (or in the case of IMAP a cached version of the server) together with the registry entry that stores all the different email accounts that are being processed by Outlook.</p>
<h2>Backing up the data file</h2>
<p>The folk who decided on the default location of the Outlook data file chose a location that is difficult to figure out.  Also when installing Outlook (or when running it for the first time) there is no way to specify a different folder.</p>
<p><span id="more-283"></span></p>
<h3>Changing the default location</h3>
<p>The first thing I am going to demonstrate in this tutorial is how to move your existing Outlook files to a more humane location under the Windows 7 <em>Documents</em> (or Windows XP <em>My Documents</em>) folders.</p>
<p><a href="http://www.backupmyhost.com/blog/wp-content/uploads/2010/01/BackupOff2007-1.jpg"><img class="aligncenter size-full wp-image-284" src="http://www.backupmyhost.com/blog/wp-content/uploads/2010/01/BackupOff2007-1.jpg" alt="BackupOff2007-1" width="558" height="432" /></a></p>
<p>Open Outlook which I am assuming you are already running.</p>
<ol>
<li>Right click on the <em>Personal Folders</em> entry (1) and choose the option <em>Properties for ‘Personal Folders’</em> from the short cut menu that comes up. If your folder has a different name, Personal Folders will be called differently.</li>
<li>A dialog box titled <em>Outlook Today – (Personal Folders) Properties</em> comes up. Click on the <em>Advanced&#8230;</em> button (2).</li>
<li>This brings up yet another dialog box titled <em>Personal Folders</em>. The <em>Filename: </em>entry (3) depicts the location of where your Outlook data file currently resides.</li>
<li>Copy the directory location from the <em>Filename:</em> entry and paste it into a Windows Explorer window.</li>
<li>Click OK on all the dialog boxes you have just opened and shut down Outlook.</li>
<li><a href="http://www.backupmyhost.com/blog/wp-content/uploads/2010/01/BackupOff2007-2.jpg"><img class="alignright size-full wp-image-285" src="http://www.backupmyhost.com/blog/wp-content/uploads/2010/01/BackupOff2007-2.jpg" alt="BackupOff2007-2" width="271" height="98" /></a>Move the folder that contains the Outlook files to a more appropriate location. I would suggest under <em>%USERPROFILE%\Documents</em> if you’re using Windows 7 and <em>%USERPROFILE%\My Documents</em> if you’re still happily using Windows XP.</li>
</ol>
<p><a href="http://www.backupmyhost.com/blog/wp-content/uploads/2010/01/BackupOff2007-3.jpg"><img class="alignleft size-full wp-image-288" src="http://www.backupmyhost.com/blog/wp-content/uploads/2010/01/BackupOff2007-3.jpg" alt="BackupOff2007-3" width="347" height="477" /></a></p>
<p>Click on the Microsoft Outlook 2007 icon to run the program. Since you have moved the original location of the data file, you will get a message box telling you that Outlook can no longer find the pst file in its original location (1).</p>
<p>Clicking OK on the dialog box brings up a file selection screen that allows you to specify the new location where you had shifted your Outlook data files. Move to the new location, click on the pst file and hit the Open Button (2).</p>
<p>Another message box comes up to tell you that Outlook must be restarted. OK that.</p>
<p>The second time onwards Microsoft Outlook 2007 will automatically find your files no questions asked. And the directory where all your important emails reside is now in an easy to find location in your Documents folder together with all your other important stuff.</p>
<h2>Backing up the registry</h2>
<p>Microsoft Outlook retains your email account settings within the registry. This means that when the time comes to reinstall your computer, unless you have saved your registry Outlook settings you will have to re-enter all the email accounts you process using Outlook 2007. If you happen to have a single Gmail account this might not be that much of a problem (provided you still remember how to do it) but if, like me, you have almost a dozen email accounts flowing into your Outlook remembering each mailbox’s parameters can be time consuming.</p>
<p>A word of warning about handling the registry: unlike many programs, the registry program does not have an undo or an undelete option and changes go into effect immediately. If you delete a file by mistake you can pull it out of limbo by visiting the Recycle Bin. If you screw up a document, pressing undo will take you back one action at a time until you reach the stage before the oops or, if necessary, you can abandon all changes done during that session simply by not saving the updated document. None of this exists in the registry so be cautious.</p>
<p>In Windows 7, type <em>regedit</em> in the <em>Search Programs and Files</em> to run the registry program. With Windows XP, type the same command in the <em>Run&#8230;</em> box. Both options can be accessed from the Start Menu. Windows 7 will bring up a dialog box asking you to confirm your action. You should say yes in order to run the program.</p>
<p><img class="size-full wp-image-289 alignnone" src="http://www.backupmyhost.com/blog/wp-content/uploads/2010/01/BackupOff2007-4.jpg" alt="BackupOff2007-4" width="571" height="434" /></p>
<p>Navigate to the registry key HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles (1). Each profile you have defined will appear under this key. In my case there is one profile called <em>Outlook</em>.</p>
<p>Right click on <em>Outlook</em> and choose the option <em>Export </em>from the menu that comes up. I suggest that you place the registry snippet you are saving in the same location as the Outlook data files. This ensures that all your Microsoft Outlook related data is in one easy-to-backup folder.</p>
<p><img class="size-full wp-image-290 alignnone" src="http://www.backupmyhost.com/blog/wp-content/uploads/2010/01/BackupOff2007-5.jpg" alt="BackupOff2007-5" width="531" height="160" /></p>
<h2>End of part 1 – Conclusion</h2>
<p>By backing up the folder to an online backup service you can rest assured that whenever something happens to your computer all your emails and the mailbox settings can be retrieved with ease. If you add a new email account or remove one you no longer use, you should export the registry settings again.</p>
<p>When backing up your Outlook data files, Outlook should be shut down.</p>
<p>Although I have not mentioned Windows Vista, the procedure for Windows 7 is almost identical to that of Windows Vista.</p>
<p>Next time I will describe how to use the information you have saved to restore your Microsoft Outlook 2007 in case of corruption. I’ll also throw in how you can use this backed up data when upgrading your computer from Windows XP to Windows 7.</p>
<p>We all appreciate how important emails are to us. Back them up regularly.<br />
<h3>Last 3 posts by chribonn</h3><ul><li><a href="http://www.backupmyhost.com/blog/basics/when-green-is-bad/">When Green Is Bad</a> - July 5th, 2010</li><li><a href="http://www.backupmyhost.com/blog/basics/what-your-backup-solution-should-be-and-do/">What your backup solution should be and do</a> - June 27th, 2010</li><li><a href="http://www.backupmyhost.com/blog/enterprise/securing-your-online-backup-archives/">Securing your online backup archives</a> - May 12th, 2010</li></ul></p>
]]></content:encoded>
			<wfw:commentRss>http://www.backupmyhost.com/blog/faq/vista/how-to-backup-your-microsoft-office-2007-outlook-in-its-entirety/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rsync on Windows Platform</title>
		<link>http://www.backupmyhost.com/blog/code-and-solutions/rsync-on-windows-platform/</link>
		<comments>http://www.backupmyhost.com/blog/code-and-solutions/rsync-on-windows-platform/#comments</comments>
		<pubDate>Thu, 12 Nov 2009 22:27:38 +0000</pubDate>
		<dc:creator>George</dc:creator>
				<category><![CDATA[Code and Solutions]]></category>
		<category><![CDATA[rsync]]></category>
		<category><![CDATA[script]]></category>

		<guid isPermaLink="false">http://www.backupmyhost.com/blog/?p=136</guid>
		<description><![CDATA[Setup files



Addendum

]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><a title="cwrsync(Code).rar" href="http://www.backupmyhost.com/blog/downloads/cwrsync(Code).rar">Setup files</a></p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="560" height="340" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/CvwdkZLNtnA&amp;hl=en_US&amp;fs=1&amp;" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="560" height="340" src="http://www.youtube.com/v/CvwdkZLNtnA&amp;hl=en_US&amp;fs=1&amp;" allowfullscreen="true" allowscriptaccess="always"></embed></object></p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="560" height="340" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/b5u-0As8x_U&amp;hl=en_US&amp;fs=1&amp;" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="560" height="340" src="http://www.youtube.com/v/b5u-0As8x_U&amp;hl=en_US&amp;fs=1&amp;" allowfullscreen="true" allowscriptaccess="always"></embed></object></p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="560" height="340" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/Dmq_9Tom1UM&amp;hl=en_US&amp;fs=1&amp;" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="560" height="340" src="http://www.youtube.com/v/Dmq_9Tom1UM&amp;hl=en_US&amp;fs=1&amp;" allowfullscreen="true" allowscriptaccess="always"></embed></object></p>
<p><strong>Addendum</strong></p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="560" height="340" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/kkVAy3OGmgE&amp;hl=en_US&amp;fs=1&amp;" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="560" height="340" src="http://www.youtube.com/v/kkVAy3OGmgE&amp;hl=en_US&amp;fs=1&amp;" allowfullscreen="true" allowscriptaccess="always"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://www.backupmyhost.com/blog/code-and-solutions/rsync-on-windows-platform/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rsync – A Top-View Introduction (Flash Animations)</title>
		<link>http://www.backupmyhost.com/blog/code-and-solutions/rsync-%e2%80%93-a-top-view-introduction-flash-animations/</link>
		<comments>http://www.backupmyhost.com/blog/code-and-solutions/rsync-%e2%80%93-a-top-view-introduction-flash-animations/#comments</comments>
		<pubDate>Tue, 27 Oct 2009 15:58:47 +0000</pubDate>
		<dc:creator>chribonn</dc:creator>
				<category><![CDATA[Code and Solutions]]></category>
		<category><![CDATA[delta backups]]></category>
		<category><![CDATA[remote backup]]></category>
		<category><![CDATA[rsync]]></category>

		<guid isPermaLink="false">http://www.backupmyhost.com/blog/?p=78</guid>
		<description><![CDATA[How does RSync work? This falsh animations should explain why online backups using this algorithm are the most appropriate.]]></description>
			<content:encoded><![CDATA[<p>The following are a couple of flash animations to demonstrate how online backups function. I&#8217;ll add more animations to cover different scenarios soon.</p>
<p><a href="http://www.backupmyhost.com/blog/wp-content/uploads/2009/10/RSync.swf" target="_blank">RSync: The first time a file is transfered</a></p>
<p><a href="http://www.backupmyhost.com/blog/wp-content/uploads/2009/10/RSync1.swf" target="_blank">RSync: What happens when the source file changes.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.backupmyhost.com/blog/code-and-solutions/rsync-%e2%80%93-a-top-view-introduction-flash-animations/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rsync – A Top-View Introduction</title>
		<link>http://www.backupmyhost.com/blog/code-and-solutions/rsync-%e2%80%93-a-top-view-introduction/</link>
		<comments>http://www.backupmyhost.com/blog/code-and-solutions/rsync-%e2%80%93-a-top-view-introduction/#comments</comments>
		<pubDate>Sat, 17 Oct 2009 13:15:18 +0000</pubDate>
		<dc:creator>chribonn</dc:creator>
				<category><![CDATA[Code and Solutions]]></category>
		<category><![CDATA[delta backups]]></category>
		<category><![CDATA[online backups]]></category>
		<category><![CDATA[rsync]]></category>

		<guid isPermaLink="false">http://www.backupmyhost.com/blog/?p=58</guid>
		<description><![CDATA[The performance increases between a copy-all backup and one using Rsync can be more than 110 times. All data transmitted by Rsync is actually compressed and is encrypted using SSL. For online backups the Rsync method is the best way to guarantee that backups are fast, secure, and non-intrusive and actually get done.

]]></description>
			<content:encoded><![CDATA[<p>Even with today’s ultra fast fibre optic data lines, the tangible throughput people actually get when transferring files is still functionally limited. This is compounded further by the fact that the majority of uses have low upload speeds compared to higher download speeds. For example a typical home internet connection would promise 4Mbit download while only 256Kbit would be allocated for upload. To make matters worse, today files are many times larger than their ancestors.  If your hair has greyed (or fallen off) in sufficient quantities, you probably recall a time when a 1.2MB floppy disk would hold all your documents as well as the word processing program itself with space to spare. This thousand word document is over 6 times larger than that floppy disk!</p>
<p>In this environment, when one discusses online backups, the critical issue is to try to limit as much as possible the amount of data that has to be uploaded from the person’s computer (the source) to that person’s archive vault (the destination).   Many people would consider online backups only if the lengthy wait periods are few and far between.</p>
<p>On a regularly backed up system, the state of the source compared to the destination can be as follows:</p>
<ul>
<li>New file on source that does not exist on the destination – the file must be copied over to the archive vault;</li>
<li>File on source that no longer exists on the destination – the file must be removed from the archive vault;</li>
<li>File on source and destination are identical – no need to do anything;</li>
<li>File on source is different from that on destination.</li>
</ul>
<p>On a system that is regularly backed up, one would normally find few files that are new or that have been deleted. The majority of files would either have not changed or would have been altered.  As I will demonstrate shortly, the Rsync algorithm for transferring data from source to destination is greatly suited for situations in which a file has been adjusted.  There are two ways a system can handle altered files, resending the adjusted files in its entirety or simply transferring the changed pieces. The Rsync algorithm does the latter.</p>
<p>The Rsync algorithm was developed by Andrew Tridgell and Paul Mackerras. Taking a data backup using the Rsync method results in ultra fast and efficient backups. Imagine a database, worksheet or word processing document in which the author only changed one record, cell or paragraph.  Take your PIM database; on a daily basis you receive new emails, delete junk and old mail, setup appointments and have the system remove expired ones.  Rsync backups will transmit a few megabytes of changes rather than let you wait until all modified files (that probably run into gigabytes) are uploaded.</p>
<p><strong>The Rsync algorithm</strong></p>
<p><img class="aligncenter size-large wp-image-62" title="Rsync – A Top-View Introduction1" src="http://www.backupmyhost.com/blog/wp-content/uploads/2009/10/Rsync-–-A-Top-View-Introduction1-457x1024.jpg" alt="Rsync – A Top-View Introduction1" width="457" height="1024" /></p>
<p>The file on the archive server (the destination file that needs to be updated) is split into a number of blocks of equal size (the last block could be an exception). For each block a signature is generated.</p>
<p><img class="aligncenter size-medium wp-image-61" title="Rsync – A Top-View Introduction2" src="http://www.backupmyhost.com/blog/wp-content/uploads/2009/10/Rsync-–-A-Top-View-Introduction2-300x146.jpg" alt="Rsync – A Top-View Introduction2" width="300" height="146" /></p>
<p>The signature consists of a quick-to-compute 32 bit checksum (I’ll explain the rolling capability later on) as well as a 128 bit checksum. In Rsync, the MD5 (Message digest) algorithm is now being utilised.</p>
<p>The block number as well as the associated signatures for each block is transmitted to the source computer. The source computer takes the 32 bit low computational checksum of each block and generates a simple 16 bit hash value.</p>
<p>Simplistically speaking, the source end will transmit to the destination how to reconstruct the file using either literal data transmitted from the source to the destination or by telling the destination to utilise a block already present at its end.</p>
<p style="text-align: center;"> <img class="aligncenter size-full wp-image-66" title="Rsync – A Top-View Introduction3" src="http://www.backupmyhost.com/blog/wp-content/uploads/2009/10/Rsync-–-A-Top-View-Introduction3.jpg" alt="Rsync – A Top-View Introduction3" width="819" height="626" /></p>
<p>At the source, a block of identical size as those computed at the destination is analysed and the low overhead 32 bit checksum is generated. Its 16 bit hash is compared to those computed from the destination 32 bit checksums. If no match is found than the code that deals with a nonexistent block kicks in.</p>
<p>If the hashes match, the 128 bit checksum is computed on the source block and this is compared to the 128 bit blocks received from the destination that have the same hashing function (there may be more than one) as the source. If no match is found, the code that deals with a nonexistent block kicks in.</p>
<p>If a destination block is matched, the source sends an instruction to the destination to copy the block having a particular index to the new output file. The position at the source is advanced forward the length of the block and the process loops.</p>
<p>The logic behind the nonexistent block is as follows:</p>
<ol>
<li>It transmits the character at the beginning of the block to the destination to append to the file that is being reconstructed;</li>
<li>Advances the block by one character and repeats the process.</li>
</ol>
<p style="text-align: center;"> <img class="aligncenter size-full wp-image-65" title="Rsync – A Top-View Introduction4" src="http://www.backupmyhost.com/blog/wp-content/uploads/2009/10/Rsync-–-A-Top-View-Introduction4.jpg" alt="Rsync – A Top-View Introduction4" width="819" height="258" /></p>
<p>Point 2 explains where the rolling 32 bit algorithm comes into play. By having a rolling 32 bit algorithm, the computational overhead necessary to calculate the new CRC is minimised further since all that is necessary would be to subtract the value of the byte of the previous start of block and add the value of the byte at the new (shifted) end of block. The alternative would have to sum up the range again and this consumes more computing cycles.</p>
<p>The performance increase between a copy-all backup and one using Rsync can be more than 110 times. All data transmitted by Rsync is actually compressed and is encrypted using SSL. For online backups the Rsync method is the best way to guarantee that backups are fast, secure, and non-intrusive and actually get done.</p>
<p>In a future article I’ll give some practical examples to explain how Rsync deals with different file situations, namely adding new data at various positions within a file, deleting data from different positions within a file and altering data. For more in depth information on Rsync, you might want to visit the Rsync home page at <a href="http://rsync.samba.org/">http://Rsync.samba.org/</a> as well as spend a couple of evenings reading through Andrew Tridgell’s paper Efficient Algorithms for Sorting and Synchronization.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.backupmyhost.com/blog/code-and-solutions/rsync-%e2%80%93-a-top-view-introduction/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
