|
|
|
WinRAR v.3 - The ultimate backup tool
Rar was very familiar to me from the dark years of Ms-Dos . Although it was always making better compression than pkzip , it didn't gain the popularity of zip format , probably because it was more slower & came up later . WinRAR continues the same scene . But today the decision which compressor to choose for an automated backup is certainly gained over WinRAR . See my reasons: - WinRAR has the most extensive command line support over the rest popular compression applications (WinZip & WinACE) with great difference . - WinRAR also includes rar.exe , a pure console (Ms-Dos 32bit) module in case you do not want to invole a GUI program . - WinRAR still makes very good file compression , (always better that WinZip and many times better than WinAce) .
Tips for making Backups with WinRAR
0) Introduction It was ten years before , when I wanted to make backups for business commercial applications . At those wild years , you had to make many things by your own . My aim was to make .zip files with pkzip assigning as filename the backup date in short format . For better file sorting , I display first the year , then the month and finally the date ( e.g. "991104.zip" for a 04-November-1999 zip file ) . So I made a very small program in GwBasic and later in QuickBasic that passes the right string ( e.g. "991104" ) to a batch file . 110 T$ = DATE$
1) Let's start now from the beginning. If you want to make automated backups of certain directories , first create a new directory where everything will be kept ( e.g. c:\backup ) . Now go to WinRAR directory and with the help of a text editor - like Notepad - create a new .bat file (e.g. R.bat ), located inside WinRar dir . See a typical line of a batch file winrar a c:\backup\NWServer \\NWSERVER\DATA\ -r -s -m5 -ag+yymmdd_ -ilog -inul Here is a brief explanation what these switches do: -r: Recurse Subdirectories -ag+yymmdd_ : The long awaited switch . Inserts the date string into the filename . For example in 28-November-2002 , the above batch will create the file 021128_NWServer.rar file . You can play with the date attributes according to your preferences . -ilog: Log errors to rar.log . -inul: Disables error windows
(they are useless since all errors messages are kept in the log file) .
Actually R.bat may contain many lines like: winrar a c:\backup\NWServer \\NWSERVER\DATA\ -r -s -m5 -ag+yymmdd_ -ilog -inul r6.txt: Text file that also may include many directories . Suitable for long named or foreign named directories . Take a small example of a part of my r6.txt: \\Logistirio3\c\DESK3\2692000\DESK3\*.?db
2) Test that batch . Right-click on that batch file and "Create a Shortcut" . Now copy the shortcut wherever you like and test it extensively . Proceed to the following actions only when you sure about the result . 3) Now it time to go to the "Scheduled Tasks" ( My Computer ->) and create a new task . Assign now this task with your batch file . Now you are ready !. 4) It's practical to make shortcut to rar.log in order to easily access it .
Even more Tips ...The above mentioned tips are what I used from WinRAR , but WinRAR does not stops there . You can save directly the output to zip drive or other media, breaking your backups into volumes . However this is not an automated task since you must be there to change the disks !. You can erase drive contents before saving , or you can create SFX archives , which means you do not need to have WinRAR installed when you need to extract your backup (but this increase backup size and makes difficult the file manipulation & update process ) . In most cases when we use a batch to execute some programs , the batch wait to finish one program in order to proceed to the second . WinRar does not behave in such way , so if you have a batch file with 10 lines of WinRar tasks , this will load WinRar 10 times simultaneously . This is good in terms of multitasking , but dangerous because you absorb most "User resources" , making your system unstable or facing some stacks . If you have such problem and prefer the normal sequential execution , I didn't find any other solution apart from using rar.exe instead of winrar.exe (also included in the same directory of WinRar , you don't have to ad anything) . So just replace in your batch files "WinRAR" with "Rar" . Finally all switches mentioned above can be set inside WinRAR program but in this case you have to learn dealing with "compression profiles" . However if you insist on making all from GUI, all my above mentioned settings can be set from WinRAR's menu : Option -> Settings -> General -> Compression method -> Best . [x] Create solid
archive.
Michael Hondrosmos
|