Novell is now a part of Micro Focus

Practial Networking: Backing Up Open GroupWise Database Files

Articles and Tips:

Daniel G. Newell

01 Jul 1998


Backing up critical data stored in GroupWise e-mail folders, calendars, and document repositories should be part of your company's daily backup routine. To create a restorable backup of all GroupWise database files, including open files, you must use one of the following methods:

  • Use high-end backup software that directly supports the backup of open GroupWise database files (such as Computer Associates' ARCserve with Backup Agent for GroupWise or St. Bernard Software's Open File Manager).

  • Completely unload all GroupWise agents so that all GroupWise database files are closed, and then back up your company's GroupWise domain and post offices using standard backup software. If GroupWise agents are active, GroupWise keeps several of its database files in a continually open state. Although you can configure some standard backup software to include open files, most backup software still cannot copy these files and retain the integrity of the GroupWise database. In many cases, the backup software simply returns an error message, even if you have selected the option to include open files.

  • Use Novell's GWBACKUP and DBCOPY utilities to temporarily lock GroupWise database files and to create a snapshot of any open files. Then copy the snapshot to a backup device, such as a tape drive, later. (The GWBACKUP utility and the DBCOPY utility work with GroupWise 5.x.)

If you are not using one of these methods, the backup of your company's GroupWise database files may not be restorable. Having an unrestorable backup could result in a permanent loss of data if a natural disaster or a catastrophic failure affects your company's GroupWise domain or post offices.

Although the first and second methods allow you to create a restorable backup of GroupWise database files, purchasing high-end backup software may not be an option for your company, and unloading all GroupWise agents for at least two or three hours every night is an unattractive alternative. As a result, you may want to use the GWBACKUP utility and the DBCOPY utility instead. This article explains how both utilities work and how you can use these utilities to back up open GroupWise database files without having to unload GroupWise agents.

TWO UTILITIES FOR BACKING UP OPEN GROUPWISE DATABASE FILES

The GWBACKUP utility and the DBCOPY utility temporarily lock individual GroupWise database files to maintain their integrity and then copy these files to a separate directory. After the GroupWise database files have been copied to this directory, you can use standard backup software to archive these files.

Both the GWBACKUP utility and the DBCOPY utility allow you to back up entire GroupWise post offices. However, the DBCOPY utility also allows you to back up GroupWise domains. (Adomainroutes messages between post offices and provides gateways to external networks, such as the Internet. Apost officestores messages for groups of users and routes messages between users in the same group.) In addition, the DBCOPY utility allows you to back up individual GroupWise database files in any GroupWise domain or post office by using a batch file.

The GWBACKUP utility offers an easy-to-use GUI that requires you to simply enter the source and destination directories. The DBCOPY utility, on the other hand, runs from the command line.

You can run both utilities from any Windows 95 workstation with Novell client software installed. To run the utilities successfully, you must be logged in to the network as a user with Read, Write, Create, and Delete rights to the source and destination directories for the backup. (The source directory contains the GroupWise domain or post office you want to back up. The destination directory, which you must create, can be located on any volume with enough available hard drive space to hold the backup.)

If you don't have the GWBACKUP utility and the DBCOPY utility, you can download the GWBUPAUS.EXE file free from Novell's Support Connection World-Wide Web site (http://support.novell.com/search/ff_index.htm). This file contains the GWBACKUP utility and its associated .DLL files, the DBCOPY utility, and two help files.

Backing Up GroupWise Post Offices

Your company's GroupWise database consists of one GroupWise domain and one or more GroupWise post offices. The GroupWise database is not, however, one large file. Rather, this database is a collection of administrative and database files that are organized in a complex directory structure. A GroupWise domain and individual GroupWise post offices reside in separate root directories and may be located on different servers.

The GWBACKUP utility offers the simplest method for backing up a GroupWise post office. This utility automatically copies the entire contents of the post office, including attachment files and GroupWise Document Management System (DMS) files, to the destination directory. The GWBACKUP utility does not give you the option of excluding any files during the backup process. (See "Using Novell's GWBACKUP Utility.")

The DBCOPY utility offers a more sophisticated method for backing up a GroupWise post office. By using a batch file with this utility, you can selectively copy portions of the GroupWise post office, including GroupWise database files, QuickFinder files, and user indexes. You can also decide whether you want to copy attachment files and DMS files.

Advantages of a DBCOPY Batch File

Although using the DBCOPY utility is more difficult to configure, this method offers significant advantages over using the GWBACKUP utility. For example, you can save a lot of hard drive space by configuring the DBCOPY batch file to skip attachment files and DMS files. These files are collectively known as binary large object (BLOB) files. (For more information about the types of files GroupWise uses, refer to the table contained in the GWBACKUP.HTM help file, which is included in the GWBUPAUS.EXE file mentioned earlier.)

In fact, BLOB files for a small workgroup of only eight users might require as much as 300 MB of hard drive space. Not only do these files use a significant amount of hard drive space, but they also require a significant amount of time and system resources to copy.

Fortunately, BLOB files are not kept in a continually open state, as are GroupWise database files, QuickFinder files, and user indexes. As a result, you can configure the DBCOPY batch file to exclude BLOB files from the snapshot, and you can back up these files directly to a tape drive using standard backup software instead.

The biggest advantage of using a DBCOPY batch file instead of the GWBACKUP utility is that you can automate the execution of this batch file by using a Windows 95 program scheduler. The GWBACKUP utility, on the other hand, requires you to manually enter the source and destination directories each time you run this utility.

Using a DBCOPY batch file, you can also automate the backup of the WPDOMAIN.DB file, which is the core GroupWise database file for your company's GroupWise domain. You do not need to back up the entire domain. Most of the domain serves merely as a repository for temporary data and does not need to be backed up.

USING A DBCOPY BATCH FILE

I recommend that you back up your company's GroupWise domain and post offices by completing the following steps:

  1. Create a destination directory for the snapshot that will be created by a DBCOPY batch file.

  2. Create and run a DBCOPY batch file. (See "Sample DBCOPY Batch File.")

  3. Configure standard backup software to exclude directories containing open GroupWise database files or temporary files that cannot be backed up effectively. Also configure this software to include the destination directory that contains the snapshot and any directories that contain BLOB files.

The following sections explain each of these steps:

Creating a Destination Directory

Before you create and run a DBCOPY batch file, you must create a destination directory for each GroupWise domain and post office you want to back up. You can create these directories on the same volume on which the GroupWise domain and post offices reside, or you can create these directories on another volume anywhere in the network. Because the DBCOPY utility cannot compress any of the files it copies, you must ensure that the amount of available hard drive space on this volume is greater than or equal to the size of the files you are backing up.

Within each destination directory, you must create a directory structure exactly like the one shown in Figure 1. If you are not using GroupWise DMS libraries, you can omit the GWDMS directory tree. If you are using GroupWise DMS libraries, you can create as many LIBxxxxsubdirectories as necessary. (Replace LIBxxxxwith the name of each subdirectory in the GWDMS directory of the GroupWise post office you want to back up.) When you run the DBCOPY batch file, the DBCOPY utility should automatically create all other required subdirectories. (These subdirectories are not shown in Figure 1.)

Figure 1: You must use this directory structure when backing up GroupWise domains and post offices with the DBCOPY utility.

Creating and Running a DBCOPY Batch File

If possible, you should back up your company's GroupWise domain and post offices during minimum usage times. The fewer changes that users make to GroupWise database files during the backup process, the better the integrity of the backup will be. Keep in mind, however, that one of the main benefits of using the GWBACKUP utility and the DBCOPY utility is that you do not have to shut down GroupWise for the backup to be effective.

The DBCOPY batch file gives you a lot of flexibility in the way that you back up your company's GroupWise domain and post offices. For example, you could choose not to create a snapshot of BLOB files by excluding the commands that backup the OFFILES, OFVIEWS, and GWDMS\LIBxxxx\DOCS directories in each post office. As mentioned earlier, BLOB files, unlike other GroupWise database files, are not kept in a continually open state. As a result, you can use standard backup software to back up these files directly from their native location. To provide redundancy, however, you may want to create a snapshot of the BLOB files and store this snapshot on another server. In this case, you can easily include BLOB files in the DBCOPY batch file that you create.

A valuable feature of the DBCOPY utility is that it copies only GroupWise database files that are new to the destination directory or have been changed since the last backup was made. Running a DBCOPY batch file daily keeps the entire snapshot up-to-date, essentially providing a complete backup of all GroupWise database files on the server that contains the destination directory. You can then back up the snapshot on a tape drive using standard backup software.

Configuring Your Company's Standard Backup Software

Figure 2 shows the basic directory structure of a GroupWise domain and post office.The directories shaded in yellow are administrative directories and temporary repositories for transient data and cannot be restored effectively. You should configure the backup software your company uses to exclude all of the directories shown in Figure 2 except those highlighted in green.

Figure 2: You should configure your company's backup software to exclude all of these GroupWise directories except those highlighted in green. You can then use the DBCOPY utility to create a snapshot of the directories highlighted in navy blue.

You should use a DBCOPY batch file to create a snapshot of the directories highlighted in blue in Figure 2. You can then configure the backup software to back up the destination directory containing the snapshot.

You should also configure the backup software to include the directories highlighted in green, which contain BLOB files. Because GroupWise does not keep BLOB files in a continually open state, you can back up these files directly from their native location. (For more information about how to back up particular directories, see "To Back Up or Not to Back Up.")

THE DBCOPY UTILITY'S PECULIAR PROPERTIES

Although you run the DBCOPY utility in the same way you run most command-line utilities, this utility has some peculiarities. For example, you cannot redirect the output of the DBCOPY utility to a file. Instead, one or more output windows appear on your Windows 95 desktop every time you run this utility. The name in the title bar of each output window changes to Inactive as soon as the DBCOPY utility completes its current session.

A DBCOPY batch file generates a new instance of the DBCOPY utility every time the batch file executes a DBCOPY command. As a result, you may have as many as 10 instances running at one time. For each instance, an output window appears on your Windows 95 desktop. You should not close any of these windows until the name in the title bar of every window has changed to Inactive. Unfortunately, the DBCOPY utility does not recover elegantly when you close a window prematurely; in most cases, you must reboot your workstation.

If you schedule a DBCOPY batch file to run at night or when you are away from your workstation, you will probably find your Windows 95 desktop covered with output windows when you return. You should scan the text in these windows for error messages.

If you find an error message in a particular window, you can copy the text in this window by using the pull-down menu that appears when you click the icon in the upper left-hand corner of the window's title bar. You can then paste the text into a file in any Windows-based text editor, such as the Windows 95 Notepad utility.

Finally, the DBCOPY utility's documentation, which is included in the GWBUPAUS.EXE file mentioned earlier, is not entirely accurate. For example, if you find discrepancies between the documentation and the information contained in this article, you should consider this article to be a more reliable source. The help files included in the GWBUPAUS.EXE file may also be misleading. (You can access the DBCOPY help files by using the /? and /B switches in the DBCOPY utility.)

POTENTIAL PROBLEMS YOU MAY ENCOUNTER

You may encounter the following problems when you use the DBCOPY utility:

First, a DBCOPY batch file can fail if a GroupWise database file remains locked indefinitely. Indefinite file locks are commonly caused by a workstation that has hung at the same time the workstation locked the GroupWise database file. To overcome this problem, you can usually just restart the workstation that has hung and then rerun the DBCOPY batch file. In some cases, however, you may have to restart GroupWise.

Second, if you back up BLOB files before the user databases and indexes, you risk compromising the integrity of the database. If users send or receive any messages with attachments (BLOB files), either during or immediately after you back up the BLOB files, the backup of the user databases and indexes may include references to BLOB files that are not backed up. If you restore the backup, users may receive errors and will not be able to open some of their messages.

You can avoid this problem by backing up the user databases and indexes first and the BLOB files second. Of course, because extra BLOB files could possibly be added in between the time you back up the user databases and indexes and the time you back up the BLOB files, you may back up more BLOB files than there are references for in the user databases and indexes. However, this occurrence will not cause any application errors, and you will be sure that all messages in the user databases and indexes have all of their associated attachments.

RESTORING GROUPWISE DOMAINS AND POST OFFICES

To restore GroupWise domains and post offices, you use the DBCOPY utility in virtually the same way that you use this utility to create a snapshot. To restore a GroupWise domain or post office, you simply use the native domain or post office directory as the destination directory and the location of the backup as the source directory for all DBCOPY commands.

When you restore a GroupWise post office, you should ensure that users are not using GroupWise, if only because all of their current work may be lost once older GroupWise database files are restored. (Keep in mind that you cannot either backup or restore individual message or attachment files.)

After you restore a GroupWise domain or post office, you should analyze the restored GroupWise database files by completing the following steps:

  1. Launch Novell's NetWare Administrator (NWADMIN) utility from any Windows NT or Windows 95 workstation running this utility and the GroupWise snap-in module.

  2. From the GroupWise view, select the post office you have restored.

  3. From the Tools pull-down menu, select the GroupWise Utilities option, and then select the Mailbox/Library Maintenance option.

  4. Finally, select the Analyze/Fix Databases option. This option then triggers an analysis of the restored GroupWise database files to help ensure the integrity of these files. (If you want the NWADMIN utility to fix any problems it finds with the GroupWise database files, you should also click the Fix Problems box.)

CONCLUSION

As with most administrative tasks, changing your company's daily backup routine to ensure that you have a restorable backup of GroupWise database files, requires an initial investment of time. Investing this time will, however, generate results by increasing the integrity of your company's overall backup strategy so that if a natural disaster or a catastrophic failure does occur, data loss will remain at a minimum.

To ensure that the Practical Networking column meets your needs, we need to know what you want to learn about. Please send your suggestions to practical@niche-associates.com.

Daniel G. Newell works for Niche Associates, an agency that specializes in technical writing and editing. Niche Associates is located in Salt Lake City.

NetWare Connection,July 1998, pp.38-44

Using Novell's GWBACKUP Utility

Before you run Novell's GWBACKUP utility, you must create a destination directory for the backup, either on the same volume that contains the GroupWise post office you want to back up or on another volume. Because the GWBACKUP utility cannot compress files or back up files directly to a backup device (such as a tape drive), you must ensure that the volume in which you create the destination directory contains an amount of available hard drive space greater than or equal to the size of the GroupWise post office you are backing up.

After you create the destination directory, you complete the following steps:

  1. Run the GWBACKUP.EXE file on any Windows 95 workstation with Novell client software installed. A screen appears, prompting you to enter both the source directory of the GroupWise post office you want to back up and the destination directory for the backup.

  2. Enter the source and destination directories.

  3. Select the Run option. The GroupWise Post Office Backup dialog box appears, displaying the status of the backup process. This dialog box shows the number of files that have been copied and the name of the file that is currently being copied.

    Note: If the GWBACKUP utility fails to complete an operation due to a problem such as a missing file or an indefinitely locked database, an error message appears in a dialog box that gives you three options: Retry, Cancel, and Abort. If you select the Cancel option, the GWBACKUP utility skips the file that is causing the problem. You can then use Novell's DBCOPY utility to back up this file. (If the GWBACKUP utility encounters files that are temporarily locked due to user activity, this utility automatically retries backing up the files later.)

    However, Novell recommends that you correct the problem and run the GWBACKUP utility again to back up the entire GroupWise post office. Copying files in the correct sequence helps retain data integrity.

  4. When the backup process is completed, a dialog box appears, displaying the message "Backup Complete."

As the GWBACKUP utility performs the backup process, users can continue to use GroupWise. During this process, the GWBACKUP utility creates a log file called BU.LOG, which is stored in the destination directory. You can refer to this log file for a transaction history of all operations, including operations that result in errors.

GroupWise, like most messaging systems, does not allow certain files and directories to be backed up effectively. For example, you cannot effectively back up the following directories in any GroupWise post office: WPCSIN, WPCSOUT, OFWORK, MSLOCAL, and LIBRARY. These directories serve as administrative inboxes and outboxes and temporary repositories. Files stored in these directories include messages and attachments that are pending delivery and temporary QuickFinder files. GroupWise does not allow you to back up these directories because the files stored in the directories are temporary. Once the files become part of the regular GroupWise database (when messages and attachments are delivered, for example), these files will be included in the next backup.

NetWare Connection,July 1998, p.39

Sample DBCOPY Batch File

The following DBCOPY batch file is an example of the type of file you might use to back up a GroupWise domain and post office with Novell's DBCOPY utility:

@ECHO OFF

REM Batch file to create snapshot images of open GroupWise

REM database files so that GroupWise domains and post offices

REM can be fully backed up using standard backup software.



DBCOPY /Y /Q \\<POSTOFFICE>\OFUSER\INDEX \\<PO_BKUP_DIR>\OFUSER\INDEX
DBCOPY /Y \\<POSTOFFICE>\OFUSER \\<PO_BKUP_DIR>\OFUSER
DBCOPY /Y \\<POSTOFFICE>\OFMSG \\<PO_BKUP_DIR>\OFMSG
REM optional next command = backup blob files 

REM DBCOPY /Y /B \\<POSTOFFICE>\OFFILES \\<PO_BKUP_DIR>\OFFILES


DBCOPY /Y \\<POSTOFFICE>\GWDMS \\<PO_BKUP_DIR>\GWDMS
REM Repeat the following three commands for each LIBxxxx 

REM directory under GWDMS 

DBCOPY /Y /Q \\<POSTOFFICE>\GWDMS\LIB0001\INDEX \\<PO_BKUP_DIR>\GWDMS\LIB0001\INDEX
DBCOPY /Y \\<POSTOFFICE>\GWDMS\LIB0001 \\<PO_BKUP_DIR>\GWDMS\LIB0001
REM optional next command = backup DMS BLOB files 

REM DBCOPY /Y /B \\<POSTOFFICE>\GWDMS\LIB0001\DOCS \\<PO_BKUP_DIR>\GWDMS\LIB0001\DOCS


DBCOPY /Y \\<POSTOFFICE> \\<PO_BKUP_DIR>
DBCOPY /Y \\<POSTOFFICE>\*.DC \\<PO_BKUP_DIR>
DBCOPY /Y /B \\<POSTOFFICE>\OFVIEWS \\<PO_BKUP_DIR>\OFVIEWS
DBCOPY /Y \\<DOMAIN> \\<DOMAIN_BKUP_DIR>


ECHO ON 

REM GroupWise Backup Complete--Check output for errors 

@ECHO OFF 

You can download a fully annotated version of this sample DBCOPY batch file from NetWare Connection's World-Wide Web site at http://www.novell.com/nwc. (For more information about using a DBCOPY batch file, see the "Using a DBCOPY Batch File" section.)

NetWare Connection,July 1998, p.42

To Back Up or Not to Back Up

Before you back up your company's GroupWise domain and post offices, you should be aware that not all GroupWise directories are created equal: Some directories should be backed up directly from their native location, some directories should be backed up as a snapshot, and some directories should not be backed up at all.

BACK UP DIRECTLY FROM NATIVE LOCATION

You can include the following directories in your company's daily backup routine, and you can back up these directories directly from their native location:

  • <POSTOFFICE>\OFFILES

  • <POSTOFFICE>\OFVIEWS

  • <POSTOFFICE>\GWDMS/LIBxxxx/DOCS

  • <POSTOFFICE>\GWDMS/LIBxxxx/ARCHIVE

  • <POSTOFFICE>\LIBRARY

BACK UP AS A SNAPSHOT

You can also include the following directories in your company's daily backup routine:

  • <PO_BCKUP_DIR>\[ROOT]

  • <PO_BCKUP_DIR>\OFMSG

  • <PO_BCKUP_DIR>\OFUSER

  • <PO_BCKUP_DIR>\GWDMS

  • <PO_BCKUP_DIR>\GWDMS/LIBxxx

  • <PO_BCKUP_DIR>\GWDMS/LIBxxx/INDEX

However, you should not back up these directories directly from their native location. Rather, you should first create a snapshot of the directories using a DBCOPY batch file. (See the "Using a DBCOPY Batch File" section in the main article.) You can then back up the snapshot.

Although you can use either the GWBACKUP utility or the DBCOPY utility to create a snapshot, the DBCOPY utility allows you to use a DBCOPY batch file to exclude binary large object (BLOB) files from the snapshot. Then you can simply back up BLOB files directly from their native location. (For more information about BLOB files, see "Creating and Running a DBCOPY Batch File.")

DO NOT BACK UP

You should exclude the following directories from your company's daily backup routine. You should not back up these directories because they are administrative directories that contain transitory data. As a result, these directories cannot be restored effectively.

  • <POSTOFFICE<\WPCSIN

  • <POSTOFFICE<\WPCSOUT

  • <POSTOFFICE<\OFWORK

  • <POSTOFFICE<\MSLOCAL

  • <DOMAIN<

NetWare Connection,July 1998, p.43

* Originally published in Novell Connection Magazine


Disclaimer

The origin of this information may be internal or external to Novell. While Novell makes all reasonable efforts to verify this information, Novell does not make explicit or implied claims to its validity.

© Copyright Micro Focus or one of its affiliates