34.4 GroupWise Database Copy Utility

IMPORTANT:Starting with GroupWise 7, TSAFSGW is provided as a robust backup solution on NetWare and Linux, as described in Section 34.2, GroupWise Target Service Agent. However, if you do not want to use TSAFSGW, you can use DBCopy in conjunction with your backup software of choice to back up your GroupWise system.

DBCopy can also be useful for moving domains and post office from NetWare or Windows to Linux. For more information, see the GroupWise Server Migration Guide.

34.4.1 DBCopy Functionality

The GroupWise Database Copy utility (DBCopy) copies files from a live GroupWise post office or domain to a static location for backup. During the copy process, DBCopy prevents the files from being modified, using the same locking mechanism used by other GroupWise programs that access databases. This ensures that the backed-up versions are consistent with the originals even when large databases take a substantial amount of time to copy. Starting with GroupWise 7 Support Pack 2, DBCopy is a multi-threaded application for greater efficiency.

DBCopy copies only GroupWise-recognized directories and files, as illustrated in Post Office Directory and Domain Directory in Directory Structure Diagrams in GroupWise 8 Troubleshooting 3: Message Flow and Directory Structure. DBCopy does not copy some directories:

  • Post office queue directories (wpcsin and wpcsout): Only post office data files and directories are copied. Queue directories are not copied.

  • All domain subdirectories: Only domain files are copied. Queue directories are not copied.

  • All subdirectories under each gateway directory in wpgate: Only gateway files are copied from each gateway directory. Queue directories of gateway directories are not copied. For example, under gwia and webac70a, gateway files are copied, but no gateway subdirectories are copied.

When planning disk space for your backups, you should plan to have at least three times the size of a post office. This accommodates the post office itself, the backup of the post office, and extra space for subsequent growth of the post office.

Typically, domains grow less than post offices, so domain backups should occupy somewhat less disk space.

34.4.2 Using DBCopy on NetWare

  1. At a command prompt, change to the directory where you installed the GroupWise agents (typically sys:\system).

  2. Use the following command to back up a post office:

    dbcopy.nlm \post_office_directory \destination_directory
    

    or

    Use the following command to back up a domain:

    dbcopy.nlm \domain_directory \destination_directory
    

    or

    Use the following command to back up a remote document storage area:

    dbcopy.nlm /b \storage_area_directory \destination_directory
    

    You can include the /i switch in any of these commands to provide the date (mm-dd-yyyy) of the previous copy. This causes DBCopy to copy only files that have been modified since the previous copy, like an incremental backup.

    DBCopy creates a log file named mmddgwbk.nnn. The first 4 characters represent the date. A three-digit extension allows for multiple log files created on the same day. The log file is created at the root of the destination directory. Include the /v switch in the dbcopy command to enable verbose logging for the backup.

  3. After DBCopy has finished copying the post office, domain, or remote document storage area, use your backup software of choice to back up the static copy of the data.

  4. After the backup has finished, delete the static copy of the data to conserve disk space.

34.4.3 Using DBCopy on Linux

  1. Change to the directory where the DBCopy RPM is located or copy it to a convenient location on your workstation.

    The DBCopy RPM (groupwise-dbcopy-version-mmdd.i386.rpm) is located in the /admin directory in your GroupWise software distribution directory if you have created one or on the GroupWise 8 DVD or downloaded GroupWise 8 software image.

  2. Install DBCopy.

    rpm -i groupwise-dbcopy-version-mmdd.i386.rpm
    
  3. Change to the /opt/novell/groupwise/agents/bin directory.

  4. Use the following command to back up a post office:

    ./dbcopy /post_office_directory /destination_directory
    

    or

    Use the following command to back up a domain:

    ./dbcopy /domain_directory /destination_directory
    

    or

    Use the following command to back up a remote document storage area:

    ./dbcopy -b /storage_area_directory /destination_directory
    

    You can include the -i switch in any of these commands to provide the date (mm-dd-yyyy) of the previous copy. This causes DBCopy to copy only files that have been modified since the previous copy, like an incremental backup.

    To remind yourself of these options when you are at your Linux server, view the dbcopy man page.

    DBCopy creates a log file named mmddgwbk.nnn. The first 4 characters represent the date. A three-digit extension allows for multiple log files created on the same day. The log file is created at the root of the destination directory. Include the -v switch in the dbcopy command to enable verbose logging for the backup.

  5. After DBCopy has finished copying the post office, domain, or remote document storage area, use your backup software of choice to back up the static copy of the data.

  6. After the backup has finished, delete the static copy of the data to conserve disk space.

You might find it helpful to set up a cron job to run DBCopy regularly at a time of day when your system is not busy.

34.4.4 Using DBCopy on Windows

  1. At a command prompt, change to the directory where you installed the GroupWise agents (typically c:\Program Files\Novell\GroupWise Server\Agents).

  2. Use the following command to back up a post office:

    dbcopy.exe \post_office_directory \destination_directory
    

    or

    Use the following command to back up a domain:

    dbcopy.exe \domain_directory \destination_directory
    

    or

    Use the following command to back up a remote document storage area:

    dbcopy.exe /b \storage_area_directory \destination_directory
    

    You can include the /i switch in any of these commands to provide the date (mm-dd-yyyy) of the previous copy. This causes DBCopy to copy only files that have been modified since the previous copy, like an incremental backup.

    DBCopy creates a log file named mmddgwbk.nnn. The first 4 characters represent the date. A three-digit extension allows for multiple log files created on the same day. The log file is created at the root of the destination directory. Include the /v switch in the dbcopy command to enable verbose logging for the backup.

  3. After DBCopy has finished copying the post office, domain, or remote document storage area, use your backup software of choice to back up the static copy of the data.

  4. After the backup has finished, delete the static copy of the data to conserve disk space.

34.4.5 Using DBCopy to Migrate Databases from NetWare or Windows to Linux

The GroupWise Server Migration Utility helps you migrate your GroupWise system from NetWare or Windows to Linux by copying domains and post offices from one server to another, as described in the GroupWise Server Migration Guide. If your domains and post offices are located on a SAN, you do not need to copy the domains and post office from one location to another. You can convert the domain and post office directory structures to the format used on Linux, so that the same physical location can be mounted for use on a different operating system.

The directory structure format used on NetWare and Windows uses mixed-case filenames and directory names. Because Linux is a case-sensitive operating system, directory structures originally created on Linux use only lowercase filenames and directory names. Therefore, directory structures originally created on NetWare or Windows need to be converted to lowercase filenames and directory names in order to be usable by the GroupWise Linux agents. DBCopy can perform this conversion.

  1. Install DBCopy on the Linux server where you want to mount the domain or post office, as described in Section 34.4.3, Using DBCopy on Linux.

  2. Mount the domain or post office directory to the Linux server.

  3. Change to the following directory:

    /opt/novell/groupwise/agents/bin
    
  4. Use the following command to convert the domain or post office directory structure to lowercase:

    ./dbcopy -l domain_or_post_office_directory
    
  5. Install and start the GroupWise Linux agents on the Linux server where the domain or post office is mounted.

34.4.6 DBCopy Startup Switches

In addition to backups, the DBCopy utility is used in conjunction with the GroupWise Server Migration Utility, which helps you migrate GroupWise data from NetWare or Windows to Linux. Some startup switches can be used for both backups and migration. Other startup switches are used only for migration. For detailed information about how to use the migration startup switches, see the GroupWise Server Migration Guide.

The following startup switches can be used with DBCopy:

NetWare DBCopy

Linux DBCopy

Windows DBCopy

Usage

/a

--a

/a

Migration only

/b

--b

/b

Backups and migration

/d

--d

/d

Migration only

/f

--f

/f

Migration only

/i

--i

/i

Backups only

/k

--k

/k

Migration only

/l

--l

/l

Migration only

/m

--m

/m

Migration only

/o

--o

/o

Migration only

/p

--p

/p

Migration only

/s

--s

/s

Migration only

/t

--t

/t

Backups and migration

/u

--u

/u

Migration only

/v

--v

/v

Backups and migration

/w

--w

/w

Backups and migration

/a (migration only)

Specifies the IP address to bind to for the migration process. The default is all available IP addresses.

/b

Indicates that DBCopy is copying a document storage area, which includes BLOB (binary large object) files. Use this switch only when you need to copy BLOB files.

/d (migration only)

Indicates migration of a domain.

/f (migration only)

Indicates that this is the first pass of the migration process.

/i (backups only)

Specifies the date of the previous copy of the data. This causes DBCopy to copy only files that have been modified since the previous copy, like an incremental backup. There is no default date; you must specify a date.

NetWare DBCopy

Linux DBCopy

Windows DBCopy

Syntax:

/i mm-dd-yyyy

-i mm-dd-yyyy

/i mm-dd-yyyy

Example:

/i 12-15-2010

-i 5-18-2010

/i 10-30-2010

/k (migration only)

Skips collecting database size information during the migration.

/l (migration only)

Performs the GroupWise Check function of storelowercase on the migrated GroupWise databases. Its purpose is to do an “in-place” conversion of files and directories to lowercase, rather than as part of a copy operation. For a post office, it also updates the guardian database with the new, lowercase names.

For example, you could use this functionality if you have a domain or post office located on a SAN that was mounted for access by the GroupWise NetWare agents, but you now want to run the GroupWise Linux agents for the domain or post office.

/m (migration only)

Copies all directories and files associated with a domain, post office, or document storage area as part of a migration. This includes files and directories that do not need to be included in backups.

/o (migration only)

Skips the second copy of the post office offiles directory during the migration

/p (migration only)

Indicates migration of a post office.

/s (migration only)

Indicates that this is the second pass of the migration process.

/t

Specifies the number of threads that you want DBCopy to start for copying data. The default number of threads is 5. Valid values range from 1 to 10.

NetWare DBCopy

Linux DBCopy

Windows DBCopy

Syntax:

/t -number

-t number

/t number

Example:

/t 10

-t 10

/t 10

/u (migration only)

Specifies the TCP port number for status requests during the migration.

/v

Specifies verbose logging, which provides more detail than the default of normal logging. DBCopy creates a log file named mmddgwbk.nnn. The first 4 characters represent the date. A three-digit extension allows for multiple log files created on the same day. The log file is created at the root of the destination directory. By default, DBCopy provides a normal level of logging.

/w

Turns on continuous logging to the screen.