-
Notifications
You must be signed in to change notification settings - Fork 11
/
backup.sh
29 lines (25 loc) · 1.04 KB
/
backup.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/bin/ksh
###=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
### Ed Arizona -001030
### Note: The delimiter in the "cut" command is a 'tab',
### not several spaces. If you cut and paste this
### from your web browser the delimiter must be fixed.
###=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
### Questions or problems? UnixAdmin@ArizonaEd.com
### Visit the unix archive at http://www.arizonaed.com/unix
### Check out the long list of links, http://www.arizonaed.com/unix/urls.html
###
### I am currently looking for work. I am an experienced Unix Admin
### with considerable knowledge of Networking, Firewalls, and
### Security. Please contact me for my resume. Thanks! -Ed.
###
###=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
mt -f /dev/rmt/0 rewind
for i in `grep -v ^# /etc/vfstab | grep ufs | cut -d" " -f1`
do
ufsdump 0fu /dev/rmt/0un $i
done
for i in `grep -v ^# /etc/vfstab | grep vxfs | cut -d" " -f1`
do
vxdump 0fu /dev/rmt/0un $i
done