Sponsored Content
Full Discussion: Offsite Backup Solution
Operating Systems AIX Offsite Backup Solution Post 302353165 by ITAdmin08 on Monday 14th of September 2009 05:06:47 PM
Old 09-14-2009
Current Backup Script

Here is our current backup script that backs up to /dev/rmt0

Code:
#!/bin/ksh
###
# Eclipse Data Backup Script
# (executed by backup phantom)
###

###
# Environment Variables
###
TAPEDEV=rmt0            # Tape Device Name
BLOCKSZ=1024            # Tape Block Size
LOCKOUT=NO                      # Lockout Users During Backup (YES/NO)
QUIESCE=NO                      # Quiesce the database during backup
CHKFILE=/tmp/backup.chk         # Backup Check File
BAKFILE=/tmp/backup.bak         # Last Succesful Backup
ERRFILE=/tmp/backup.err         # Backup Error File
ALGFILE=/tmp/backread.alog      # Readback alog File
RDBFILE=/tmp/backread.err       # Readback error File
EMLFILE=/tmp/backup.email       # Email log file
BAKLIST=./u2            # Files/Directories to backup
READBAK=NONE            # Day to do a readback (EVERY/NONE/DOW)
FILELST=                # Alternate Backup File List
MAILRPT=NO                      # Mail backup report?
MAILFRM='root'
MAILLST=''      # Backup Administrator's Email Addresses
DOW=`date +%a`          # Day of week

###
# Start
###
umask 000                       # Set File Creation Flags
echo "Backup started at : `date`" > $CHKFILE
cd /

###
# Lockout Logins
###
if [ $LOCKOUT = "YES" ] ; then
        touch /etc/nologin
fi

###
# Quiesce
###
if [ $QUIESCE = "YES" ] ; then
        echo "Quiesce started at : `date`" >> $CHKFILE
        /u2/uv/bin/uv -admin -L
        if [ $? -ne 0 ] ; then
                echo "QUIESCE ERRORS RECORDED!"
        fi
fi

###
# Configure Device
###
chdev -l $TAPEDEV -a block_size=$BLOCKSZ 2> $ERRFILE >&-
sleep 35

###
# Run Backup
###
if [ -f $FILELST ] ; then
        find `cat $FILELST` -print | backup -iqvf /dev/$TAPEDEV 2>> $ERRFILE |grep -v "^a  " 1>> $ERRFILE 2>&1
else
        find $BAKLIST -print | backup -iqvf /dev/$TAPEDEV 2>> $ERRFILE |grep -v "^a  " 1>> $ERRFILE 2>&1
fi
echo "Backup ended at: `date`" >> $CHKFILE

###
# Un-Quiesce
###
if [ $QUIESCE = "YES" ] ; then
        /u2/uv/bin/uv -admin -U
        if [ $? -ne 0 ] ; then
                echo "UNQUIESCE ERRORS RECORDED!"
        fi
        echo "Quiesce completed at : `date`" >> $CHKFILE
fi

###
# End Lockout
###
if [ $LOCKOUT = "YES" ] ; then
        rm /etc/nologin
fi

###
# Run Readback
###
if [[ $READBAK = $DOW || $READBAK = "EVERY" ]] ; then
        echo "Readback started at: `date`" >> $CHKFILE
        rm $ALGFILE 2>&- >&-
        echo "Read errors recorded below" > $RDBFILE
        restore -Tqf /dev/$TAPEDEV 2>&1 1>&- | alog -q -s 8192 -f $ALGFILE
        alog -o -f $ALGFILE >> $RDBFILE
        rm $ALGFILE 2>&- >&-
        echo "Readback ended at: `date`" >> $CHKFILE
fi

###
# Eject/Unmount Device
###
tctl -f /dev/$TAPEDEV offline 2>> $ERRFILE

###
# Mail Backup Report
###
if [ $MAILREPORT = "YES" ] ; then
        cat -q $CHKFILE $ERRFILE $BAKFILE > $EMLFILE
        mailx -s "Eclipse Backup Report of `hostname`" -r $MAILFRM $MAILLST < $EMLFILE
        rm $EMLFILE
fi

###
# End
###

Is there any way i could copy and edit this script?
 

8 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

offsite backup for solaris

any hot sites out there for backup of a sun unix server. can't verify my tape backups and want a "disaster recovery" option (1 Reply)
Discussion started by: jbksman
1 Replies

2. UNIX for Advanced & Expert Users

enterprise backup solution

We are using sun_sparc solaris 2.5.1 with oracle database 8.0.5 We are considering to buy for buying backup software for this purpose . Our systems integrator says veritas could not be installed due to some technical reasons (they are veritas authorised dealer) . And is suggesting Netvault... (3 Replies)
Discussion started by: Hitesh Shah
3 Replies

3. Solaris

Sun and backup solution

My company is in the process of building a new datacenter and I am responsible for setting up the backup environment (everything from racking to implementation). I guess it is pretty basic but I don't have much experience with the initial setup. What we have so far is a SunV890 (backup server), Sun... (1 Reply)
Discussion started by: Jshwon
1 Replies

4. AIX

Backup solution

Hello, I'm looking for a backup solution for my system. I have 3 AIX virtual partitions running on a IBM p5 server. Each partition has it's data on a DS4700 storage server. Also, I have a RedHat running on an IBM p720. This server has the tape hardware. I would like to know if I can backup from... (4 Replies)
Discussion started by: enzote
4 Replies

5. Linux

Backup solution

Hi all, i am not sure whether i selected the right topic or not, so excuse me, well i am mainly a Windows admin, but i do *NIX administration from time to time, for now i need to use an open source solution for backup windows environment mainly, i spent last days playing with bacula and backupPC,... (0 Replies)
Discussion started by: XP_2600
0 Replies

6. Solaris

OpenSource / Free backup and restore solution for Solaris 10

Is there any free /opensource backup&restore solution available for solaris10 i want to backup Solaris10 machine with oracle 9 version. (0 Replies)
Discussion started by: kashif_islam
0 Replies

7. Shell Programming and Scripting

Considered basic but advanced outcome (Custom Backup Solution)

Ive a problem that I'm reaching out for help. Ive written (With bits and pieces) of script that is not running as expected or is having an issue causing processes to spiral out of control. The script does this: Unloads a UV database server Tars up a few folders Transfers the file to... (11 Replies)
Discussion started by: coastdweller
11 Replies

8. UNIX for Dummies Questions & Answers

Backup solution using rsync

Hello All, I am looking at a fast way to script some backups. I am looking at using rsync to do the leg work. I am having a hard time conceiving a script though. I have a tree with subfolders within subfolders. I was looking at the /xd option to parse the tree. Directory of k:\ ... (4 Replies)
Discussion started by: jvamos
4 Replies
BACKUP_LISTHOSTS(8)					       AFS Command Reference					       BACKUP_LISTHOSTS(8)

NAME
backup_listhosts - Lists Tape Coordinators registered in the Backup Database SYNOPSIS
backup listhosts [-localauth] [-cell <cell name>] [-help] backup listh [-l] [-c <cell name>] [-h] DESCRIPTION
The backup listhosts command displays the Backup Database record of the port offset numbers defined for Tape Coordinator machines. A Tape Coordinator must have an entry in the list to be available for backup operations. The existence of an entry does not necessarily indicate that the Tape Coordinator process (butc) is currently running at that port offset. To check, issue the backup status command. OPTIONS
-localauth Constructs a server ticket using a key from the local /etc/openafs/server/KeyFile file. The backup command interpreter presents it to the Backup Server, Volume Server and VL Server during mutual authentication. Do not combine this flag with the -cell argument. For more details, see backup(8). -cell <cell name> Names the cell in which to run the command. Do not combine this argument with the -localauth flag. For more details, see backup(8). -help Prints the online help for this command. All other valid options are ignored. OUTPUT
After a "Tape hosts:" header, the output reports two things about each Tape Coordinator currently defined in the Backup Database: o The hostname of the machine housing the Tape Coordinator. The format of this name depends on the hostname format used when the backup addhost command was issued. o The Tape Coordinator's port offset number. The Tape Coordinators appear in the order in which they were added to the Backup Database. EXAMPLES
The following example shows the result of the command in the ABC Corporation cell: % backup listhosts Tape hosts: Host backup1.abc.com, port offset 0 Host backup1.abc.com, port offset 1 Host backup3.abc.com, port offset 4 Host backup2.abc.com, port offset 3 PRIVILEGE REQUIRED
The issuer must be listed in the /etc/openafs/server/UserList file on every machine where the Backup Server is running, or must be logged onto a server machine as the local superuser "root" if the -localauth flag is included. SEE ALSO
backup(8), backup_addhost(8), backup_delhost(8), backup_status(8) COPYRIGHT
IBM Corporation 2000. <http://www.ibm.com/> All Rights Reserved. This documentation is covered by the IBM Public License Version 1.0. It was converted from HTML to POD by software written by Chas Williams and Russ Allbery, based on work by Alf Wachsmann and Elizabeth Cassell. OpenAFS 2012-03-26 BACKUP_LISTHOSTS(8)
All times are GMT -4. The time now is 07:55 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy