You are here: IRS>Smart Web>WeeklyBackup (15 Nov 2008, DonBarry)

SMART Weekly Backup

SMART source code and calibration files are backed up to DVD (usually once a week) and the DVDs stored off site in case of major system failures.

Until 21 January 2005 the weekly backup was stored on individual CDs

Afterwards, until 16 May 2008 the backups were made onto single DVDs.

Afterwards and until November 2008 three DVDs were used containing respectively:

  • SMART source code
  • Formatted SMART Calibration files
  • Unformatted SMART Calibration files

Here is the script to run the backup: (ssh in isc53 since it has a lot of empty space)

#!/bin/sh

echo "Creating directories..."
\mkdir -p /tmp/SMART_BU/
\mkdir -p /tmp/SMART_BU/smart/
\mkdir -p /tmp/SMART_BU/smart_cal/

echo "Copying from the repositories..."
\cd /tmp/SMART_BU/smart/
svn co https://isc.astro.cornell.edu/svn/smart/trunk/
svn co https://isc.astro.cornell.edu/svn/smart/branches/testing/
\cd /tmp/SMART_BU/smart_cal/
svn co https://isc.astro.cornell.edu/svn/smart_cal/trunk/

echo "Sync'ing files to copy..."
\cd /tmp/SMART_BU/
\mkdir -p /tmp/SMART_BU/smart_backup/
rsync -aC /tmp/SMART_BU/smart/ /tmp/SMART_BU/smart_backup/smart/
rsync -aC /tmp/SMART_BU/smart_cal/ /tmp/SMART_BU/smart_backup/smart_cal/

echo "Archiving..."
\tar zcvf /tmp/SMART_BU/smart_backup.tar.gaz /tmp/SMART_BU/smart_backup/

echo "Done... file is ready to burn"
echo "/tmp/SMART_BU/smart_backup.tar.gz"

Then burn the file on a DVD


Old way

Current Backup Scripts

These are the current backup scripts (17 October 2008).
Copy, use and modify as necessary :

runsmartbackup1?

runsmartbackup2?

runsmartbackup3?

warning.gif The scripts are currently set to assume that the relevant home directory is "/home/phall/" and that the relevant SMART and Calibration trees are in that directory. Change this if necessary.

The scripts assume that the DVD drive being used is called "hdd". If it is called anything else edit the scripts and use the different name.

To run the backup :

  • Load a DVD-R in the DVD drive. (Use a "write once only" type, this is an archive.)

  • Ensure that you have the necessary authority to the DVD drive.
    You may need to be logged on as "root" depending on system configuration and which DVD drive you are using.
    At the prompt type:

> cd /home/phall/bin (Or other relevant directory name if you are running the script from another directory.)

> ./!runsmartbackupX (where X = 1,2,3, ...)

  • Relevant messages scroll as the backup script runs. The process normally takes about 10-15 minutes.

  • It is possible that a backup can be larger than a single DVD.
    If this is so the backup scripts must be re-written to subdivide the backup over more DVDs.

  • Currently each backup script checks the size of the backup
    If the back up data is too much for the DVD the following messages will appear at the prompt:

"!runsmartbackupX : WARNING - File /home/phall/backup/zz.iso larger than available DVD space"

"!runsmartbackupX : WARNING - Backup job terminated"

If this occurs the backup scripts must be re-written to subdivide the backup over more DVDs.

  • After backup the backup script checks the amount of data written to the DVD.
    To do this the script causes the DVD drive to eject and then re-load the DVD.

  • The following messages will appear at the prompt:

"!runsmartbackupX : DVD space (total) used on runsmartbackupX B/U DVD" nnnnn (where "nnnnn" is the disk space used.)

"!runsmartbackupX : WARNING - Total DVD usage must be less than 4.3G"

  • As long as the disk space used is less than 4.3G the backup will terminate normally.
    In this case a message will appear at the prompt :

"!runsmartbackupX : Completed normally"

and the DVD will eject.

  • If there is an overflow error the following messages will appear at the prompt:

"!runsmartbackupX : WARNING - File /media/cdrom1 larger than available DVD space"

"!runsmartbackupX : WARNING - Backup job terminated"

If this occurs the DVD will still eject normally. However the backup is NOT complete.
The backup scripts must be re-written to subdivide the backup over more DVDs.

To check the backup :

  1. Once the backup is done manually check the DVDs.
  2. Mount the DVDs, one by one. The commands are :

    > mount /dev/hdd

    > cd /media/cdrom1 (Or other relevant media directory.)
  3. Look at files in the DVD directory structure.
    For ".txt", ".pro", etc. files any text editor (emacs, vi, etc.) can be used.
    Recently changed files must include their changes.
    For ".fits" Calibration files use DS9 or a similar ".fits" file viewer.

    The object of the exercise it to ensure that the files have data/source code etc. in them and you have not just saved an empty file structure.

  4. Unmount the DVD. The commands are :

    > cd

    > umount /dev/hdd
  5. Remove the DVD and prominently label it.
    Use a pen that is permanant on the DVD surface.
    The label format is : "SMART Backup", date, Vol. XXX and "(DVD)".

    EXAMPLE : SMART Backup 17 October 2008 Vol. II (DVD)

  6. Store the DVD in a safe place - OFFSITE.

 
This site is powered by FoswikiCopyright © 2002-2018 by the IRS Team.
Send feedback. We use Foswiki.