Wazza s QuickStart 15. Leopard Server - Disaster Backup About the Document This document is the 15th in a series of documents describing the process of installing and configuring a Mac OS X 10.5 Server in a school environment. Other documents in this series are available at: servernotes.wazmac.com This document provides information about backing up data on Mac OS X Server, and is divided into 4 sections: Setting up your server - separating data and the OS; Preparing your firewire backup drive; Configuring your server for backups; Accessing and using your backups; Background Do all teachers and students in your school have individual logons, and save their files to their networked Home folders, on a Mac OSX Server? Does your server have a shared Groups folder, to share files between multiple groups or users on the network? Do the Admin staff save all their work to a shared folder on the server? What happens to their work if the server suffers a mechanical failure? Or is stolen? Or is damaged in a fire? Implementing a backup regime will provide an option to restore everyone s data in the event of one of the above disasters occurring at your school. This document details a simple disaster backup and recovery procedure for a Mac OS X Server, used in a school environment. The costs are minimal, yet the results effective. Wazza s QuickStart - OSX Server 10.5-15: Backup for Disaster Recovery 1
What is a Backup? A Backup refers to the process of making a copy of data, so that this data can be retrieved in the case of the original data being lost or corrupted. Backups are useful mainly for two purposes: to restore a computer, and associated data, to an operational state following a disaster (called disaster recovery); to restore small numbers of files after they have been accidentally deleted or corrupted. This document discusses the first of these options - disaster recovery. What do you need? To get started you will need: an external hard disk (preferably with a Firewire interface, available from most PC peripheral equipment vendors); Carbon Copy Cloner (CCC) software. CCC can be downloaded from www.bombich.com. It is free for education use. Wazza s QuickStart - OSX Server 10.5-15: Backup for Disaster Recovery 2
Other documents in this series Installing the Mac OS X Server Software & Configuring DNS Initial software Installation Enabling and configuring DNS Updating the OS X Server software Setting up Services - 1 Services overview Setting up Services - 2 AFP, Web & SMB (Windows) Setting up Services - 3 DHCP Setting up Services - 4 Open Directory Setting up Sharepoints - 1 Groups folder Home directories Setting up Groups and Users Setting up Sharepoints - 2 Netrestore folder Group folder permissions Client Imaging - Create a master image - Create a NetBoot image - Configure NetBoot - Prepare Server - Deploy a master image Managing user Preferences Connecting from Windows XP - WorkGroup Configuring Mac OS X Server as a Primary Domain Controller Connecting OS X Clients to Open Directory Backing up your Server (This document) Configuring your Intranet Enabling Blogs and Wikis Wazza s QuickStart - OSX Server 10.5-15: Backup for Disaster Recovery 3
1. Setting up your server - Separating Data and the OS This document assumes that your users Home folders are stored on a separate drive (the Data drive), or at least a separate partition, to the drive (or partition) containing the operating system (the Server HD), used to boot and run the server. Such an arrangement simplifies the backup process. This document also assumes that the Groups folder is located on the Data drive. This ensures that users information saved in the Groups folder is backed-up regularly with other users data. If your server is not setup like this, then you may need to make some adjustments to the interpretation and application of the information in the notes which follow, to adapt to your particular setup. Wazza s QuickStart - OSX Server 10.5-15: Backup for Disaster Recovery 4
2. Preparing Your Firewire HD Your external hard disk should have a FireWire interface, and be at least as big as the combined size of your Server HD and your Data HD. (These notes will include details of a backup procedure for the Server HD as well, though you could just backup the users data if required). Your external HD will need to be partitioned into multiple drives to mirror the drives of your server. NOTE: Any data stored on the external drive will be erased by the partitioning process! To partition your external drive: 2.1. Connect the external drive to the FireWire port of a Mac OS X computer. It is not necessary to be connected to the server to partition it. (In fact it is probably safer if it is NOT connected to your server!) 2.2. Launch the Disk Utility application. Disk Utility can be found in Applications > Utilities. 2.3. Click on the Partition button at the top of the Disk Utility window. Wazza s QuickStart - OSX Server 10.5-15: Backup for Disaster Recovery 5
2.4. If your drive is a new drive, click on the Options button (at the bottom of the Partition window) and check the formatting of the drive is NOT setup for DOS: Set the format to Apple Partition Map, and click on the OK button to return to the Partition window. 2.5. Under the Volume Scheme popup choose 2 Partitions. 2.6. Provide a suitable name and size for each partition. Choose a name for each partition which is descriptive, but not too easily confused with the names of the internal drives on the server. (The bu in the above example represents backup ). Wazza s QuickStart - OSX Server 10.5-15: Backup for Disaster Recovery 6
2.7. The server backup partition (containing the operating system, etc), should only need to be about 20-80 Gb. If you are storing other files on this drive, such as Netrestore images, these can be excluded from the backup process. This option is discussed later in this document. The data backup partition(s) on the external drive must be at least large enough to hold all the files stored on the corresponding internal drive, with a bit left over (for good measure!) The two partitions we have used in this example will be used to provide the following drives : ServerHD-bu: a server boot drive backup; Data-bu - a data drive backup; 2.8. When you are satisfied with the arrangement you have selected, click on the Partition button. You will be reminded that partitioning the disk will destroy all information currently stored on the disk. Click on the Partition button to continue. 2.9. Your external HD is now ready to be used as a backup drive for your server. Wazza s QuickStart - OSX Server 10.5-15: Backup for Disaster Recovery 7
3. Configuring your Server for Scheduled Backups 3.1. Connect your newly-formatted external backup drive to your server. 3.2. Working at the server (or via ARD or Screen Sharing to access the server desktop), download Carbon Copy Cloner and copy CCC to the Applications folder on the server. Drag CCC from the Applications folder (NOT the disk image) to the Dock, for easy access. Carbon Copy Cloner (CCC) is a free download for schools, and is available from www.bombich.com. 3.3. Launch Carbon Copy Cloner. 3.4. We will setup the ServerHD (the boot volume) first... Select the Source Disk and the Target Disk from the pop-up menus. Wazza s QuickStart - OSX Server 10.5-15: Backup for Disaster Recovery 8
3.5. Under the Target Disk menu click on the Cloning options menu and choose Incremental backup of selected items. Scroll down the list of folders on the Source disk, and de-select any large storage folders (that you may have added independently of the server installation) from the backup process eg - NetRestore images, which you will probably have a copy of elsewhere. (Of course, this choice is optional - just to demonstrate the possibilities. You could also choose to backup the entire drive.) 3.6. When your selections are finalised, click on the Save Task button. 3.7. The Backup Task Scheduler window will open. Provide a name for the backup task (in the left pane), and set a suitable schedule, in the right side of the window. 3.8. Click on the Save button to save the new scheduled task. (You will be asked to enter your admin username and password.) 3.9. Close the Backup Task Scheduler window. Wazza s QuickStart - OSX Server 10.5-15: Backup for Disaster Recovery 9
3.10. Now we need to repeat the process to set a backup schedule for the Data disk. 3.11. In the main CCC window setup the Source Disk and the Target Disk for the Data drive backup. Accept the default exceptions for the source disk. 3.12. Click on the Save Task button. 3.13. Choose a suitable schedule for your data backup. 3.14. Click on the Save button. 3.15. Quit Carbon Copy Cloner. Your scheduled backup is now ready to go! Wazza s QuickStart - OSX Server 10.5-15: Backup for Disaster Recovery 10
4. Accessing and using your Backups 4.1. How do I know if the Backup has run? On the ServerHD, locate Library > Logs > CCC.log Drag this file to the Dock. You can open this file (using the Console application) to view the records of backups. 4.2. Why did I backup the Server HD? If your server becomes dysfunctional, you can attach the external HD to another Mac computer, rename the drives to their original names (Server HD and Data), then re-boot the computer from the backed-up Server drive (by holding down the Option key at startup). You then have an instantly available, fully-functioning clone of your original server (except for the NetRestore folder or anything else not cloned), that you can use until the original is repaired/ restored. 4.3. How do I restore teacher and student data? The Data volume is cloned to the external HD. All you need to do to access your backed-up data is to copy the relevant files from the external HD. In the event that the entire HD needs to be restored to another drive, you can use CCC (or software called SuperDuper) to clone the data backup drive to another drive. However, the data backed up from the server is the data in it s exact form at the time it was copied. Previous backups are overwritten with each new backup. So, if a teacher or student comes to you to retrieve a document that they have accidentally deleted two days ago, and the backup has run in the intervening time, then the document will have been deleted from the backup as well. The procedure outlined in this document is for the recovery of the most recent data, in the case of mechanical failure of the server. Wazza s QuickStart - OSX Server 10.5-15: Backup for Disaster Recovery 11
4.4. Do I need to be logged into the computer for the backup to run? No - CCC runs whether or not you are logged on. 4.5. What if there is a site disaster? If you school experiences a fire, or theft of server equipment, and the backup procedure involves a hard drive attached to the server, there is a pretty good chance that both the server and the backup drive will be destroyed or stolen. To be prepared for such a situation, a copy of your backup data should be stored off site. In the scenario presented in this document you would need a second FireWire HD, and backup schedules for each drive that might look like this for the two (differently named) drives: The drive that is not connected to the server each day is taken off site. This may be every day, or every week, depending on many factors relevant to your particular environment. 4.6. Other Options Other commercial backup software provides a granular incremental backup. This software allows you to go back weeks, months or years to restore an older version of a recently deleted/corrupted document. Mac OS X 10.5 provides this functionality in it s Time Machine software. However, Time Machine takes a heavy toll on the server speed, and it is preset to backup every hour - not really suitable for a server. If you are interested in experimenting with Time Machine as a backup option, have a look at Time Machine Scheduler: http://www.klieme.com/timemachinescheduler.html (I haven t tested this software.) Wazza s QuickStart - OSX Server 10.5-15: Backup for Disaster Recovery 12