Operator Workstation User’s Manual 15-1 Chapter 15 Saving and Restoring Databases Introduction The OWS contains archived database files for the entire facility. The purpose of the save and restore functions is to back up and restore these files. The OWS can save and restore either the entire database or a single network database. The entire database includes the global database and all network databases archived at the workstation. A single network database contains all the NCM databases in the network that are archived at the workstation, and the global database for that network. This chapter describes how to: • save a database • restore a database © November 1, 2001 Johnson Controls, Inc. Code No. LIT-120157 www.johnsoncontrols.com 15-2 Operator Workstation User’s Manual Key Concepts Saving Databases Saving databases involves using a workstation to back up (on diskette) all the NCM databases and the global database of a specified network that are archived on that workstation. The process of saving databases varies slightly depending on the version of Windows software that the OWS uses (Windows 98, Windows NT, or Windows 2000 Professional). Restoring Databases The database restoration process copies (to the workstation) the database on diskettes. For example, if the diskettes contain only one network database, only that database is restored. The copy from diskette overwrites the database at the workstation. Compressed files automatically return to their normal format when restored; however, the restore process creates a temporary file, called the CONTRACT.ZIP file, to protect data during the process. The hard drive should have enough memory to hold a temporary copy of the compressed file in order to restore it. If the restore process is successful, the CONTRACT.ZIP file is automatically deleted. If the process fails, delete it manually, using DOS or the Windows File Manager. The restore process returns files to the same directory that they were in when they were saved. If a directory was empty when it was saved, the OWS recreates it during the restore process. Depending on the version of Windows software the OWS is using (that is, Windows 98, Windows NT, or Windows 2000 Professional), the method of restoring a file varies. Refer to the appropriate section in Detailed Procedures to find out how to restore a database. LOG Files During each save or restore attempt, .LOG files are created containing both error and processing information about the save or restore process. Refer to the appropriate .LOG file to find what the exact nature of failed save or restore attempt was, as well as what files should have been saved or restored. The C:\SAVEREST directory contains all .LOG files. Each subsequent save or restore overwrites the .LOG files, so there is never more than one of each of these file types on the hard drive. A detailed explanation of each of the .LOG files appears below. Operator Workstation User’s Manual 15-3 [NETWORK].LOG The save process creates and names a .LOG file according to the saved database. For example, the .LOG file for the network JCITOWER would be named JCITOWER.LOG. This file lists three types of information: • all of the files that the save process should have copied, including each of the global files and all of the network’s directories and database files • any global files that the OWS could not find. (The OWS may not find Global files if a directory or file name has been changed.) • errors that occur during the save process. Errors may or may not cause the save process to fail. DIRFILES.LOG The DIRFILES.LOG file, located in the \SAVEREST directory, lists all of the directories to be saved during the save process. The PC uses this file for internal processing and deletes it automatically when the save is complete; however, if the save fails, DIRFILES is not deleted. The next save attempt overwrites this file. However, this file consumes a small amount of memory; to conserve disk space, delete the file manually. RESTDB.LOG The RESTDB.LOG file contains a list of each of the global and network database files restored during the restore process. This file also contains error messages for each error that occurred during the process. Errors may or may not cause the restore process to fail. MAKEDIR.LOG The MAKEDIR.LOG lists all directories created during the restore process. These directories were empty during the save process, and would have been created by recompiling the DDL files in past releases of OWS software. DOS Backup and Restore Utilities Back up or restore databases either by choosing the Backup Utility menu option or by manually running the backup or restore utility. Both methods use the same DOS backup and restore utility; however, the Backup Utility menu option uses a set of default options. To customize options for backing up or restoring databases, exit to DOS and run the utility manually. Close the Metasys program before using either method. 15-4 Operator Workstation User’s Manual Windows Backup and Restore Utilities When using the Windows utilities, back up or restore databases by choosing the Backup Utility menu option. This shuts down the Metasys program and loads the Microsoft Backup and Restore Utility. Windows NT and Windows 2000 Professional only support back-up to tape. Note: Johnson Controls highly recommends performing a back up of the entire drive using a mass-storage device. This saves hours of looking for Operating System data, third-party applications, and operator personal files. Saving Files to Diskettes As a precaution, save the databases to diskettes whenever the archive database changes significantly. The save process overwrites any previous saves on the diskettes. Before saving files, be sure to have sufficient diskettes on hand. Two diskettes per network should be sufficient. An entire database or a large network with many GPL or JC-BASIC files may require three or more diskettes. Compress the files before saving them to use fewer diskettes. More information on compressing files appears later in this document. Insert the first diskette in the backup drive before starting the save process. The diskettes: • must not be write protected. • do not need to be formatted. (The save process formats them if required.) • should be labeled with the workstation or network name, the date and time of the save, and the sequence number of the diskette. 15-5 Operator Workstation User’s Manual Detailed Procedures Saving the Database Windows 98 To save a database with Windows 98 software: 1. Click Exit > Backup utility > Backup. A message box appears indicating that the PC is about to exit the Metasys program and that all unsaved work will be lost. 2. Click OK. The OWS software closes, and the Microsoft Backup window appears (Figure 15-1). Untitled - Microsoft Backup File Settings Tools Help Backup Restore Compare What to back up: < Previous Step Next Step > Select files to back up Desktop Name My Computer 3 Floppy (A:) 5 Floppy (B:) (C:) (D:) Sys on ‘Cmkenov1 ( 1 2 Size Type My Computer Network Neighbo... 1 4 Vdisk on ‘Spd6’ (G:) File set: Untitled Files selected: 0 0 kilobytes selected backup Figure 15-1: Microsoft Backup Window Note: When saving files, certain options are available under the Options selection in the Settings menu of the Microsoft Backup window. For details on these settings, refer to the Windows documentation. 15-6 Operator Workstation User’s Manual 3. If this is the first time the PC has performed this backup, create a File set: a. Select the files to back up by clicking inside the check box next to each file. (Selecting a directory selects all of the files within the directory.) The subdirectory where the files are located depends on the two variables: where OWS software was installed (“FMSPATH”) and where the database is located (“FMSDATA”). Type SET at the DOS prompt to see the paths for FMSPATH and FMSDATA. To select all files in a directory, click the check box next to the directory, such as FMS\DATA or Project\Contract #. As a minimum, include the following files and directories: \CUSTUMAC \BIN\GPL\JCIUMACS \GRFXLIB \ERRORLOG \SAVE \STATIC\*.SBQ \N1NET.DBF \NETNAME.NDX \WIN.INI \PCCONFIG.DBF \PCPORT.NDX \PCDEVICE.NDX \DDL\*.DDL \MODELS \HVACPRO \SYSTEM91 \”NETWORK NAME” \”NETWORK NAME”.DOB “NETWORK NAME” should be replaced with the actual name of the network being backed up. b. Click the Next Step. c. Select the destination drive. d. On the File menu, click Save As. The Save dialog box appears (Figure 15-2). Operator Workstation User’s Manual 15-7 Figure 15-2: Save Dialog Box e. Enter a name for the File set in the Save As dialog box and click Save. f. Go to Step 6. 4. Open the File set that lists the files to be backed up: a. Click the Open File Set option. The Open dialog box appears. b. Choose the File set that contains the files. c. Click Open to open the selected File set. d. Click the Next Step option. IMPORTANT: The Microsoft Windows Backup and Restore Utility does not automatically select empty directories as part of the .SET file. To save these directories, select them manually. 5. Select the destination for the backup. (For example, click Floppy Drive A.) 6. Click Start Backup. The Backup Job Information window appears (Figure 15-3). 15-8 Operator Workstation User’s Manual Figure 15-3: Backup Job Information Window 7. Enter a name for the file and click OK. The backup begins, creating a .QIC file. When the backup has completed, a message box appears indicating that the process is complete. Click OK. Windows NT/Windows 2000 Professional To save the database using Windows NT or Windows 2000 Professional, use the following instructions: 1. On the Exit menu, click Backup Utility > Backup. A message appears stating that the PC is about to exit the Metasys system. The Windows Backup/Restore procedure begins. 2. On the Window drop down menu, click Drives. Operator Workstation User’s Manual 3. 15-9 Select the files to back up by clicking inside the check box next to each file. (Selecting a directory selects all of the files within the directory.) Select all files in a directory by placing a check box next to the directory name. As a minimum, include the following files and directories: \CUSTOMAC \FMS\BIN\GPL\JCIMACS \FMS\GRFXLIB \FMS\ERRORLOG \FMS\SAVE \FMS\STATIC\*SBQ \FMS\DATA\N1NET.DBF \FMS\DATA\PCDEVICE.DBF \FMS\DATA\Win.ini \FMS\DATA\NETNAME.NDX \FMS\DATA\PCCONFIG.DBF \FMS\DATA\PCPORT.NDX \FMS\DATA\DDL\*.DDL \FMS\DATA\MODELS \FMS\DATA\HVACPRO \FMS\DATA\SYSTEM91 \FMS\DATA\“NETWORK NAME” \FMS\DATA\“NETWORK NAME”.DOB Replace the NETWORK NAME with the actual name of the network being backed up. 4. Click the Backup button when finished. The Backup Information dialog box appears (Figure 15-4). 15-10 Operator Workstation User’s Manual Figure 15-4: Backup Information Dialog Box (Windows NT) 5. Enter Full Metasys backup for the description. 6. Click OK. 7. When the backup is complete, open the Metasys Full Save File and verify that all selected files are present. Blank directories are not saved. Restoring a Database Windows 98 IMPORTANT: The Microsoft Windows Backup and Restore Utility does not automatically select empty directories as part of the .SET file. To save these directories, select them manually. For systems using Windows 98, follow these instructions to restore the database: 1. Click Exit > Backup Utility > Restore. A message box appears indicating that the PC is about to exit the Metasys program and that all unsaved work will be lost. Operator Workstation User’s Manual 15-11 2. Click OK. The Metasys program closes and the Microsoft Backup window appears. 3. Click the Restore tab to bring the Restore option to the front of the window (see Figure 15-5). Microsoft Backup File Settings Tools Help Backup Restore Compare Restore from: < Previous Step Restore from: Backup Set Name Desktop Next Step > Created My Computer 312 Floppy (A:) 5 14 Floppy (B:) (C:) (D:) Sys on ‘Cmkenov1 ( Vdisk on ‘Spd6’ (G:) Backup set: 0 kilobytes restore Figure 15-5: Microsoft Backup and Restore Utility with the Restore Tab in Front Note: When restoring files, certain options are available in the Options selection on the Settings menu of the Microsoft Backup window. For details, refer to the Windows documentation. 4. Insert the final backup diskette and select the drive that contains the database. 5. Select the .QIC file that contains the databases. The PC displays the files that it can restore from the selected .QIC file. 6. Select files to restore by clicking in the check box next to each file. 7. Click Start Restore. The restore process begins. When the process is complete, a message box appears indicating that the process is complete. (If errors occur, a dialog box appears. Use this box to view the error log.) 15-12 Operator Workstation User’s Manual Windows NT/Windows 2000 Professional Use the following procedure to restore the database with Windows NT or Windows 2000 Professional. Note: A database saved using the DOS program SAVEDB.BAT using Windows 3.1, Windows 95, or Windows 98, can be restored on a Windows NT or Windows 2000 Professional machine using the DOS program RESTDB.bat (DOS program). 1. On the Exit menu, click Backup Utility > Backup. A message appears indicating that the PC is about to exit the Metasys system. The Windows Backup/Restore procedure begins. 2. The tape drive activates. Double-click the directory in the right window. A detail tree of the files that reside on tape appears. 3. Select files to restore by clicking the check box next to the file name. 4. When the process is complete, check the \winnt\backup.log to verify that the process restored all of the files and that no error messages are present.
* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project