Guide to 'Full / Incremental / Differential Backups using WinRAR'
by Saurabh Kumar
(June 28th, 2002)

Usually, with time, the cost of data becomes much more then that of the hardware itself!
Almost every computer user, at one time or the other, requires a backup plan for his precious data.

Now, with WinRAR(http://www.rarlab.com), one can no longer make an excuse of the high costs and unavailability of professional backup solutions. Agreed that WinRAR is a compression program which is replacing ZIP and the like, due to the enhanced features it provides, but with the great flexibility offered by WinRAR common line syntax, one can easily mould WinRAR in a complete backup solution!
You may already have WinRAR on your hard disk, so why not start using it for your backups?

Note1: You do not need to rename the backup files to remember when it was made. A WinRAR switch, which I utilized, automatically prepends the current date to the archive name. So you can make backups daily, without the need of manually renaming files!

Note2: You may need to change the location of your data files to be backup, for which usually you will need to open up the shortcut, batch file etc. This will have the risk of accidentally deleting/modifying some switch in the long list of switched used. To combat this, a simple text file is used, which contains the base path to be backup.
Just open the text file and alter the file to your needs!
What's more, you can add more backup source paths, one line at a time! (but remember to remove the ‘-ep1’ switch before adding more than one paths)

p.s.: Did you know that using WinRAR your backup file size can be as big as a whooping 8,589 billion gigabytes in size!?!
 

Backups Methods Outlined:
Full Backup
Incremental Backup
Differential Backup

All the below plans  backup all the files in the backup source path, and all it’s subfolders, including empty folders.

 

Full Backup

Intro: This is a backup of ALL the existing files in source folder.
Comment: This backup may be done once a while to get a complete snapshot of all the file at that moment.
Restoration: To restore a file, files can be directly retrieved from this archive (if no newer backup exists)

Command line:
winrar.exe a -se -rr3% -ac -ag+YYYYMMDD_full_ -k -m5 -ms -os -r -ep1 e:\mydoc.rar @mydocpath.txt
 

Command/switches used with purpose:

command/switch Purpose Used
a add files to archive
-se solid archive based on file extensions - not recommended due to data loss risk on low quality media
-ac clear archive attribute after archival
-ag+YYYYMMDD_ add current date in archive name
-k protect archive from tamper or accidental modification
-m5 use best compression (also slowest)
-ms Do not waste time in re-compressing compressed files such as ace, arj, bz2, cab, gz, jpeg, jpg, lha, lzh, mp3, rar, zip, taz, tgz, z
-os keep NTFS streams (recommended if your files are stored on NTFS)
-r recurs subfolders
-ep1 strip base folder name
-rr3% recovery record is 3% (alter as per the reliability of your media)

Back to Top

Incremental Backup

Intro: Takes backup of the files modified since the last backup.
Comment: Takes very less time as only a small number of files are usually changed daily. These are the files backup up by this method.
Restoration: To restore a file, you need to first retrieve the last FULL backup, then ALL the incremental backups up to the date required in chronologically dated order, starting from the oldest to the latest.

Command Line:
winrar.exe a -se -rr3% -ac -ag+YYYYMMDD_incr_ -k -m4 -ms -os -r -ep1 -ac -ao e:\mydoc.rar @mydocpath.txt

 

Command/switches used with purpose:

command/switch Purpose Used
All from the FULL backup As tabulate above
-ao add only the files with archive bit on
-m4 Replaced -m5 with -m4 for faster daily backups
REMOVE -m5 Replaced -m5 with -m4 for faster daily backups


Back to Top


Differential Backup

Intro: Takes backup of all files since the last FULL backup.
Comment: Takes more time to backup with time. This is because this backup backups up all files modified since the last FULL backup.
Restoration: To restore a file, retrieve the last FULL backup, and then the latest differential backup file.

 

Command Line:
winrar.exe a -se -rr3% -ag+YYYYMMDD_diff_ -k -m4 -ms -os -r -ep1 -ao e:\mydoc.rar @mydocpath.txt

 

Command/switches used with purpose:

command/switch Purpose Used
All from the FULL backup As tabulate above
-ao add only the files with archive bit on
REMOVE -ac to prevent the archive bit from changing due to backup
-m4 Replaced -m5 with -m4 for faster daily backups
REMOVE -m5 Replaced -m5 with -m4 for faster daily backups

Back to Top


Hopefully this will keep your data living 'Happily Ever After' :)
Comments/suggestions/improvements are welcome.


By Saurabh Kumar ( skrecycle@rediffmail.com)


FastCounter by bCentral