The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Backup to SCSI Tape Backup aborts zionpc SCO 4 12-07-2007 07:47 PM
Check backup file size on backup tape ayhanne UNIX for Dummies Questions & Answers 0 10-25-2007 12:41 PM
code that reads commands from the standard i/p and executes the commands Phrozen Smoke High Level Programming 4 01-22-2007 02:06 AM
Noob learning Unix: backup commands lotusx UNIX for Dummies Questions & Answers 1 06-28-2005 02:50 PM
Backup Mauro UNIX for Dummies Questions & Answers 2 07-02-2002 08:50 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 02-25-2002
hnanong hnanong is offline
Registered User
  
 

Join Date: Feb 2002
Posts: 1
Question backup commands

Just want to know when a daily backup is carried out, what commands are used to check whether or not the backup has completed. I am aware of the ls -l command which gives the log size.

thanks
  #2 (permalink)  
Old 02-26-2002
witt
Guest
  
 

Posts: n/a
Bits: 0 [Banking]
When you execute your backup script, test the return code of the command and take an action when necessary.

Example :

#!/bin/ksh
host=`hostname`

ufsdump 0uf /dev/rmt/0 /your_filesystem

if [ $? -ne 0 ];then
echo "BACKUP ERROR in the $host"
echo "BACKUP ERROR in the $host" > /tmp/bkp_msg_error.txt
mailx -s "BACKUP ERROR" your_email@your_domain < /tmp/bkp_msg_error.txt
fi


or


#!/bin/csh
set host=`hostname`

ufsdump 0uf /dev/rmt/0 /your_filesystem

if ( $status != 0) then
echo "BACKUP ERROR in the $host"
echo "BACKUP ERROR in the $host" > /tmp/bkp_msg_error.txt
mailx -s "BACKUP ERROR" your_email@your_domain < /tmp/bkp_msg_error.txt
endif

P.s.: Use the mailx command if you have a sendmail in your host.


I hope help you !
  #3 (permalink)  
Old 02-26-2002
guest100's Avatar
guest100 guest100 is offline
Banned
  
 

Join Date: Oct 2001
Location: London, UK
Posts: 146
It depends which flavour of Unix you are using. You can use lots of different backup techniques. If you are using HPUX SAM does a backup and you can check it as well, if you don't want to get to scripting yet. If you are using Solaris then ufsdump is a good example. You can check this with "ufsrestore". If you define a cronjob then you will automatically receive an email.

Cheers.
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 12:15 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0