creating log files for a backup script on solaris


 
Thread Tools Search this Thread
Operating Systems Solaris creating log files for a backup script on solaris
# 1  
Old 03-05-2004
Data creating log files for a backup script on solaris

I have a simple backup script that I am running to back up drives across the network. However I need to have detailed log files for this script such as time backup started, what was backed up, if there were any errors and the time that the backup was complete. I would also like the script to email me to tell me whn its done. Does anyone know of a refernce online that I could find out how to do this or if anyone here that can help that would be great. Thanks.
# 2  
Old 03-05-2004
why dont you post your backup script now?

i use ufsdump and update /etc/dumpdates and have the output of my script sent to my email.
Code:
for i in list_of_fses_to_backup ; do
/usr/sbin/ufsdump 0uf /dev/rmt/0n $i
done

mt rewoffl

then i just run the script in cron. since it creates output it goes to my email once the script is done running.
# 3  
Old 03-05-2004
I dont have the script with me as I am home now for the weekend but it is a simple simple that just uses tar commands to back up files across our network...
# 4  
Old 03-08-2004
#!/bin/csh -f -x

echo nbdrives backup

cd ~/backups/monthly
ls -plas

mt -f /dev/rmt/2cb status
mt -f /dev/rmt/2cb rew
pushd .
cd /

( tar -cvFFf /dev/rmt/2cb \
net/miami/nb1 \
#net/miami/nb2 \
#net/miami/nb3 \
#net/miami/nb4 \
#net/miami/nb5 \
#net/miami/nb6 \
#net/miami/nb7 \
#net/miami/nb8 \
>> ~/backups/monthly/contents5 ) >>& /net/tribeca/usr1/logs/errors5


mt -f /dev/rmt/2cb rewoff

ls -plas
exit
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

Need help in creating script for disk mirror and backup

Hi, I am very new to scripting. I need to create a script which does following. Scenario: First get the format command output echo | format Insert the new disk to Solaris Server Get Zpool status format the new disk ( Here I need to select the new disk which have been inserted, I do... (1 Reply)
Discussion started by: praveensharma21
1 Replies

2. UNIX for Advanced & Expert Users

Help with creating script to delete log files/folders

Hi I am new to Linux / scripting language. I need to improve our Linux servers at work and looking to claim some space my deleting log files/ folders on a 5 day basis. Can someone help me with creating a script to do so. Any sample script will be helpful.:b: Regards (2 Replies)
Discussion started by: sachinksl
2 Replies

3. Solaris

Which are main files to copydor DR backup in Solaris?

Hi all, Which are main files to copydor DR backup in Solaris? I have copied bewo files, is there anything else that is needed to be copied any directires as well, Please suggest. Will following files backup will do the job for building new server exactly like the original one..? ... (0 Replies)
Discussion started by: manalisharmabe
0 Replies

4. Shell Programming and Scripting

Need help creating a script to FTP files to a server and then delete the files that were transfered.

I am trying to FTP files to a Windows server through my Linux machine. I have setup the file transfer with no problems but am having problem deleting those files from the Linux box. My current non-working solution is below. Any ideas, anyone?? :wall: Please be gentle, I'm fairly new to this... (4 Replies)
Discussion started by: jmalfhs
4 Replies

5. Shell Programming and Scripting

Need help in creating file restoration script from a backup script.

Hi all i am struggling in creating a restore of env files while doing applications clone. the first file i created for copying the important configurations file which is running perfect now for reverting the changes i mean when i am restoring these files to its original places i have to do... (7 Replies)
Discussion started by: javeedkaleem
7 Replies

6. Shell Programming and Scripting

Creating Log files from Scripts

Hi I would like to create a log file to track the execution of my script. Example, if there were any errors, if it passed or failed etc. How do I go about doing this. My log file will be saved to this location: /var/log/import.log How do I specify the directory? I have been... (1 Reply)
Discussion started by: ladyAnne
1 Replies

7. Solaris

Backup files to tape drive on solaris

Hi, I want to take backup of files older than 20 days from a directory onto a tape drive on remote machine on Solaris. The files are of format abc-20100301000000.gz on my local machine. I know the below commands for searching files older than x days and command for backup procedure. solar1 #... (7 Replies)
Discussion started by: jyothi_wipro
7 Replies

8. Solaris

Help with solaris files backup

Hello, I'm Antony, new solaris user. I need to back-up an old solaris disk. Currently I have installed the Open Solaris operating system on my computer and a USB device I tried to read data on a hard drive with an older version of Solaris, when i try to open the device the operating system tells... (11 Replies)
Discussion started by: legoinario_67
11 Replies

9. UNIX for Advanced & Expert Users

Creating backup of files being deleted

Hi All , We usually tend to use rm -f or rm -rf commands to delete files and directories in UNIX based Systems. But despite of utter care while deletion, there is high possibility that some of important files get deleted by mistake (as in the case of rm -f *). So , one way to avoid this... (5 Replies)
Discussion started by: swapnil.nawale
5 Replies

10. Shell Programming and Scripting

[Help help] backup script for tape on solaris

hi all, very urgent need backup script on tape using solaris 8, my tape drive is DAT 72 on sun v240. i need a simple script to backup files from directory /data/log/back/200703/filename.log. the files will backup continue each day on the tape which have 72 GB. the files size only 50MB and... (0 Replies)
Discussion started by: bucci
0 Replies
Login or Register to Ask a Question

Featured Tech Videos