Using UniMaint to Automatically Back Up the Desktop



By: Walter Metcalf
Dateline: 03/31/99

Why back up the Desktop?

For most people the Workplace Shell (aka Desktop) is the main or only interface between the user and his/her computer, and is therefore very  important. Because it is the primary means of communication with their computer, a great many users customize the Desktop to make it as efficient and comfortable as possible for them to use. If you use the Desktop you almost certainly customize it at least to the extent of adding the many of the programs you have installed on your computer.

If you have booted up OS/2 successfully even once, you know generally what the Desktop is. For the purposes of this feature, we need a more precise definition of the term Desktop. In fact having a more precise definition will help keep you from becoming confused as you use OS/2 more in the future. Unfortunately, the Desktop is not stored in one convenient location; it is stored in a number of a different files or parts of files on the boot drive:

  1. /Desktop directory tree
  2. /OS2/OS2SYS.INI
  3. /OS2/OS2.INI
  4. CONFIG.SYS
  5. /OS2/DLL/DOCKnn.CFG (WarpCenter)

Any time you add or delete an object to the desktop, or change the colour, position, etc. of a Desktop object, the new information is recorded in the above files. However this data, especially in the *.INI files, is not immediately written to the hard disk. That doesn't occur until an express command is given or until the system is shut down. If the system locks up, or the power fails, then these changes will not be saved.

A worse problem can arise if the system becomes corrupt and needs to be re-installed. Other scenarios can easily be envisioned which will result in the Desktop being reset to its installation state. In any of these cases you will have lost all the time, possibly many hours, you spent customizing the Desktop.

To further complicate matters, you probably won't remember  all  the settings you changed; third-party programs have probably created icons, changed settings, and created icons, objects, etc. Complete restoration of even a moderately complex Desktop can be a very difficult task.

Fortunately there are several simple ways to back up your Desktop, that is, the information in the aforementioned files. Some examples I have used include the built-in Desktop Archive utility, WorkPlace Shell Backup, ObjectBackup (a component of Object Desktop), and UniMaint.

UniMaint - Preliminary remarks

In my opinion, UniMaint is the best choice for backing up your Desktop for several reasons:

  1. UniMaint is well worth having in its own right. It's has long been on my "must-have" list.

  2. The Desktop Backup feature is highly customizable to the way you use your computer so you can adjust the frequency of the backup and can add any additional files you like to the standard ones.

  3. Both the testing cycle and back up cycle are run as normal tasks and so do not interfere with your use of the computer. All you notice is a slight increase in disk drive activity for a few seconds.

Setting up the backup

The rest of this feature, then, will be devoted to setting up and using UniMaint to automatically back up and restore your Desktop. I will also proceed on the assumption that you have purchased and installed UniMaint.

  1. Start UniMaint and click on "Desktop" on Main Menu. Select "Defaults".

    1. Click in the "Select New Desktop Save Dir" box. Choose an existing  drive/directory to hold the saved Desktop information and the CMD files, and click on "OK" when done.

    2. Click on each of the next four boxes in turn, and accept the default shown by clicking on "OK". The "User Backup" entries are not needed and can be ignored.

    3. Click on "OK" to exit the "Desktop Defaults" window and return to the main UniMaint window.

  2. Select Desktop from the Menu and click on "Auto Backup Defaults".

    1. These settings control the frequency of the backups.The defaults are acceptable, but tend to produce fairly infrequent backups. I recommend you make the following changes:

      1. Change "Min. days ... Backups" to 1;

      2. Change "Max days ... Backups" to 2;

      3. Change "Total Modifications" to 10; and

      4. Change "Object Modifications" to 5

        Note: If you find UniMaint is backing up too often, increase the Modifications or set them to 0 (=ignore). You can also change the Days settings if changing the Modifications does not work.

    2. Click on the box labelled "Select New Auto Backup Control File" and click on "OK" to select the default.

    3. Repeat the process with the box labelled "Select New Logging File".

  3. As before select Desktop, and click on "Select Supplemental ...."

      A word of explanation is in order. UniMaint already knows what files it has to save for your Desktop. They consist of the aforementioned files. So one phase of the Backup is already done. This step allows you to add whatever files you want.

    1. You are presented with a worksheet already containing CONFIG.SYS plus some buttons to help you add or delete filenames to/from the worksheet.

    2. First, click on "ADD DOS". If you have DOS and/or Win-OS/2 installed on your system, UniMaint will automatically add the configuration files necessary for both operating systems.

    3. Next, click on "ADD". Now you may add any files you wish, even ones unrelated to the Desktop.

      Tip: To add a group of similar files, select one of them, highlight a group of characters at the end, and replace them with an asterisk.

  4. Click on "Desktop" on the Menu, and select "Backup Desktop" to make your first Desktop backup!

    Notes

    1. By default, UniMaint automatically runs a Supplemental Backup when a Desktop Backup is run and likewise for the Desktop restore. Should you wish to disable the feature, you can do so on the Desktop Defaults page.

    2. Note the last 4 items on the "Desktop" menu. Use these to recreate the CMD files should they get accidentally deleted or corrupted.

  5. Close the UniMaint program, and open the UniMaint folder. Find the UniWatch program, and create a shadow of it in the Startup folder, located in the OS/2 System folder.

    • You are done! UniWatch will check your system periodically and according to the settings you chose on the Auto Backup Defaults page, the Desktop and other files selected will be backed up and saved.

Restoring the Desktop

The first thing to observe is that you cannot restore a Desktop while booted from your normal system. You have to boot from an alternative system such as:

  • Installation diskettes;
  • The command-line prompt obtained by pressing "ALT-F1" while the OS/2 white block is displayed during boot-up¹

The maintenance partition is easier to use, especially if a WPS is included, and quicker than the alternatives.

The first step, then, is to choose the interface from which you wish to do the restore. For the rest of the section, I'll assume you've booted from your choice.

  1. Delete the complete Desktop.

    1. The CMD restore program runs a UniMaint utility to do this; however you may find this utility does not always work. I prefer to do it manually just before I start the SysRestr program. There are several programs to delete complete directory trees. I have found the Deltree program contained in the Gammatech Utilities very powerful and easy to use for this purpose. A freeware program called blowoff is available on Hobbes, and is said to be very effective in this regard. I have not tested it, however.

      • To permanently add the blowoff utility, for example, to the SysRestr CMD program, simply type the following statements into an OS/2 editor:

        rem :-
        rem :- Call blowoff to delete Desktop tree
        rem :- Note: "x" is the boot drive for the main system.
        rem :-

        blowoff x:\desktop

        rem :-
        rem :- Run UniMaint-created SysRestr CMD file to re-create customized Desktop.
        rem :- Note:- %1 is the generation number. If omitted, SysRestr will assume 01;
        rem :- i.e. the most recently backed up version.

        sysrestr %1
        exit

      • Save the file with a name ending in SysRest.cmd (or other similar name) in same directory where SysRestr.cmd is saved.

      • Copy the blowoff.exe file into the SysRestr.cmd directory.

    2. Choose the Desktop generation you wish to restore. Tip: if you are using one of the command-line prompts, go to the drive/path you specified as the Desktop Save Directory and type DIR SYSBCK* /P. If you can remember the last time the Desktop was good, choose the generation (i.e. the last two digits of the filename) of the backup closest to, but before, that time. Let's say the generation is 05.

    3. Then type SysRestr (or SysRest) 05 <Enter>.

    4. Press <Enter> again.

    5. Your Desktop should be restored in a minute or two.

    6. Shutdown your system if necessary, and reboot.

      Next time: Installing and setting up OS/2 for the beginner. Everything you need to know to set up a complete system.

Unless otherwise noted, all content on this site is Copyright © 2004, VOICE