History |
Backing up and restoring your server and network store
Mirroring your network store
Because you can't back up a network store in active use, you would normally have to log everyone off in order to do backups. To avoid this, you might want to mirror your network store contents to the volume of your choice. Then when you are ready to back up the network store, you can pause the mirror and back up the mirror contents while your users continue to work normally on the original network store.
The FirstClass server maintains a synchronized system by continuously building a list of files to copy on the main volume(s) and copying them to the volume designated to hold the mirrored content. There are two lists that are created in the mirroring process: a full list and an incremental list. Your server continuously mirrors information until you pause the mirror to perform your backup. Everything done on the server while mirroring is paused is held in memory, and after the backup is complete and mirroring resumes, the mirror network store is resynchronized with the original network store. The mirror folder is called FCNS8001.
You can only mirror volumes with a status of full use and limited use. Volumes which are browse only cannot be mirrored.
Make sure there is sufficient space on the mirror volume to hold the existing network store and any expected growth. If there is not sufficient space, you will receive a disk write error and the server will retry 10 times. If it still fails, you will receive a retries exceeded error.
If you encounter "Not enough memory to operate on file" displayed on the server console, it is a mirror error and indicates that more memory is required. To solve this, add physical RAM to the computer or change the "Preferred size" memory allocation.
Source files with resource forks that are mirrored lose the resource fork in the mirrored copy (for example, .SES files with .CTB resources).
If you are running FirstClass as a Windows service, you can use the PAUSE and CONTINUE commands to perform the pause and continue functions:
• to pause mirroring, issue the command NET PAUSE FCS
• to resume mirroring, issue the command NET CONTINUE FCS.
If there are no mirrors defined, the NET PAUSE FCS command will trigger a Snapshot Hold. Following that, NET CONTINUE FCS will trigger a Snapshot Release if a previous pause operation caused a Snapshot Hold. Otherwise it will continue any paused mirror.
What is mirrored on the server
All the folders in your network store folder are mirrored with the following exceptions:
• FCNS\SERVER\DBEXT (Windows) or fcns\Server\DBEXT (Mac)
• FCNS\FCAS
• FCNS\FCRAD
• FCNS\NOMIRROR (Windows) or fcns:nomirror (Mac)
• LogFiles folder
• Stats.Dir folder
• Internet Services files, such as en.fc and mimetype, which you may have modified.
Remember to back up the Internet Services files from the original volume.
The first time you perform mirroring, all your network store files will be synchronized. On a large network store, this can be a lengthy task taking several hours. Therefore, it is best to set up a network store for mirroring for the first time when there is no user or trash collection activity.
Mirroring tasks
You must perform these tasks to use mirroring as part of your backup process (both of these tasks are part of the same set of steps as seen in Enabling mirroring below:
• enable the mirror on the full use volume
If your mirrored volume is A and the volume you wish to mirror to is B, then set B to full use.
• point the mirrored volume to the volume in which to mirror.
Configure the volume you want mirrored (for example, volume A) to mirror to your chosen volume (for example, volume B). This is done in the Volumes folder on the administrator's Desktop.
To enable mirroring:
1 Open the Volumes folder on the administrator's Desktop.
2 Select the volume you want to mirror.
3 Choose File > Properties (Windows) or Get Info (Mac).
4 Fill in the fields on the Disk Mirroring tab.
After you click OK, the initial synchronization process begins, building a list of files to copy (the "Mirror Status" is yellow during the syncronization process). This is a one-time task that must be performed for each full volume with a network store on it. You can view synchronization progress on your Server Monitor's Volumes tab. After this stage is finished, the server automatically completes the next stage, which is copying those files. When both of these stages are complete, the "Mirror status", on the Server Monitor's Summary tab (in the Core Services folder), is green.
Permanently stopping mirroring
If you want to replace your network store with a backup, or move your network store to a different machine, you need to permanently stop mirroring. To do this, perform the following tasks on each mirrored volume:
1 Open the Volumes folder on the administrator's Desktop.
2 Select the volume for which you want to stop mirroring.
3 Choose File > Properties (Windows) or Get Info (Mac).
4 Clear "Enable disk mirroring for this volume" on the Disk Mirroring tab.
5 Click OK.
You can check the Volumes tab of the Server Monitor form to make sure the "Disk mirror status" for this volume is Not mirrored.
Backing up your server and network store
Knowing how to back up, rebuild, and restore your FirstClass server in case of emergency are three of your most important responsibilities as an administrator.
Since FirstClass is easy to administer and dependable, emergencies are rare, but if one does arise, you must be prepared to deal with it.
Accidents happen. A power failure or a computer malfunction could destroy everything on your FirstClass server. Without a backup, your users could lose important messages and files, and you could be faced with having to reinstall, reconfigure, and recreate your entire FirstClass system.
To avoid this complicated task, we recommend that you back up your system regularly. It’s also wise to back up your server before upgrading your FirstClass software or your computer hardware.
Reasons for backups
There are several instances in which you may require recent backups, making it imperative that you backup your system regularly:
• Security
The most common reason to do a backup is to guard against natural disasters, system malfunction, or software bugs. For example, if you have a hard disk crash and you have not backed up your FirstClass server to another medium, all of the information in your system will be lost. This is also true if there is a disaster at your server site. Fires, floods, electrical storms, and accidents can all cause partial or total destruction of your system. Finally, bugs in both application and system software may cause malfunctions that render your system unusable. In all cases, planning ahead and backing up ensures that you will be able to get your system running again as soon as possible.
• Hardware or software upgrades
If you are upgrading software (FirstClass or other system software), changing CPUs, or adding hardware, do a complete backup first in case there are any problems during the upgrade.
• Major FirstClass system changes
Before making significant changes to your FirstClass system, such as adding many users or a gateway, or running a large or complex FirstClass scripting script, ensure you backup your system completely and have the backup on hand. If you make an error in the process that is difficult to undo, you can restore your system to what it was before the error and restart the process.
Choosing a backup schedule
Your backup schedule depends on the value of your data, the likelihood that data will be lost, and the difficulty of doing a backup. For example, let’s look at the backup schedule of Husky Planes. Management has decided that they cannot afford to lose more than one day’s worth of FirstClass data. It has set up the following backup process:
• The FirstClass system is backed up to tape every night.
• Backups are retained for two weeks.
• Every Monday morning, the Sunday night backup is sent to an off-site storage facility.
• All other backups produced during the two-week period are stored in a fire-proof safe on site.
Choosing a backup medium
We recommend that you store your backup on a different medium from the one containing your FirstClass system (such as a DAT tape). If you store your backup on the same drive as your system, and the drive is damaged, neither the FirstClass system nor the backup will be available.
Backing up your server
Once you have installed and configured your server, back up the FCNS and FCServer folders (Windows) or the fcns and FirstClass Server folders (Mac).
If you have approved additional volumes, also back up the FCNS folder on each of those volumes.
Mirroring only needs to be paused while backing up the mirrored network store. Resume mirroring when the backup is complete.
Never back up an active server.
Schedule regular backups to ensure that you do not lose data due to hardware malfunctions or other problems.
Backing up your network store
When you back up your network store, you make a copy of all the FirstClass data that it contains. This includes messages, the Directory, and the system configuration.
Set a regular backup schedule and store your backup in a safe place (ideally off-site). You can use any third-party backup utility to back up your FirstClass server.
Make sure you back up the following folders:
• the folder containing the FirstClass network store on the master volume (the volume on which you installed the FirstClass server)
• the folder containing the FirstClass network store on any other approved volumes
• any additional files or folders you may have modified, such as the Inetsvcs.fc file and the CONFIG or CGI-BIN folders.
Back up all your volumes at the same time. If you don't, some of them might be inconsistent and therefore unusable when you restore them.
Never back up an active network store. Back up a paused mirror volume, or shut down the server before performing the backup.
Backing up mirrored content
If you have a network store spread across several volumes, back up all these volumes each time you perform a backup, to avoid breaking cross-volume links.
To back up a mirrored volume:
1 Choose Admin > Control > Pause Mirroring.
If you have a network store spread across several volumes, this will pause activity on all volumes.
2 Use your backup software to copy the mirrored network store.
This network store has the name FCNSnnnn (Windows) or fcnsnnnn (Mac), where nnnn is the four-digit hexadecimal FirstClass ID of the source volume.
3 Restart mirroring after the backup is complete by choosing Admin > Control > Continue Mirroring.
An incremental synchronization will be performed automatically.
Automated backup
You can automate the backup process using a combination of the mirroring feature, backup software, scripting software, and the appropriate commands based on your operating system and whether you are running the server as a Windows service.
Automated backup on Windows
You can use the FCPUTIL utility to automate backups whether you are running as a service or not. The commands needed are FCPUTIL PAUSE and FCPUTIL CONTINUE.
FCPUtil supports many commands, allowing you to automate a variety of tasks. You can get a complete list of commands and syntax by opening a command prompt, changing the path to the path of your executable folder, and entering "FCPUTIL".
Some setup is required to use FCPUTIL.
Automated backup on Mac
You can use either FCPUTIL as described above to automate backups or the fcsctl utility. The commands needed are "fcsctl pause" and "fcsctl continue".
To issue these commands, open a Terminal shell and ensure you are working in the server directory.
From a terminal shell you can issue the command directly as
/usr/sbin fcsctl pause
or
/usr/sbin fcsctl continue
Snapshot Hold & Release
The Snapshot Hold & Release feature is designed to hold the FirstClass server in a consistent state, take a snapshot of the network store, and release the server back to normal operating mode. Once the hold has been initiated, the server will not respond to any operations except the corresponding release request until the hold has been released manually or the allotted time has
expired.
Many FirstClass servers use external disk devices for storage of the FirstClass content. Some of these devices, such as NetApp Filers, offer what is referred to as a snapshot facility. Other backup solutions, such as those from Compaq or EMC, offer similar features to provide very fast backups of large amounts of data. In some cases this capability is known as a "split mirror", although that form can take slightly longer to create than the copy-on-write alternative used in NetApp snapshots. There are also software-based "instant backup" solutions, such as BackupExec's "Advanced Open File Option".
In FirstClass terms, a snapshot is any mechanism (typically provided by a network file server) that enables near-instant flagging of the current state of a file system for later retrieval. This does not need to correspond directly to the snapshot services provided by a NetApp, however it is not suitable for use with a traditional backup due to the time required for the backup copy process. The only FirstClass requirement is that this snapshot process take less than a minute (the default is 60 seconds). The hold operation must be quick because the server process is effectively blocked during the snapshot hold operation, and all requests are deferred until the snapshot release. This permits the snapshot hold to be requested, the snapshot to quickly be taken, and the snapshot release to be requested, allowing the server to
function normally while the backup process begins in parallel. This allows you to do an online backup of your FirstClass server without having to worry about open files or mirroring.
You can invoke the hold and release feature in one of two ways: using the Server Control form or FCPUTIL.
Server Control form method
This method uses the Server Control form in the Core Services folder on the Admin Desktop. Go to the Backups tab on the Server Control form, enter the number of seconds to place the server in a hold state for, and then click Snapshot Hold. When you choose this, you are requesting a snapshot hold and the snapshot backup is taken. The hold is automatically released after the time specified on the form.
The Windows server console below shows what happens:
FCPUTIL method
The second method uses the HOLD command of FCPUTIL, which is described next.
The following result shows both a default (60 seconds) hold request, as well as a timed hold (30 seconds):
FCPUTIL will be automatically disconnected as soon as the HOLD is released.
Restoring your network store
We recommend do backups as a matter of course, but they are of little value unless you know how to use them in case of emergency.
If a problem with your network store occurs, you can do several things, in the order listed below, to detect and solve the problem.
Plan A - Directory rebuild
If your Directory becomes damaged, you must rebuild the Directory. If a rebuild does not solve the problem, you should restore the old Directory immediately.
Never attempt a rebuild without first contacting your reseller or our customer support. Failure to do so can cause irrepairable damage to your network store.
Before you rebuild your Directory, make sure all network store volumes are mounted. For example, if some of your volumes are networked volumes, make sure you are logged into the network. If you fail to do so, the users, conferences and gateways on unavailable volumes may be deleted from the Directory during a rebuild.
A Directory can only be restored from a rebuild once. Therefore, if you discover that the standard rebuild did not resolve your Directory problems, restore the old Directory. If you attempt to rebuild again without performing a restore, you will not be able to recover the previous Directory.
You should not restore the old Directory unless the rebuild has completed and not fixed the problems in your network store. A Restore of the network store from backup should not be used if the standard rebuild has failed. A restore of your User Directory is not the same as a restore of your network store from backup. It does not replace a damaged network store with an earlier version, it merely performs an undo of a rebuild.
A Directory may become damaged as a result of a power or disk failure. Other scenarios under which you would perform a rebuild are:
• inconsistencies in the Directory
Error code 1050: User directory contains inconsistent data. The server has detected problems in the FirstClass Directory, the database that contains users, conferences, and routes registered on the server.
Error code 2007: Lookup error: The recipient’s name could not be found in the Directory.
• unexpected differences between Directory lists sorted by name and by user ID (using the Admin > List Directory command)
• a user that you know exists does not appear in a Directory list
• the following error is generated when a user who appears in a Directory list tries to log in:
Error 4105: File does not exist. This error occurs if a user tries to access a file or folder that does not exist. This usually indicates that the object was manually deleted by the user, rather than FirstClass, or that the file was damaged and removed by Trash Collection.
• duplicate entries exist for a user or conference.
You do not have to rebuild your Directory after a normal backup. Unless you encounter the circumstances described above, or are asked to rebuild by FirstClass Customer Support, you should not rebuild your Directory.
Plan B - restore from backup
Rebuilds (plan A) can be performed without using your backup, but if you need to do a restore (plan B), you’ll be glad you have it.
Never use the File > Restore Old User Directory menu command to restore your network store from a backup. This is used only in conjunction with a rebuild attempt.
A restore recreates an image of your network store as it was when it was last backed up. Any changes made to your network store since then will be lost. Therefore only do a restore when absolutely necessary. This becomes a larger issue the older your backup is.
When to perform a restore
There are several situations in which you need to restore your network store from a backup:
• if you try to rebuild your Directory and the rebuild fails
• if the hard drive has failed
If you use Mac, try using a disk utility like the Norton Disk Doctor for Macintosh (a component for Norton Utilities for Macintosh), or Alsoft’s DiskWarrior.
If you use Windows, try using a disk utility like Norton Disk Doctor or Dr. Watson.
• if you are moving your network store to a new drive.
Performing a restore from a backup
To restore your network store from a backup, follow these steps.
1 Make sure the server is shut down.
2 Copy the following folders from your backup medium to your hard drive, replacing the existing damaged versions:
• the folder containing the FirstClass server
• the folder containing the FirstClass network store on the master volume (the volume on which you installed the FirstClass server)
• the folder containing the FirstClass network store on any other volumes you have approved.
3 In the FirstClass scripting PUT command examples there is a sample script which is used to change the audit start time. Copy the script into FCNS/Server/batch. If you do not do this, audit may begin running when you start your server.
Place the script in the batch folder before starting the server.
4 Although not required, it’s a good idea to rebuild your Directory after restoring your network store. Be very sure you do not select any options at the bottom of the form.
Never attempt a rebuild without first contacting your reseller or our customer support. Failure to do so can cause irrepairable damage to your network store.
Selectively restoring network store objects
You can selectively restore objects in your network store for your users. This selective restore feature allows you to use the Export FirstClass scripting command to restore selective items, such as mail, documents, conferences, folders, and so on, which have been deleted from your system by an audit. Use this feature sparingly and only in emergency situations, as it takes a great deal of time and resources.
Before beginning a partial restore, ensure your entire network store is backed up to another machine.
Once the backup is complete, issue a FirstClass scripting export command to the administrator to individually move items from the backup to your original network store. The FirstClass scripting script must identify exactly what you want to restore and how you want to restore it.
The FirstClass scripting section of our online help contains important information about export. Ensure you have read and understand this information before attempting a selective restore.
If you are restoring an entire container, for example a Mailbox or Application Server folder, the container with the same name must already exist on your Desktop. We recommend that you create a temporary container for your restored information and then drag items from this container to where you want them to reside. This avoids the problem of overwriting or creating duplicates of existing items.
To selectively restore objects in your network store:
1 Shut down your server and Internet Services.
2 Rename your live FCNS folder.
3 Copy your FCNS backup to the same location as your server (FCServer) and, if the backup FCNS folder is named differently, rename it to FCNS.
4 In the backup FCNS, search for the container or item to restore. If you already know the names of the items you want to restore, skip this step.
5 In the backup FCNS, start the server, log in as administrator and send the following Export command to FirstClass scripting:
export desktop <userid> "item" +r
where:
<userid> is the user ID of the user for whom you are restoring data,
"item" is the container or individual item you wish to restore,
If your item has a space in the name, you must use quotes (" ") around the item name. Item names are not case sensitive.
+r (recursive) means to restore all items (do not use this variable to restore individual items).
If you don't use "desktop" and "<userid>" in the script, the server considers administrator the default user.
6 Copy the reply message from FirstClass scripting to a text file and save any/all attachments.
The remaining steps will be done on your live FCNS.
7 Disable the backup FCNS and rename your live network store back to FCNS.
8 Copy and paste the FirstClass scripting script and any/all attachments into a message on your live server.
9 Replace "<objdesc>" (angle brackets included) in the FirstClass scripting script with the path to the correct location, and send the message.
10 Check that the items were restored.
Example 1
Roy Allen has deleted an important email (Financial Report) from his Mailbox. Following the steps described above, the Husky Planes administrator was able to restore this message to his Mailbox. Using the same syntax as in Step 5, the administrator sent this FirstClass scripting script to export the email item 'Financial Report' located in Roy's Mailbox:
export desktop rallen "Mailbox:Financial Report"
The administrator received the reply script from FirstClass scripting.
Next, working in the live server, the administrator copied and pasted the FirstClass scripting script into a message and changed the <objdesc> line to:
SetBase desktop rallen mailbox
to point the FirstClass scripting email to the correct path on Roy Allen's Desktop and restore the email item 'Financial Report' to his Mailbox. The administrator sent the message to FirstClass scripting and Roy now has his important email back in his Mailbox.
Example 2
Amanda Clark, an Avalon Academy employee, is leaving the school . She wants to export all of the contacts in her Contacts folder to Roy Allen, as he is taking over her responsibilities. Following the steps described above, Avalon's administrator was able to export Amanda's entire Contacts folder and send it to Roy. Using the same syntax as in Step 5, the administrator sent this FirstClass scripting script to export Amanda Clark's Contacts folder, located on her Desktop:
export desktop aclark "Contacts" +r
The administrator received the reply script from FirstClass scripting.
Next, working in the live server, the administrator copied and pasted the FirstClass scripting script into a message and changed the <objdesc> line to:
SetBase desktop rallen "Contacts2"
to point the FirstClass scripting email to the correct path on Roy Allen's Desktop where Amanda's Contacts folder will be copied. Then the administrator sent the message to FirstClass scripting. Remember, Roy Allan must have a container called "Contact manager2" already created on his Desktop before running the batch script.
Roy now has a complete copy of Amanda Clark's Contacts folder and all of the contents that reside within it. Notice that the temporary container is a different name from the original container. This is so Roy's original Contacts folder will not be affected in any way. Roy can now pull contacts from the temporary container and place them in his own Contacts folder at his leisure.
Using fcfixvol to set network store file permissions and ownership
Any time you copy a network store from one volume to another or restore from a backup, you must afterward use the fcfixvol utility to set the permissions on the files and folders in the network store.
Using fixvol on Mac
1 Choose Go > Applications.
2 Double-click the Terminal application in the Utilities folder.
3 Enter the following at fcadmin%:
cd “/Library/FirstClass Server”
4 Enter the following at the next prompt:
./fcfixvol <volume > <fcns>
To apply to all volumes, or all post offices on a volume, substitute “all” for either parameter. For example, to apply this command to all network stores on all volumes, use:
./fcfixvol all all
Other examples:
./fcfixvol Master all
./fcfixvol Master fcns8001
Running fcfixvol with a missing argument displays all possible values for that argument on that FirstClass system.
The process may take several minutes depending on the number and size of the network store volumes. The terminal will display the name of each post office it has recognized and tell you when it has finished setting the permissions and ownership on each.
Using fixvol on Linux
1 Ensure you are logged in as fcadmin.
2 Open a Terminal window (Applications > System Tools > Terminal).
3 Enter the following at the prompt:
cd /opt/fcsd
4 Enter the following at the next prompt:
./fcfixvol <volume > <fcns>
To apply to all volumes, or all network stores on a volume, substitute “all” for either parameter. For example, to apply this command to all network stores on all volumes, use:
./fcfixvol all all
Other examples:
./fcfixvol master all
./fcfixvol master fcns8001
Running fcfixvol with a missing argument displays all possible values for that argument on that FirstClass system.
The process may take several minutes depending on the number and size of the network store volumes. The terminal will display the name of each network store it has recognized and tell you when it has finished setting the permissions and ownership on each.
Setting files to lowercase using fcfixvol
To also set all files to lowercase, add the argument -c (f./fcfixvol -c <volume > <fcns> )
| ||