CAVEAT: This document and attached scripts and files are provided to our customers as a courtesy. Any issues with using the scripts or information here in should be referred to the operating system vendor, not FirstClass support services.
NB: The fcbackup.sh and fcbackupmirror.sh scripts have been updated for use with FCPUTIL. The older five scripts are included here for completeness.
Backup Strategy
For FirstClass 7.1 or later on Mac OS X 10.2.6 or later and Red Hat Linux 9 or later
Document Version 1.0-13 - 7 July 2005
Werner de Jong, Professional Services Manager
Open Text Corporation - FirstClass Division
Contents
1. Introduction
The FirstClass Network Store (a new name for the FirstClass Post Office, with the new folder name "fcns", changed from "fcpo") contains all messages, documents and uploaded files. Needless to say, preservation of this information is of paramount importance. Therefore every FirstClass Server installation requires a backup strategy.
This document provides information on how to configure FirstClass 7.1 or later for Mac OS X for reliable backups by using the UNIX powers of this unique Operating System. It also describes how to achieve the same for FirstClass 7.1 or later on Red Hat Linux.
2. What Needs to be Backed up?
On Mac OS X, the following two folders (and all sub-folders) need to be backed up:
/Library/FirstClass Server FirstClass software, including the Network Store, to be backed up at least once per month.
/Library/FirstClass Server/Volumes/Master/fcns The default "live" Network Store, to be backed up daily.
/Library/FirstClass Server/Volumes/XXXX/fcns Where XXXX are other volumes that have been approved for use with FirstClass and contain users/conferences.
On Red Hat Linux, the following folders and sub-folders need to be backed up:
/opt/fcsd FirstClass software, including the Network Store, to be backed up at least once per month.
/var/opt/fcsd/volumes/master/fcns The default "live" Network Store, to be backed up daily.
/var/opt/fcsd/volumes/XXXX/fcns Where XXXX are other volumes that have been approved for use with FirstClass and contain users/conferences.
Note: Multiple Network Stores work in conjunction with each other and thus must be backed up and restored as a set.
Important: you can NOT create a reliable backup of the Network Store while FirstClass Server is running with any other software other than FirstClass Mirroring - despite what a third party product may offer in terms of online backups!
2.1 Offline and Online Backups
There are two methods available to backup FirstClass Server:
· Offline backups - FirstClass Server is down while a backup is run.
· Online backups - FirstClass Server remains up while a backup is run, which can be achieved exclusively by using FirstClass Mirroring.
For offline backups, the administrator can simply shutdown the server and run the backup software.
Pros:
· Minimum amount of disk space requirements.
· Simple to setup.
· Simple to restore.
Cons:
· System unavailable during backup.
· A disk failure will result in loss of data of at most one day.
For online backups, the administrator will have to enable FirstClass Mirroring. When the backup software is run, the Mirror needs to be paused by the Administrator. After the completion of the backup, the Mirror can be re-started (continued). FirstClass will take care of the re-synchronisation.
Pros:
· System available during backup.
· Protected against disk failures without loss of data (assuming you mirror to a separate storage device).
· Simple to setup.
· Immediate recovery in the event of loss of the main PO.
Cons:
· A separate disk system (device or networked) is required for optimal reliability.
· Some minimal additional work needs to be done to restore data.
3. Enabling FirstClass Mirroring
To configure FirstClass Mirroring, you need to create a folder or a symbolic link (Mac OS X aliases do not work) to a folder that may reside on a networked machine in the /Library/FirstClass Server/Volumes (Mac OS X) or /var/opt/fcsd/volumes (Linux) folder. The default volume is called Master (or "master" on Linux), which is where the FirstClass Network Store is created upon software
installation.
The easiest way is to create a folder called "Mirror" inside the /Library/FirstClass Server/Volumes (/var/opt/fcsd/volumes for Linux) folder. Ideally, this folder should be a symbolic link to a folder on a secondary disk (not the root) or a networked folder. In this case, you are
protected against primary hard disk failures.
To create a link to a folder Mirror on a Windows machine called hostname on a Mac OS X system using the SMB protocol, you can use the Terminal (in the Applications, Utilities folder) to enter the following commands:
[machine-name:~] fcadmin% cd /Library/FirstClass\ Server/Volumes
[machine-name:/Library/FirstClass Server/Volumes] fcadmin% mount_smbfs -I hostname //workgroup\;userid:password@server/share ./Mirror
Or to create an AppleShare link to another Mac OS X system:
[machine-name:/Library/FirstClass Server/Volumes] fcadmin% mount_afp afp://userid:password@hostname/share ./Mirror
Or if you used Filer to connect to a networked machine:
[machine-name:/Library/FirstClass Server/Volumes] fcadmin% ln -s /Volumes/hostname/share ./Mirror
On Red Hat Linux, you can achieve a similar result with an NFS or an SMB mount, but you have to be logged in as "root". For example:
[root@machine-name /]# cd /var/opt/fcsd/volumes
[root@machine-name volumes]# mount -t smbfs -o username=user,password=password,uid=fcadmin,gid=adm //hostname/share ./mirror
This volume can now be made available to FirstClass. To enable the volume for FirstClass Mirroring, you need to login to FirstClass as user "admin" and double click on the Volumes icon.
A list of available volumes will appear, with one volume marked as "primary". The volume that we have just created is included in the list. You need to control-click (Linux: right-click) on this volume and select the Get Info (Linux: Properties) option from the context menu.
A new window is opened. The status of the new volume needs to be changed to "Limited use" from "Browse only". Although you can use "Full Use" volumes for mirroring, it will complicate the restore of mirror volumes and should only be used if the secondary volume is to be utilised for creation of users and conferences.
After you close this window, you will see the change in status in the volumes list.
Next you need to control-click (Linux: right-click) on the primary volume and select the Get Info (Linux: Properties) option. Select the Disk Mirroring tab and enable the mirroring for this volume by clicking the checkbox. Then select the volume that you have just approved from the dropdown box. Click the OK button to start FirstClass Mirroring.
Note: If you have multiple volumes approved for Full Use and containing FirstClass user or conference data, they must ALL be set up to mirror. You cannot choose to mirror a primary volume and not to mirror a secondary volume that contains conferences.
For more information, please refer to the FirstClass Administrator's Guide.
4. Automated Backups
Both backup methods can be automated by using AppleScript or Bourne Shell scripts. Bourne Shell scripts can be scheduled using the standard "crontab" utility, which is available on Mac OS X and Linux.
There are five sample scripts provided with this document, which are Bourne Shell scripts. Three of these scripts use the "rsync" command as a way to backup data. "rsync" is a fast remote-update protocol enabling the transfer of the differences between two sets of files across a network link. An rsync'ed copy of the FirstClass data can be used for writing to relatively slow mediums, for example tapes.
fcbackup.sh A fully featured application to control your backups, including support for daily, weekly and monthly rollovers.
fcbackuppo.sh Stops the FirstClass Server, copies Network Store to another folder and restarts the Server.
fcbackupmirror.sh Pauses the FirstClass Mirror, copies mirrored data to another folder and resynchronises the Mirror.
The first script (fcbackup.sh) is the most sophisticated and user-friendly one, which can be used in any situation, whether you have enabled mirroring or not.
Of the remaining two, you should use the correct one, depending on whether you have enabled FirstClass Mirroring (use fcbackupmirror.sh) or not (use fcbackuppo.sh).
The last two scripts stop and re-start mirroring, which is required to provide a window for backing up the Mirrored Network Store by an external (third party) backup tool:
stopmirror.sh Stops FirstClass Mirroring, to be run before starting the external backup tool.
startmirror.sh Restarts FirstClass Mirroring, to be run after the backup completed.
If you have approved multiple volumes for full use and these volumes contain user or conference data, you must pause ALL FirstClass Mirroring and backup ALL mirrored Network Stores at the same time. You will need to modify the scripts accordingly. Only the fcbackup.sh script is capable of backing up all Network Stores and Mirror folders automatically, without any modifications.
4.1 The fcbackup.sh Script
The fcbackup.sh script can be fully controlled with command-line options. There are no source code changes required.
This latest version requires FCPUTIL to be installed and configured. See FirstClass Online for details.
The command usage is as follows:
fcbackup.sh [options] mirror | fcpo | fcns | apps
The following command-line options are available:
-h, --help Display this information.
-f, --force-shutdown Force stop of FirstClass Core Server and Internet Services while backing up application folder.
-n, --no-preserve-all Prevents automated backup from setting file owners and permissions, useful when copying across a network.
-d, --daily-rollover Use a daily backup rollover (optional). Everytime this application runs, it overwrites a previous backup. Storage required is twice the size of your Network Store.
-m, --monthly-rollover Use a monthly backup rollover (optional). For creating daily backups, allowing a rollback of one month. Storage required is 31 times the size of your Network Store.
-w, --weekly-rollover Use a weekly backup rollover (optional). For creating daily backups, allowing for a rollback of one week. Storage required is 7 times the size of the Network Store. This behavior is the default.
-v Display application version number and release date.
-V, --version Display application version number and release date and exit.
-t, --trace-level=LEVEL Set trace/logging level: 6 = exceed, 5 = verbose, 4 = info, 3 = warning, 2 = error, 1 = fatal. The default level is "verbose".
-l, --log-file=FILE Write the output to the specified log file. Upon reaching the maximum log file size (100 KBytes), the file will be backed up and a new one is started.
-p, --password=PASSWORD Set rsync password for when authentication is required by the remote rsync server.
-r, --rollover-period=TIME Backup rollover period. Alternative to -d, -m and -w options. Valid periods are: "monthly", "daily" or "weekly" (default).
-D, --destination=PATH|URL The backup destination folder (optional). This script attempts to create the full path if it does not exist, as long as it is on a local device. You can backup from the local machine to a remote rsync server. This is invoked when the destination path contains a :: separator or an rsync:// URL. Remote rsync destination examples:
The default folder is /var/opt/fcsd/Backup (Linux) or /Library/FirstClass Server/Backup (Mac OS X).
mirror|fcpo|fcns|apps Either backup the Mirror (while Mirror is paused), the FirstClass Network Store, (while server is down) or the FirstClass Application folder. This is the only mandatory parameter.
We strongly recommend the use of an external volume as backup destination.
The fcbackup.sh script can automatically backup all Network Stores or Mirrored Network Stores in all available Volumes. It automatically stops the server or pauses mirroring as required, and starts the server or continues mirroring after the backup has finished.
Below are some examples:
Command: fcbackup.sh -D /FCBackup -l /FCBackup/backup.log fcns
Destination folder: /FCBackup
Backing up: Primary Network Store (fcns)
Rollover period: Weekly (default)
Backup path: /FCBackup/<weekday>/<volumename>/<networkstore>
Example: /FCBackup/Tuesday/Master/fcns
Command: fcbackup.sh -D /FCBackup -d fcns
Destination folder: /FCBackup
Backing up: Primary Network Store
Rollover period: Daily
Backup path: /FCBackup/<volumename>/<networkstore>
Example: /FCBackup/Master/fcns
Command: fcbackup.sh -t6 -D /FCBackup -l /FCBackup/backup.log mirror
Destination folder: /FCBackup
Backing up: Mirrored Network Store
Rollover period: Weekly (default)
Backup path: /FCBackup/<weekday>/<volumename>/<networkstoremirror>
Example: /FCBackup/Tuesday/Mirror/fcns8001
Command: fcbackup.sh -D /FCBackup -fm apps
Destination folder: /FCBackup
Backing up: Application Folder while FirstClass Server is stopped (-f option)
Rollover period: Monthly
Backup path: /FCBackup/<monthday>/<appsfolder>
Example: /FCBackup/Day21/FirstClass Server (Mac OS X)
/FCBackup/Day21/fcsd (Linux)
Command: fcbackup.sh -l /tmp/backup.log -D rsync://host/backup mirror
Destination folder: /FCBackup
Backing up: Mirrored Post Office to a remote RSYNC server
Rollover period: Weekly (default)
Backup path: rsync://host/backup/<weekday>/<volumename>/<networkstoremirror>
Example: rsync://host/backup/Tuesday/Mirror/fcpo8001
4.2 The fcbackuppo.sh and fcbackupmirror.sh Scripts
The fcbackuppo.sh and fcbackupmirror.sh scripts have been pre-configured for Mac OS X as follows:
· The Network Store is located at /Library/FirstClass Server/Volumes/Master (POPATH)
· The Mirrored Network Store is located at /Library/FirstClass Server/Volumes/Mirror (MIRRORPATH)
· The Backup folder is located at /Library/FirstClass Server/Backup (BACKUPPATH)
· The Backup log file is called /Library/FirstClass Server/Backup.log (BACKUPLOG)
These paths should be changed for Linux systems:
· The Network Store is located at /var/opt/fcsd/volumes/master (POPATH)
· The Mirrored Network Store is located at /var/opt/fcsd/volumes/mirror (MIRRORPATH)
· The Backup folder is located at /var/opt/fcsd/backup (BACKUPPATH)
· The Backup log file is called /var/opt/fcsd/backup.log (BACKUPLOG)
The scripts contain some simple code to check if the Network Store or the Mirrored Network Store and Backup sub-folders exist. If the Backup destination does not exist, the script will attempt to create the folder. If the Network Store or the Mirrored Network Store can not be found or the Backup destination can not be created, the backup will fail.
You can modify these settings by editing the scripts in any text editor (for example: TextEdit or vi). We strongly recommend the use of an external volume as backup destination.
4.3 Running the Scripts
All scripts need to be run by the Mac OS X or Linux user "fcadmin".
If this fails, then the issue is likely permissions related. You should run "fcfixvol", and ensure all work is done within the "fcadmin" account.
Although we do not recommend or require the use of "root" for FirstClass Server or Internet Services, you could run the scripts as "root". On Mac OS X Client you will need to enable the "root" user first (on Mac OS X Server this user is enabled by default, and always available on Linux). This can be done with Netinfo Manager in the Applications, Utilities folder. Click the lock to allow changes to this form, and select the Security->Enable Root User menu option. You will be prompted to set a password for the root user. Don't forget to click the lock again to prevent further changes.
To run the scripts, save the files to a convenient location, for example for a Mac OS X system in /Library/FirstClass Server, open a Terminal and enter the following commands to backup the FirstClass Mirror:
[machine-name:~] fcadmin% chmod +x /Library/FirstClass\ Server/fcbackup.sh
[machine-name:~] fcadmin% /Library/FirstClass\ Server/fcbackup.sh -t6 mirror
31Mar06 16:18:15 - (Info) FirstClass Automated Backup 1.0-13 (Linux) Started
31Mar06 16:18:15 - (Exceed) Checking potential Network Stores 'fcns,'
31Mar06 16:18:16 - (Exceed) Checking path '/var/opt/fcsd/volumes/master/fcns'
31Mar06 16:18:16 - (Exceed) Checking folder 'fcns'
31Mar06 16:18:16 - (Exceed) Skipping Network Store 'master/fcns': Mirror backup requested
31Mar06 16:18:16 - (Exceed) Checking potential Network Stores 'fcns8001,'
31Mar06 16:18:16 - (Exceed) Checking path '/var/opt/fcsd/volumes/mirror/fcns8001'
31Mar06 16:18:16 - (Exceed) Checking folder 'fcns8001'
31Mar06 16:18:16 - (Verbose) Pausing FirstClass Mirroring...
FCPUtil Version 8.0.5 [Nov 22 2004]
Copyright (c) 2004 by Open Text Corporation
Using settings file: /opt/fcsd/fcputil.fc
31Mar06 16:18:16 - (Exceed) Waiting 10 seconds for command to complete...
31Mar06 16:18:27 - (Verbose) FirstClass Mirroring Paused.
31Mar06 16:18:27 - (Info) Backing up Mirror 'mirror/fcns8001'
31Mar06 16:18:27 - (Verbose) Synchronizing Data...
31Mar06 16:18:27 - (Verbose) Preserving all file attributes
31Mar06 16:18:27 - (Verbose) Copying from: /var/opt/fcsd/volumes/mirror/fcns8001
31Mar06 16:18:27 - (Verbose) Copying to: /var/opt/fcsd/Backup/Friday/mirror
Number of files: 18877
Number of files transferred: 2
Total file size: 540366771 bytes
Total transferred file size: 1184 bytes
Literal data: 1184 bytes
Matched data: 0 bytes
File list size: 288271
Total bytes sent: 289559
Total bytes received: 60
sent 289559 bytes received 60 bytes 579238.00 bytes/sec
total size is 540366771 speedup is 1865.78
31Mar06 16:18:27 - (Verbose) Data Synchronized in 0:00:00
31Mar06 16:18:27 - (Verbose) Continuing FirstClass Mirroring...
FCPUtil Version 8.0.5 [Nov 22 2004]
Copyright (c) 2004 by Open Text Corporation
Using settings file: /opt/fcsd/fcputil.fc
31Mar06 16:18:28 - (Exceed) Waiting 5 seconds for command to complete...
31Mar06 16:18:33 - (Verbose) FirstClass Mirroring Continued.
31Mar06 16:18:33 - (Info) FirstClass Automated Backup 1.0-13 (Linux) Finished
[machine-name:~] fcadmin% exit
logout
[Process completed]
The "chmod" command makes the scripts executable, which only needs to be done once.
To initiate a backup to a remote RSYNC server with IP address 172.31.1.156, the command and output look like this:
10Feb04 11:31:27 - (Info) FirstClass Automated Backup 1.0-9 (Darwin) Started
10Feb04 11:31:27 - (Verbose) Stopping FirstClass Core Server...
/usr/sbin/fcsctl stop: FirstClass Core Server (fcsd) stopped (7807).
fcsd: Signal received - SIGTERM (fast shutdown).
10Feb04 11:31:27 - (Exceed) Waiting 30 seconds for command to complete...
10Feb04 11:31:57 - (Verbose) FirstClass Core Server Stopped
10Feb04 11:31:57 - (Info) Backing up Post Office 'Master/fcpo'
10Feb04 11:31:57 - (Verbose) Synchronizing Data...
10Feb04 11:31:58 - (Warning) Connecting to remote rsync server
10Feb04 11:31:58 - (Verbose) Preserving all file attributes
10Feb04 11:31:58 - (Verbose) Copying from: /Library/FirstClass Server/Volumes/Master/fcpo
Number of files: 2575
Number of files transferred: 2374
Total file size: 42133536 bytes
Total transferred file size: 42133536 bytes
Literal data: 42133536 bytes
Matched data: 0 bytes
File list size: 29239
Total bytes written: 42261033
Total bytes read: 38024
wrote 42261033 bytes read 38024 bytes 4976359.65 bytes/sec
total size is 42133536 speedup is 1.00
10Feb04 11:32:07 - (Verbose) Data Synchronized in 0:00:08
10Feb04 11:32:07 - (Exceed) Skipping Mirror 'Mirror/fcpo8001': Post Office backup requested
10Feb04 11:32:07 - (Verbose) Starting FirstClass Core Server...
Falling back to user 'fcadmin' (502).
/Library/FirstClass Server/./fcsd.rez: OK
FirstClass Server now running as daemon process 7863.
Server was started as user 'root' (0) in group 'staff' (20).
Server now running as user 'fcadmin' (502) in group 'admin' (80).
fcsd: Operating system last booted: Mon Feb 9 09:15:58 2004
fcsd: Number of processors installed: 1
fcsd: System open file limit: 30000 files
fcsd: System open file (VNODE) limit: 30000 vnodes
fcsd: Server open file limit: 30000 files
fcsd: This server is configured for 15 network sessions.
Created 10 OS worker threads.
fcsd: FirstClass Server 7.1 (Build 135) started.
/usr/sbin/fcsctl start: FirstClass Core Server (fcsd) started (7863).
10Feb04 11:32:12 - (Exceed) Waiting 5 seconds for command to complete...
10Feb04 11:32:17 - (Verbose) FirstClass Core Server Started
10Feb04 11:32:17 - (Info) FirstClass Automated Backup 1.0-9 (Darwin) Finished
[machine-name:~] fcadmin%
Alternatively, you can start the script as a parameter to the Bourne Shell:
[machine-name:~] fcadmin% /bin/sh -c "/Library/FirstClass\ Server/fcbackup.sh mirror"
On a Linux system, a backup of the primary Network Store would require the following command:
10Feb04 11:37:02 - (Info) FirstClass Automated Backup 1.0-9 (Linux) Started
10Feb04 11:37:02 - (Verbose) Stopping FirstClass Core Server...
/opt/fcsd/fcsctl stop: FirstClass Core Server (fcsd) stopped (6595).
10Feb04 11:37:03 - (Exceed) Waiting 30 seconds for command to complete...
fcsd: Signal received - SIGTERM (fast shutdown).
10Feb04 11:37:33 - (Verbose) FirstClass Core Server Stopped
10Feb04 11:37:33 - (Info) Backing up Post Office 'master/fcpo'
10Feb04 11:37:33 - (Verbose) Synchronizing Data...
10Feb04 11:37:33 - (Warning) Connecting to remote rsync server
10Feb04 11:37:33 - (Verbose) Preserving all file attributes
10Feb04 11:37:33 - (Verbose) Copying from: /var/opt/fcsd/volumes/master/fcpo
rsync[6786] (sender) heap statistics:
arena: 802816 (bytes from sbrk)
ordblks: 19 (chunks not in use)
smblks: 2
hblks: 0 (chunks from mmap)
hblkhd: 0 (bytes from mmap)
usmblks: 0
fsmblks: 80
uordblks: 658432 (bytes used)
fordblks: 144384 (bytes free)
keepcost: 126368 (bytes in releasable chunk)
Number of files: 6315
Number of files transferred: 5991
Total file size: 199256548 bytes
Total transferred file size: 199256548 bytes
Literal data: 199256548 bytes
Matched data: 0 bytes
File list size: 66336
Total bytes written: 199581106
Total bytes read: 95896
wrote 199581106 bytes read 95896 bytes 3663798.20 bytes/sec
total size is 199256548 speedup is 1.00
10Feb04 11:38:27 - (Verbose) Data Synchronized in 0:00:54
10Feb04 11:38:27 - (Verbose) Starting FirstClass Core Server...
/opt/fcsd/./fcsd.rez: OK
FirstClass Server now running as daemon process 6801.
Server was started as user 'root' (0) in group 'fcadmin' (501).
Server now running as user 'fcadmin' (501) in group 'adm' (4).
fcsd: Server open file limit: 65536 files
fcsd: This server is configured for 50 network sessions.
Created 18 OS worker threads.
fcsd: FirstClass Server 7.1 (Build 135) started.
/opt/fcsd/fcsctl start: FirstClass Core Server (fcsd) started (6801).
10Feb04 11:38:33 - (Exceed) Waiting 5 seconds for command to complete...
10Feb04 11:38:38 - (Verbose) FirstClass Core Server Started
10Feb04 11:38:38 - (Info) FirstClass Automated Backup 1.0-9 (Linux) Finished
[fcadmin@machine-name fcadmin]$
5. Scheduled Backups
The scripts can be scheduled using the "crontab" utility. You can create a text file (called a crontab file), enter the time and frequency that you want to run the script and pass it to the "cron" process. A crontab file consists of lines of six fields each. The fields are separated by spaces or tabs. The first five are integer patterns that specify the following:
minute (0-59),
hour (0-23),
day of the month (1-31),
month of the year (1-12),
day of the week (0-6 with 0=Sunday).
Each of these patterns may be either an asterisk (meaning all legal values) or a list of elements separated by commas. An element is either a number or two numbers separated by a minus sign (meaning an inclusive range). Note that the specification of days may be made by two fields (day of the month and day of the week). Both are adhered to if specified as a list of elements.
The sixth field of a line in a crontab file is a string that is executed by the shell at the specified times. A percent character in this field (unless escaped by \) is translated to a NEWLINE character.
Only the first line (up to a `%' or end of line) of the command field is executed by the shell. Other lines are made available to the command as standard input. Any line beginning with a `#' is a comment and will be ignored. The file should not contain blank lines.
For example, create a file called "cronjobs.txt" containing the following three lines, which will backup the FirstClass Network Store Mirror every weekday morning at 1:15am and at 5am on Saturday and Sunday (see example attachment cronjobs-rsync-backup.txt), using a weekly rollover period and the default backup destination. It will also backup the FirstClass Applications folder every Sunday at five past midnight, using a monthly rollover period. The output is redirected to a file:
5 0 * * 0 /bin/sh -c "/Library/FirstClass\ Server/fcbackup.sh -l /tmp/backup.log -m apps"
15 0 * * 1-5 /bin/sh -c "/Library/FirstClass\ Server/fcbackup.sh -l /tmp/backup.log mirror"
0 5 * * 0,6 /bin/sh -c "/Library/FirstClass\ Server/fcbackup.sh -l /tmp/backup.log mirror"
The corresponding Linux cronjobs.txt file would look like this:
5 0 * * 0 /bin/sh -c "/opt/fcsd/fcbackup.sh -l /tmp/backup.log -m apps"
15 0 * * 1-5 /bin/sh -c "/opt/fcsd/fcbackup.sh -l /tmp/backup.log mirror"
0 5 * * 0,6 /bin/sh -c "/opt/fcsd/fcbackup.sh -l /tmp/backup.log mirror"
Alternatively, you can use "crontab" to schedule a backup window (see example attachment cronjobs-external-backup.txt):
10 0 * * 1-5 /bin/sh -c "/opt/fcsd/stopmirror.sh"
10 2 * * 1-5 /bin/sh -c "/opt/fcsd/startmirror.sh"
Here mirroring is paused every working day at ten minutes past midnight, and re-synchronised at ten minutes past two.
To schedule these jobs, open a Terminal and enter the following commands:
[machine-name:~] fcadmin% crontab /Library/FirstClass\ Server/cronjobs-rsync-backup.txt
[machine-name:~] fcadmin% exit
logout
[Process completed]
You can use the following command to check if your cronjobs have been loaded properly:
[machine-name:~] fcadmin% crontab -l
0 0 * * 0 /bin/sh -c "/Library/FirstClass\ Server/fcbackup.sh -l /tmp/backup.log -m apps"
15 0 * * 1-5 /bin/sh -c "/Library/FirstClass\ Server/fcbackup.sh -l /tmp/backup.log mirror"
0 5 * * 0,6 /bin/sh -c "/Library/FirstClass\ Server/fcbackup.sh -l /tmp/backup.log mirror"
[machine-name:~] fcadmin%
These jobs remain scheduled, even if you reboot your system. To remove them, you can use the command “crontab –r”.
All you have to do is to check the /tmp/backup.log file regularly for errors.
6. Restoring Data from Backups
In case of a total system crash, it is recommended that you re-install FirstClass Server in order to restore Desktop icons and the automatic start-up scripts, and then restore the FirstClass Applications folder from your most recent backup, followed by restoring the Network Store.
For further information, please refer to the "Restoring your Network Store" (or "Restoring your Post Office") section in the FirstClass Administrator's Guide, which can be found in the Online Books folder inside the Admin Help folder on the Administrator's Desktop in FirstClass.
Appendix A. Configuring your System to Run an RSYNC Server
Important note: You will have to be confident using the Terminal application and a plain-text editor like vi, before you try this. Mistakes might require you to re-install the Operating System!
An alternative to using shared folders is to configure an rsync server on a remote machine. This can be another Mac OS X system, or any Linux server. Most Linux servers have rsync server already enabled.
Unfortunately, the version of rsync (2.5.7) that is installed on Mac OS X 10.2.8 or earlier does not work properly. In this case you need to download the latest version of rsync from http://samba.anu.edu.au/rsync/, compile the software (there is no binary distribution for Mac OS X available) and install it. For compiling source code on your Mac, you need to install the development supplement from the Mac OS X CD-ROM. The rsync version at the moment of writing is 2.6.0. For detailed instructions, please check out the documentation provided with the rsync source code.
To enable rsync server on a Mac OS X system, you will have to go through the following steps:
o Configure system files for rsync to run as a server.
o Create a folder for the automated backups.
o Create an rsyncd.conf file.
Automated RSYNC Server Configuration
To simplify this process, we have supplied the fcbackupinit.sh script. This is an initialization script, which is to be used in conjunction with the fcbackup.sh scr |