Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Basic Backup Script Assistance Needed!!!

Status
Not open for further replies.

AAARRRGGGHHH

Technical User
Jan 7, 2004
1
GB
Help!

I have looked around the free backup scripts as I am unable to write my own!

Storage Mountain supplied me with 'hostdump' & 'Amanda' both of which supply me with too many options IMO

I need a script that will allow the use of UFSDUMP to a local & network DLT tape drive, incremental backups with cron sheduling & easy restores...

ie. Can I just boot from CD in single user mode & then run UFSRESTORE to restore my volumes?

Help

Solaris 7 Sparc

Many Thanks for your assistance !!!
 
This was a post from Dave Perry that will hopefully be useful to you.


Store the dump files on a NFS server. Ideally the system should be in a single user mode when doing a ufsdump but near zero disk activity should be OK. Booting from a CD with network support is perfect.
In the following example, change the IP and share information to reflect an NFS server in your network. You could also write dump files to a series of tapes, 1 tape / slice but network restores are much quicker.

#!/bin/sh
hostname=`hostname | cut -f 1 -d '.'`
NFSSERVER=192.168.1.1
if [ `mount | grep -c $NFSSERVER` -eq 0 ] ; then
mount $NFSSERVER:/exports/dumpfiles/$hostname /mnt
fi
df -k | grep c0t > /tmp/slice
cat /tmp/slice | while read rdsk kbytes used avail capacity mounted ; do
if [ "$mounted" = "/" ] ; then
slice="root"
else
slice=`echo $mounted | sed -e 's,^/,,'`
fi
echo $slice
ufsdump 0uf - $mounted | compress > /mnt/$slice.dump.Z
done
ufsdump 0uf - / | compress > /mnt/root.dump.Z
umount /mnt


 
or use gzip instead of compress for better/faster compression.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top