Sponsored Content
Full Discussion: full system backup script
Operating Systems Linux full system backup script Post 302146073 by clement on Saturday 17th of November 2007 06:36:27 AM
Old 11-17-2007
full system backup script

Please help. I am new to linux. I wrote a script to run the backup on lunix machine but the job gave me an error. I am using Linux 2.6.14.3. Below is the sample of my script can anyone tell me where went wrong? Thanks in advance.

#!/bin/sh

dat=$(date +%d%b%y)
logdir="/usr/local/scripts/log/backup"
backuptarget="/*"
backupdir="/usr/hell/backups"

for HOST in devil1 devil2 devil3
do

ssh $HOST "tar -zcvpf $backupdir/$HOST.$dat.tgz $backuptarget --exclude "/usr/hell/DB" >> $backupdir/$HOST.backup.log.$dat "

ssh $HOST "cat $backupdir/$HOST.backup.log.$dat" >> $logdir/"$HOST.backup.log.$dat"
gzip $logdir/"$HOST.backup.log.$dat"

scp root@$HOST:$backupdir/$HOST.$dat.tgz $backupdir

# scp exits with 0 on success or >0 if an error occurred.

if [ $? -gt 0 ]; then
/var/netpage OPERATIONS -TSMS -G10.200.1.99 "$HOST scp failed"
fi

/bin/tar ztvf $backupdir/$HOST.$dat.tgz ||/var/netpage OPERATIONS -TSMS -G10.201.2.66 "$HOST.$dat.tgz is no good"

ssh $HOST "rm -f $backupdir/*"

done


/bin/tar -zcvpf $backupdir/devil1.$dat.tgz /* --exclude "/usr/hell/backups/*" --exclude "/usr/hell/DB/*" --exclude "/usr/dragon/.cache/*" >> $logdir/"devil1.backup.log.$dat"

gzip $logdir/"devil1.backup.log.$dat"

/bin/tar ztvf $backupdir/devil1.$dat.tgz ||/var/netpage OPERATIONS -TSMS -G10.200.1.99 "devil1.$dat.tgz is no good"

#zip up /usr/hell/backups directory as windows bkf file is big
gzip $backupdir/*

/bin/tar -rvpf /dev/st0 $backupdir/* /usr/hell/DB/200[4-6]*/* --exclude "*log*" >> $logdir/"tape.backup.log.$dat"
/bin/gzip $logdir/"tape.backup.log.$dat"
rm -f $backupdir/*
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Full System Backup / Cloning HPUX

I am new to UNIX and need help in cloning a HPUX 10.2 Ace 5, can anybody please guide me in making a full system backup. Real Chess (0 Replies)
Discussion started by: real-chess
0 Replies

2. UNIX for Dummies Questions & Answers

System full backup to tape

hi, Recently, I had receive one system. it's run on the unix tru64 server. I looking some log files when i know don't work few months age system backup to tape. Below error: INFO:Tape backups to tape tape0 starting for backup list: slot2:/disk4 Backup Command Variable... (0 Replies)
Discussion started by: Tlg13team
0 Replies

3. Solaris

full system backup

I have unix server with OS 5.8 ,,, I tried ufsdump 0ua -f /dev/rmt/0 / to perform full system backup on tape but I failed could any one give a procedure for full system backup on solaris machine using tapes??? (1 Reply)
Discussion started by: mm00123
1 Replies

4. UNIX for Dummies Questions & Answers

Full System Backup Sco 5.0.5

I would like to know if I can do a full system back up on my Unix Sco openserver 5.0.5 Machine. If so, What is the syntax to do this or where can I find this information at? Also, is it possible to make this tape bootable so that I can easily do a full system restore? Any information on... (2 Replies)
Discussion started by: nellenodrog
2 Replies

5. HP-UX

HP-UX Full System Backup with fbackup

Hello, I'm still new in HP-UX backup and I want to do a FULL BACKUP of HP-UX server to TAPE device. After reading on several forums and posts, i have list down several steps on how to do a full backup on HP-UX with fbackup. I would like the gurus here to comment/advise on the steps below 1)... (4 Replies)
Discussion started by: miskin
4 Replies

6. UNIX for Advanced & Expert Users

how to make a full system backup excluding data and restoring it to a new system

Hi, In order to have a sand box machine that I could use to test some system changes before going to production state, I'd like to duplicate a working system to a virtual one. Ideally, I'd like to manage to do it this way : - Make a full system backup excluding the user file system (this... (7 Replies)
Discussion started by: pagaille
7 Replies

7. UNIX for Advanced & Expert Users

Grub - how to boot a copy of Linux (full system backup)

Hi All, I have successfully backup & restore (using tar) one of my Debian Lenny Servers. On the restore server (standby machine), everytime i have to erase the disk & extract the tar backup. I want to extract the tar on the running restore server on a directory for e.g /systembackup-01,... (11 Replies)
Discussion started by: coolatt
11 Replies

8. Shell Programming and Scripting

Shell script to call Oracle archive backup script when file system reaches threshold value

Hello All, I need immediate help in creating shell script to call archivebkup.ksh script when archive file system capacity reaches threshold value or 60% Need to identify the unique file system that reaches threshold value. ex: capacity ... (4 Replies)
Discussion started by: sasikanthdba
4 Replies

9. Solaris

Help - Chosing backup way (full system + zones)

Hello i am new on Solaris, and i need to migrate my old AIX 5.3 to Solaris 11.2 Now i have all apps working fine but i have the backup cause i was reading and i have not idea about what method must i choose. Btw on AIX i had a mksysb backup to restore all system and obviously another backups to... (4 Replies)
Discussion started by: thorin666
4 Replies
ARPSNMP(8)						      System Manager's Manual							ARPSNMP(8)

NAME
arpsnmp - keep track of ethernet/ip address pairings SYNOPSIS
arpsnmp [ -d ] [ -f datafile ] [ -s sendmail_path ] [ -m addr ] file [ ... ] DESCRIPTION
Arpsnmp keeps track for ethernet/ip address pairings. It syslogs activity and reports certain changes via email. Arpsnmp reads information from a file (usually generated by snmpwalk(8)). The -d flag is used enable debugging. This also inhibits mailing the reports. Instead, they are sent to stderr. The -f flag is used to set the ethernet/ip address database filename. The default is arp.dat. (Debian) The -s flag is used to specify the path to the sendmail program. Any program that takes the option -odi and then text from stdin can be substituted. This is useful for redirecting reports to log files instead of mail. (Debian) The -m option is used to specify the e-mail address to which reports will be sent. By default, reports are sent to root on the local machine. Note that an empty arp.dat file must be created before the first time you run arpsnmp. REPORT MESSAGES
(See the arpwatch(1) man page for details on the report messages generated by arpsnmp(1).) FILES
/var/lib/arpwatch - default directory arp.dat - ethernet/ip address database /usr/share/arpwatch/ethercodes.dat - vendor ethernet block list SEE ALSO
arpwatch(8), snmpwalk(8), arp(8) AUTHORS
Craig Leres of the Lawrence Berkeley National Laboratory Network Research Group, University of California, Berkeley, CA. The current version is available via anonymous ftp: ftp://ftp.ee.lbl.gov/arpwatch.tar.gz BUGS
Please send bug reports to arpwatch@ee.lbl.gov. Attempts are made to suppress DECnet flip flops but they aren't always successful. 4th Berkeley Distribution 17 September 2000 ARPSNMP(8)
All times are GMT -4. The time now is 01:54 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy