![]()
[<<]Message[>>] [<<]Author [<<]Subject[>>] Thread[>>]
Number : 1126 Date : 2001-12-10 Author : JimmyJet Subject : My backup routine Size(KB) : 2
I've posted a message previously about my backup routine, wherein I do a full clone to a removable drive once, then just wish to backup the changed files to a backup directory the rest of the week. XXCopy is a great tool, and in concert with a few other utilities it does everything I need. Just in case it might help out someone else looking to do the same thing, I hereby present my backup batch file. DailyBackup.bat =========== @echo off subst e: c:\bak :: creates drive "e:" out of c:\bak so xxcopy :: doesn't get into the whole recursive copy thing xxcopy c:\* e:\1\ /S /M /EXc:\skip /H /oAc:\bupdaily.log /PB :: xxcopies every file on c: that has the archive :: bit set (new files) to the e: drive, including :: hidden/system files, appends results to the :: log file, skips files listed in c:\skip (this list :: also contains c:\bak\*\*) subst e: /d :: get rid of the subst drive, don't need it any more md c:\bak\1\--reg xxcopy c:\windows\user.dat c:\bak\1\--reg /H xxcopy c:\windows\system.dat c:\bak\1\--reg /H :: this last block of three lines makes a directory :: in the backup area and copies the registry :: backups there (I noticed that they weren't :: being backed up in the regular xxcopy above) c:\progra~1\winzip\winzip32 -a -r -ex -hs c:\bak\bup.zip c:\bak\1\*.* :: kicks off a winzip session to compress the :: results of the backup into a single file paws one moment /t777 paws one moment /t777 :: "paws" is a freeware DOS util that pauses :: for x seconds (in this case, 777 seconds X 2) :: to allow winzip to finish its thing cd c:\bak qren bup.zip !b!d.zip :: qren is a freeware utility that renames the :: bup.zip file to month/day, such as "dec09.zip" paws one moment /t7 deltree /y c:\bak\1 :: deletes the backup files, now that they've :: been compressed as a ZIP paws one moment /t7 explorer c:\bak :: opens the bak folder, so in the morning :: I can see the results =============== In this way I save lots of space, keep all my backups in the smallest possible space, named by date. It should be noted that, as explained in the XXCopy support pages, that backing up only files with the archive bit set (using the /M switch) is not completely reliable, as the OS seems to handle the archive bit less than perfectly. In c:\skip I 've added lots of lines to ignore directories containing non-essential files that apprently never get their archive bit turned off. I've thought about using the /sz0 routine, but on a FAT32 system, doesn't a 0-byte file still occupy space (in this case, 100% slack)? So doing this for the entire hard drive would be a monstrous waste of space? Comments/suggestions welcome.
This message if part of XXCOPY's message Archive. The archive contains all the messages posted at Yahoo!Groups: XXCOPY.