Data Backup Policies and Procedures for the Installation at the University of Delaware

DEOS Technical Note # 21

Dr. Geoffrey E. Quelch

Research Fellow,
University of Delaware,
Center for Climatic Research


   University of Delaware
   NewarkDE 19716
   
  

Version 2

All material herein is copyright by the Delaware Environmental Observing System

Published: January 13th 2006

Revision History
Revision 1.12006/01/13GEQ
Initial version
Revision 1.22006/01/26GEQ
Added /usr/data1 to the backup list for deosoracleserver.
Revision 1.32006/01/27GEQ
Changed the burn command to growisofs and made the dvdrecord one a footnote.
Revision 1.42006/07/31GEQ
Changed the size calculation to multiply by 2048, the size of the blocks returned my the mkisofs print size command. Corrected size of final field on volume label to 9 or fewer characters.
Revision 2.12006/09/26GEQ
Incremented version number of this document to 2.
Revision 2.22006/10/31GEQ
Added machine naming scheme.
Revision 2.32006/11/09GEQ
Completed backup setup and documented final alterations.
Revision 2.1.72008/09/08GEQ
Updated with information correct as of this date.

Table of Contents

Introduction
Systems and Database Backup Device and File-system
Computer System Naming Convention
Location
Usage Type
Function
Disambiguator
Examples
Systems Backups
Schedule
Old Web Server (deosserver)
Production Web and Database Server (npws01)
Modem Server (deosmodemserver)
Database Backups
Production Database Backups
Noarchivelog Mode or Cold Database Backups
Mantis Database Backups
Long-Term Data Backups
Creating Long-Term Data Backups
Labeling DVD Backups

Introduction

This document outlines the backup regime for the systems making up the DEOS install at the University of Delaware.

In the discussions below a level 0 backup is defined such that all data is stored. A level N backup stores everything changed since the last backup with a smaller number and N > 0 and N ≤ 9.

Systems and Database Backup Device and File-system

The systems and database backups described here are implemented to a pair of external 200 Gbyte USB devices. The device is mounted at /media/usbdisk/ for the system backups and /media/usbdisk1/ for the database backups. The host npfbs00 is used for the destination of all backups.

Computer System Naming Convention

This section describes the computer naming convention in use at Delaware following the system upgrade to DEOS version 2.1.1.

Use of Sentence Case in Machine Names

All names shall be constructed using numerals and lower case letters only.

Location

The first component in the name shall indicate the location of the machine.

Table 1. Location Components

Location CodeDescription
aAdams County, CO based machines
cChester County, PA based machines
kKent County, DE based machines
nNew Castle County, DE based machines
sSussex County, DE based machines

Usage Type

The second component in the name shall consist of a single character indicating the usage type of the machine.

Table 2. Usage Type

Usage CodeDescription
dDevelopment machines
mMiscellaneous machines
pProduction machines
tTest machines

Function

The third component in the name shall consist of either two or three characters and indicate the function of the machine.

Table 3. Function Components

Function CodeDescription
dbsDatabase server
fbsFile backup server
gsGIS server
msModem server
wsWeb (http) server

Machines that Provide Two or More Services

In the case of a machine doing double, or triple duty, the function the user sees directly would take precedence, i.e.. a machine acting as a web server and a database server would be called a ws as that's what the user sees.

Disambiguator

The fourth and final component of the name shall be a double-digit number intended to differentiate machines with identical names resulting from application of the first three components. The disambiguation field shall be 00 (zero) for the first machine receiving this name and incremented as new machines of the same name are installed. The numbers once used shall not be re-used and the name will thus be retired once the hardware using that name is retired.

Machines Changing Function

In the case of a machine changing function, it will be renamed according to this scheme utilizing the next available disambiguator value.

Examples

Some names under this system might be.

Table 4. Examples of Names

Old NameNew NameDescription
deosoracleservernpdbs00The production database server in Newark, New Castle County, DE..
deosservernpws00The production web server in Newark, New Castle County, DE..
deosmodemsservernpms00The production modemserver in Newark, New Castle County, DE..
deostestntws00The test web server in Newark, New Castle County, DE (quite possibly doing database server work also.)
N/Alpms00The production modem server in Lewes. Sussex County, DE.

Systems Backups

This section describes the backup details for the machines making up the core DEOS systems.

Site-Specific Disclaimer

The backups described here are for the systems at the University of Delaware and so will need to be adapted, changed or even replaced for other installations. The backups here assume that a removable device is the destination of the backup files; in this case one of a pair of 200 Gbyte USB external drives.

The scripts used to backup systems are based on the templates deos/bin/deos_dump_local.sh and deos/bin/deos_dump_remote.sh. They take one argument, the numerical dump level needed (a number between 0 and 9). The DEST parameter inside the script specifies the the directory or remote connection plus path to be used to store the file.

This section does not cover backup of the databases which is dealt separately, below.

Schedule

The schedule for backups, since it is to disk and thus not as restricted as a tape-based system, is based on a weekly full (level 0) backup, performed on Monday night. Level 9 backups are performed on Tuesday, Wednesday, Friday and Saturday. A level 5 backup is performed on Thursday, and a level 1 on Sunday. This scheme results in only two restore operations ever being required to fully recover a system to a specific date.

The other main advantage is that it allows one week of backups to be off-site, while the second week is written, so in the event of a catastrophic failure, destroying the computer system and the currently active backup device, at most seven days of data are lost.

Old Web Server (deosserver)

The web server backup files are stored in /mnt/usbdisk/backups/deosserver/.

The table below describes the details of all the file-systems that are backed-up, as well as what they contain, for this machine.

Table 5. File-systems Backed-Up on this Machine [1]

File-systemBackup FileTOC FileDescription
/root_Nroot_toc_NSystem files.
/bootboot_Nboot_toc_NFiles required to boot the system.

Production Web and Database Server (npws01)

The database server backup files are stored in /mnt/usbdisk/backups/npws01/.

The table below describes the details of all the file-systems that are backed-up, as well as what they contain, for this machine.

Table 6. File-systems Backed-Up on this Machine [2]

File-systemBackup FileTOC FileDescription
/root_Nroot_toc_NSystem files.
/usr/datausr_data_0_Nusr_data_0_toc_NRaw station data files, both pre- and post-ingest.
/usr/localusr-local_Nusr-local_toc_NLocally installed files
/bootboot_Nboot_toc_NFiles required to boot the system.
/homehome_Nhome_toc_NUser files and part of the Oracle install.
/oracleoracle_Noracle_toc_NContains the Oracle software installation.

Modem Server (deosmodemserver)

The modem server backup files are stored in /media/usbdisk/backups/deosmodemserver/.

TBD

Database Backups

The database backup files are stored in /media/usbdisk1/oracle/DBNAME/ where DBNAME is the name of the database (the Oracle SID) currently this is NPDB01.

The database backup is performed from within the Oracle Enterprise manager (OEM) to the /usr/data/oracle/backups directory on the database host. A cron job synchronizes these files, deleting old ones as necessary, to the npfbs00 machine.

Site-Specific Disclaimer

The backups described here are for the systems at the University of Delaware and so will need to be adapted, changed or even replaced for other installations. The backups here assume that a removable device is the destination of the backup files; in this case one of a pair of 200 Gbyte USB external drives.

Production Database Backups

Schedule

The schedule for backups of the production database, since it is to disk and thus not as restricted as a tape-based system, is based on a weekly full (level 0) backup, performed on Monday night and level 1 backups on all other days. This scheme results in only two restore operations ever being required to fully recover a system to a specific date.

Noarchivelog Mode or Cold Database Backups

Schedule

The following section describes how to backup a database which is in noarchivelog mode, or to create a full backup of a cold database.

Component Scripts

The following table describes the template files stored in deos/database/backup/ and what each one does.

Table 7. Files Utilized in Setting Up Noarchivelog Mode or Cold Database Backups

FileDescription
catalog_backup.rcvContains the rman commands to create a level 0 backup of the database. This file needs to have mode 600 set to hide it's contents from other users as it contains passwords. To use it, the operator must run the command rman and then type "@catalog_backup.rcv".

Mantis Database Backups

Schedule

A complete backup of the MySQL Mantis database is taken once a day. The output is stored in /media/usbdisk/backups/npfbs00/mantis.dmp.

Long-Term Data Backups

The data from networks consisting of point measurements (essentially everything except the NIDS network) are fully recorded in the database during the ingest process. As such, there will already exist a backup of that data as part of the database backup. In order to prevent the file-system containing the already-ingested raw data files filling up, a long-term storage procedure will be performed as needed. It is anticipated that this will be performed annually.

Site-Specific Disclaimer

The procedures and policies described here are for the systems at the University of Delaware and so will need to be adapted, changed or even replaced for other installations. The backups here assume that a writable DVD device is the destination of the long-term backup files.

Creating Long-Term Data Backups

The following procedure outlines how to create an ISO-9660 compatible file-system on a DVD. The procedure as written requires enough space to store the directory hierarchy and the ISO image of the hierarchy simultaneously. The procedure is adapted from this link.

The following procedure must be run as the root user.

Procedure 1. Create a DVD of Raw Data Files

  1. Create and change to a directory in a file-system with enough space ~5Gbytes, to store the data that will make up the DVD.

  2. Copy all files to this directory. (This directory will form the root of the file-system on the DVD.)

  3. Create a file called README in this directory and describe the contents of the DVD in the file.

  4. Check the size of the copied files by running the command mkisofs -print-size ./.

  5. The number the command returns is the number of 2048 byte blocks needed for the ISO image.

  6. Multiply the number of blocks by 2048. If the result is less than 4.3 x 109, the data will fit on a DVD.

  7. To create the ISO image file, run the command mkisofs -o file-name.iso -J -l -R -V volume-label ./. [3] Make sure that the destination file-system where file-name.iso will be written is large enough and isn't in the source directory.

  8. To test how the DVD will look to a user before burning, run the following command mount -o loop -t iso9660 file-name.iso /mnt/dvdro.

  9. Run the following command umount /mnt/dvdro.

  10. If the directory hierarchy looks OK, insert a DVD into the DVD writer.

  11. To burn the DVD, run the command growisofs -Z /dev/scd0=file-name.iso -speed=4 (the device name is correct for deosoracleserver as of writing.) [4]

  12. Eject the disk and re-insert the disk. (This step is necessary to complete the burn operation, the next step will fail if it isn't done.)

  13. To verify the disk, run the command mount /mnt/dvdro (this assumes that there is an appropriate entry in the /etc/fstab file.)

  14. Label the media and media case as described below.

  15. It is highly recommended that two copies of each disk are burnt, one stored on site, the other off-site. If so repeat the DVD burn step.

Labeling DVD Backups

The following sections describe the steps recommended for labeling the DVD. Labeling consists of three items, a volume label, a media label and a media case label.

Volume Label

During the creation of the on-disk ISO file the -V option allows a volume label to be written to the image. This label appears when the DVD itself is mounted, for example, in Windows Explorer.

For the long-term data backup application it is recommended that the volume label be created utilizing the fields in the following table. The fields make up a single record of 32 or fewer characters.

Table 8. Volume Label Field Descriptions

No.Field NameWidth[a]Description
1Data Type12What type of data is stored. Possible entries could be, 'Station Data', 'Radar Data'.
2Separator1A single space character.
3Time9This is the year or year range the data covers, including partial years. An example might be 2004-2005.
4Separator1A single space character.
5Unassigned≤ 9The remaining space (of nine or fewer characters) may be used for anything pertinent.

[a] This indicates the maximum suggested width.

Media Label

The media itself should have a label, such that the media and the case storing the media can be re-united if separated. As such, the media label is a minimal requirement.

Execution of Markings

If possible, the media label should be added in permanent marker and legibly written.

For the long-term data backup application it is recommended that the media label be created utilizing the record in the following table.

Table 9. Media Label Description

NameDescription
Archive IDThis would be the text "Archive Data #" plus a sequential number providing a unique ID within the set of DVDs burnt using this procedure.

Media Case Label

The media case itself should have a label, such that the media and the case storing the media can be re-united if separated. The media label is the primary external information provider for the contents of the disk.

Execution of Label Marking

If possible, the media case label should be typed. A possibility would to print a page using a word processor, cut the paper to size and place the label in the media. If the text is hand-written, make sure it is legible.

For the long-term data backup application it is recommended that the media case label be created utilizing the records in the following table. The data below should be considered a minimum, the person generating the media is encouraged to add any additional pertinent data. After the 6 suggested items.

Table 10. Media Case Label Record Descriptions

No.NameFixed TextVariable Text Description
1Archive IDArchive Data:See above, this item must be present, and match the description on the media as described above.
2Number in SetDiskIt is recommended that at least two DVDs are burnt for each ISO file image created. This field indicates which DVD in the set this is, and the total number in the set.
3Data TypeData Stored:What type of data is stored. Possible entries could be, 'Station Data' or 'Radar Data'. A list of which stations, or networks are included, or excluded might be also be appropriate.
4Data TimeData Time Range:This is the year, or year range, the data covers, including partial years. An example might be 2004-2005. Additional text may be appropriate, for example providing more details of what range, or excluded items are not available.
5Disk Generation TimeGenerated on:This would be the date that the disk was burnt pre-pended with "Generated on:". An example might be "Generated on: 2005/01/12". It is recommended that the date string be YYYY/MM/DD to avoid confusion.
6Responsible PartyGenerated by:This would be the name and email address (in parentheses) of the person generating the disk. An example might be "John Doe (jdoe@udel.edu)".


[1] TOC is a table-of-contents file, readable by the restore program.

N is the backup level.

[2] TOC is a table-of-contents file, readable by the restore program.

N is the backup level.

[3] The command line options are:

-J: Generate Joliet directory records in addition to the iso9660 filenames
-l: Use full 31 character filenames
-R: Generate RockRidge protocol records
-V: Use a volume label.
volume-label: See the next section for recommendations on the text for the volume-label option.

[4] If the main command fails, try this command dvdrecord -dao -dev=1,0,0 file-name.iso (the device number is correct for deosoracleserver as of writing.)