A Safer Backup under Windows 95 By John Fagerberg Copyright 1995 This approach was developed by me with the help of Microsoft and Colorado Tech. support during the development of Windows 95. I needed it because I was using a Colorado T1000 tape (not supported by MS Backup), I needed an emergency way to restore my system (not involving the install windows 95, just to do a restore), and because there were many bugs in the MS Backup software at the time (I can't comment now, because this is the only approach I use.) After I shared this approach, I got a lot of good feedback, so I decided to write it up in detail. One user needed to replace her C-drive. This technique allowed her to do so in a couple hours (including backup/restore time). The general approach is to exit to DOS from Windows 95, backup your Long File Names, backup the disk to tape, and restore your long file names. For Stacker 4.1 users, there is an easier technique shown after the main approach. I hope that you find this information helpful. If you do, don't be afraid to let me know. Table of Contents I. DISCLAIMER II. PREREQUISITES III. DETAILED PROCEDURE (Current as of Build 490 & 950 of Windows 95) IV. FOR STACKER 4.1 USERS V. EMERGENCY RESTORES OF AN ENTIRE DISK VOLUME (Read this now, not when you have need for one) VI. PARTIAL RESTORES (Important) VII. SOMEONE WANT TO WRITE A UTILITY? I. DISCLAIMER: This technique has been used successfully by a bunch of people, however, I will take no responsibility for problems that arrive from using it. I highly recommend that you run scandisk on all your drives before starting. And test it on your system. II. PREREQUISITES You will first need to copy the LFNBK files from Admin\Apptools\Lfnbk on your Windows 95 CD. I would recommend placing them in C:\Windows\Command. Copy both LFNBK.EXE and LFNBK.TXT (then read the txt file in case something changes between the time I write this and your using it). You will also need the DOS backup software that came with your tape drive. It should be installed on a hard disk. III. DETAILED PROCEDURE (Current as of Build 490 & 950 of Windows 95) NOTE: Before you start, if you have MS System Agent running; turn it off by going into System Agent's Advanced settings and click on "Stop using System Agent." This Program can run multiple program with what effect, we won't know. Since you will eliminating Long File Names, let's not find out. SPECIAL NOTE FOR COMPRESSED DRIVE USERS: Be sure and backup the files on your uncompressed "C" drive (excluding the compressed volume). The uncompressed drive is the real "C" drive that has been renamed to another drive letter after booting. If you have to rebuild your "C" drive, you may have to reformat the drive, then recompress it, restore these files, and then restore the rest of the volume. 1) The first thing you have to do is turn off LFN Tunneling. This is accomplished by Right-clicking "My Computer" (or whatever you've renamed it to). Select properties, then the Performance Tab, press the File System button. Now, check the box next to "Disable long name preservation for old programs." Close everything you opened here. The system will then ask to be rebooted. Do it. 2) When windows 95 comes back up, open a DOS window. You will use LFNBK to back up the LFNs on all the drives that you are going to backup. For each drive type LFNBK /B x: (where x: is the drive letter) NOTE: When you do this to your C-drive, your desktop icons will change to short names & may move. Just ignore this. 3) Now that you've backed up all the LFNs, you can exit Windows 95 to DOS and run the DOS backup software that come with your tape drive. Press the Start button and select Shut Down/Restart the computer in MS-DOS Mode. 4) Run full backups for all the drives that you prepared in step 2. NOTE: Make sure that you backup program backs up Hidden and System files. You wouldn't want to find out when you need to restore. There may be a setting in the backup program's options for this, if so, turn it on. 5) When the backups are done, reboot your computer. Don't panic when your desktop and start button groups appear differently (this stuff was stored under long file names). 6) Open a DOS window and restore the LFNs by typing: LFNBK /R x: (as in step 2) 7) Now repeat the steps in step 1 (above) only un-check "Disable long name...." When you close the windows, you will end up rebooting again. 8) Lastly, if the icons on your desktop are not as you like them, re-arrange them & your done. IV. FOR STACKER 4.1 USERS The SAVELFN utility that comes with Stacker 4.1 makes this whole procedure much simpler. I have suggested to Stac that they release this as a cheapie utility. 1) Exit to DOS from Windows 95 2) Back up the LFNs on all the drives that you are going to backup. For each drive type SAVELFN /B x: (where x: is the drive letter) 3) Run full backups for all the drives that you prepared in step 2. 4) Restore the LFNs by running SAVELFN /R x: (x: as in step 2) 5) Reboot system. I've even taken this one step farther and created batch file for steps 2, 3, & 4 (I wasn't brave enough to combine them.) This way, I just type three commands to do the whole thing (and have a movie rented for the time between). V. EMERGENCY RESTORES OF AN ENTIRE DISK VOLUME (Read this now, not when you have need for one) If you place your DOS tape utilities on a bootable floppy, you will be able to restore your system without having to install Windows 95 to do it. Please note however that you may want to restore all volumes so that everything agrees (hint: do frequent backups). SPECIAL NOTE: If you have to format you "C" drive from floppy disk, the /S option on format will NOT setup your MSDOS.SYS file correctly. Therefore, When you restore make sure that the option on your tape restore program is set to overwrite duplicate/existing files. This will ensure that the file gets restored from tape. In fact, don't bother to use the /S option on the format. Your going to restore these files too. NOTE: If you are using disk compression and you have to format the drive, compress the empty volume before proceeding. ALSO, see the special notes above the backup procedure about restoring the files on the uncompressed volume. Because you backed up the LFN backup files along with the data on each volume, you can restore them after restoring the volume. 1) Restore your disk volumes from tape. 2) Follow the procedure described above starting after the tape backup: Without Stacker 4.1: a) start Windows 95 b) Run LFNBK /R x: (Where x: is the volume restored) c) Turn on LFN Tunneling d) After reboot, re-arrange desktop icons if necessary With Stacker 4.1: a) Still in DOS (from restore), run SAVELFN /R x: (Where x: is the volume restored) b) Restart Windows 95 VI. PARTIAL RESTORES (Important) Because LFNs have been backed up at the time you make the tape backup, files that use LFNs cannot be restored with the LFN. If you can find the file with the short name, you can restore it (preferably in another directory), then rename it to the actual LFN. Also, if a file resides in a directory that is a long name, it will be shortened on the backup tape. You will have to find it using the short named directory. VII. SOMEONE WANT TO WRITE A UTILITY? If you'll notice, the reason for running LFNBK /B or SAVELFN /B was to get a backup of the LFNs. The backup program will ignore them, so we really didn't need to remove them. After the backup, we have to restore the LFNs because these programs removed them. What we really need is a utility that will create a backup (on disk) of the LFNs without removing them. This utility would also be able to restore the LFNs after we have restored a tape backup to disk. Ideally, this utility would allow you to selectively restore LFNs to a particular file, directory, or a directory and its sub-directories (OOPS, those are folders now aren't they! :)) Good luck. I hope this makes your archivals a little easier. John Fagerberg Internet - fagerbej@herndon.bytex.network.com CompuServe - 76276,2042 AOL - GfxJohn