How backups are preset at LBT

This page is currently (as of 26-Nov-2013) in development. We are working on the final set up right now.

Note: some additional info on AO servers configuration is also availabe at AoServersLBTO.

Log Files and AO data

There are two levels of data mirroring active at LBTO:

  • Local data mirroring: from server internal disks to local shared SAN disks.

  • Remote data mirroring: from SAN disks to NAS in Arcetri (not yet finished)

Each level provides for mirroring log files and AO data

Local data mirroring

Log Files

adsecdx /local/aolog MOVED TO... /ao-data/adsecdx/aolog
wfsdx /local/aolog MOVED TO... /ao-data/wfsdx/aolog
adsecsx /local/aolog MOVED TO... /ao-data/adsecsx/aolog
wfssx /local/aolog MOVED TO... /ao-data/wfssx/aolog

AO Data

adsecdx /local/towerdata/adsec_data MOVED TO... /ao-data/adsecdx/adsec_data
adsecsx /local/aomeas/adsec_calib MOVED TO... /ao-data/adsecdx/adsec_data

Remote data mirroring

The complete status of local SAN disks is replicated at Arcetri as follows:

| /ao-data/* | MOVED TO... | obelix:/mirror


Detailed configuration

Each AO server has two mirroring procedures which are executed periodically by cron (as user AOeng). All connections to the repository in Arcetri use the UserID: archiver.

  • mirrorLog.sh: compresses with gzip the log files and then copies updated ones to obelix.arcetri.astro.it. Operations are logged into daily files in ~AOeng/mirrorLog directory.

  • mirrorMeas.sh: uses rsync to copy measure files to obelix.arcetri.astro.it. Operations are logged into daily files in ~AOeng/mirrorMeas directory.
Note: all AO workstations use UT, and cron start times are set up to perform mirroring during LBTO daytime.

adsecdx

adsecdx: crontab

0 14 * * * /home/aoacct/scripts/mirrorLog.sh
30 14 * * * /home/aoacct/scripts/mirrorMeas.sh
0 15 * * * /home/aoacct/scripts/make_digest > make_digest.log 2>&1
* * * * *  /usr/local/itt/idl/bin/lmstat -f idl >> /local/aolog/lmstat/idl_license.txt
0 8 * * * /home/aoacct/scripts/disk-alarm.py > disk-alarm.log 2>&1 

Backup related commands are the first two lines.

adsecdx: scripts/mirrorLog.sh

#!/bin/bash

Data=$(date +%Y%m%d)
LogFile=/home/aoacct/mirrorLog/$Data.log
LockFile=/home/aoacct/mirrorLog/lockfile
Remote=archiver@193.206.155.70

# Mirror log files to Arcetri

exec 8>$LockFile    # This is to use a lock file
flock -n 8          # lock file protected code starts here
STATUS=$?

if [ $STATUS -eq 0 ]; then
   echo -n "Starting log save at " >> $LogFile
   date >> $LogFile
   cd /local/aolog
   find . -regex '.*[._][0-9]+[.]log' -exec gzip -q {} \;
   find . -regex '.*[._][0-9]+[.]tel' -exec gzip -q {} \;
   find . -regex '.*[._][0-9]+[.]net' -exec gzip -q {} \;
   rsync -av * --exclude=*.log --exclude=*.tel --exclude=*.net --exclude=current* $Remote:/mirror3/FLAO_logs/adsecdx  >> $LogFile 2>&1
   rm $LockFile
fi

adsecdx: scripts/mirrorMeas.sh

#!/bin/bash

Data=$(date +%Y%m%d)
LogFile=/home/aoacct/mirrorMeas/$Data.log
LockFile=/home/aoacct/mirrorMeas/lockfile
Remote=archiver@193.206.155.70

# Mirroring adsecdx measure data to Arcetri

exec 8>$LockFile    # This is to use a lock file
flock -n 8          # lock file protected code starts here
STATUS=$?

if [ $STATUS -eq 0 ]; then
   rsync -av --exclude="**/baktmp/" --exclude="**/meas/" /local/towerdata/* $Remote:/mirror2/LBT_data_right/  >> $LogFile 2>&1
   rm $LockFile
fi

wfsdx

wfsdx: crontab

15 15 * * * /home/aoacct/scripts/mirrorLog.sh
* * * * * rsync -av --exclude='**/current' /home/aoacct/AO/current/calib/wfs/W2/* /towerdata/wfs_calib_W2 > /dev/null 2>&1
0 8 * * * /home/aoacct/scripts/disk-alarm.py > disk-alarm.log 2>&1

wfsdx: scripts/mirrorLog.sh

#!/bin/bash

Data=$(date +%Y%m%d)
LogFile=/home/aoacct/mirrorLog/$Data.log
LockFile=/home/aoacct/mirrorLog/lockfile
Remote=archiver@193.206.155.70

# Mirror log files to arcetri

exec 8>$LockFile    # This is to use a lock file
flock -n 8          # lock file protected code starts here
STATUS=$?

if [ $STATUS -eq 0 ]; then
   cd /local/aolog
   find . -regex '.*[._][0-9]+[.]log' -exec gzip -q {} \;
   find . -regex '.*[._][0-9]+[.]tel' -exec gzip -q {} \;
   find . -regex '.*[._][0-9]+[.]net' -exec gzip -q {} \;
   rsync -av * --exclude=*.log --exclude=*.tel --exclude=*.net --exclude=current* $Remote:/mirror3/FLAO_logs/wfsdx  >> $LogFile 2>&1
   rm $LockFile
fi

adsecsx

adsecsx: crontab

 
0 14 * * * /home/aoacct/scripts/mirrorLog.sh
30 14 * * * /home/aoacct/scripts/mirrorMeas.sh
0 15 * * * /home/aoacct/scripts/make_digest > /tmp/make_digest.log 2>&1
0 15 3 * * /home/aoacct/scripts/makestat > /tmp/make_stat.log 2>&1
0 15 18 * * /home/aoacct/scripts/makestat > /tmp/make_stat.log 2>&1
3 8 * * * /home/aoacct/scripts/disk-alarm.py > disk-alarm.log 2>&1
* * * * *  /usr/local/itt/idl/bin/lmstat -f idl >> /local/aolog/lmstat/idl_license.txt

adsecsx: scripts/mirrorLog.sh

#!/bin/bash

Data=$(date +%Y%m%d)
LogFile=/home/aoacct/mirrorLog/$Data.log
LockFile=/home/aoacct/mirrorLog/lockfile
Remote=archiver@193.206.155.70

# Mirror log files to arcetri

exec 8>$LockFile    # This is to use a lock file
flock -n 8          # lock file protected code starts here
STATUS=$?

if [ $STATUS -eq 0 ]; then
   cd /local/aolog
   find . -regex '.*[._][0-9]+[.]log' -exec gzip -q {} \;
   find . -regex '.*[._][0-9]+[.]tel' -exec gzip -q {} \;
   find . -regex '.*[._][0-9]+[.]net' -exec gzip -q {} \;
   rsync -av * --exclude=*.log --exclude=*.tel --exclude=*.net --exclude=current* $Remote:/mirror3/FLAO_logs/adsecsx/  >> $LogFile 2>&1
   rm $LockFile
fi

adsecsx: scripts/mirrorMeas.sh

#!/bin/bash

Data=$(date +%Y%m%d)
LogFile=/home/aoacct/mirrorMeas/$Data.log
LockFile=/home/aoacct/mirrorMeas/lockfile
Remote=archiver@193.206.155.70

# Mirror adsecsx measure data to arcetri

exec 8>$LockFile    # This is to use a lock file
flock -n 8          # lock file protected code starts here
STATUS=$?

if [ $STATUS -eq 0 ]; then
   rsync -av --exclude="**/baktmp/" --exclude="**/meas/" /local/towerdata/* $Remote:/mirror2/LBT_data_left/  >> $LogFile 2>&1
   #rsync -av /local/aomeas/adsec_calib $Remote:/mirror2/LBT_data_left/adsec_meas >> $LogFile 2>&1
   rm $LockFile
fi

wfssx

wfssx: crontab

00 15 * * * /home/aoacct/scripts/mirrorLog.sh
* * * * * rsync -av --exclude='**/current' /home/aoacct/AO/current/calib/wfs/W1/* /towerdata/wfs_calib_W1 > /dev/null 2>&1
0 8 * * * /home/aoacct/scripts/disk-alarm.py > disk-alarm.log 2>&1

wfssx: scripts/mirrorLog.sh

#!/bin/bash

Data=$(date +%Y%m%d)
LogFile=/home/aoacct/mirrorLog/$Data.log
LockFile=/home/aoacct/mirrorLog/lockfile
Remote=archiver@193.206.155.7

# Mirror log files to Arcetri

exec 8>$LockFile    # This is to use a lock file
flock -n 8          # lock file protected code starts here
STATUS=$?

if [ $STATUS -eq 0 ]; then
   cd /local/aolog
   find . -regex '.*[._][0-9]+[.]log' -exec gzip -q {} \;
   find . -regex '.*[._][0-9]+[.]tel' -exec gzip -q {} \;
   find . -regex '.*[._][0-9]+[.]net' -exec gzip -q {} \;
   rsync -av * --exclude=*.log --exclude=*.tel --exclude=*.net --exclude=current* $Remote:/mirror3/FLAO_logs/wfssx  >> $LogFile 2>&1
   rm $LockFile
fi

Topic revision: r18 - 26 Nov 2013, LucaFini
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback