home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / database / oracle / 2235 < prev    next >
Encoding:
Text File  |  1992-11-17  |  3.6 KB  |  117 lines

  1. Path: sparky!uunet!charon.amdahl.com!pacbell.com!iggy.GW.Vitalink.COM!cs.widener.edu!eff!news.byu.edu!hamblin.math.byu.edu!sol.ctr.columbia.edu!spool.mu.edu!sdd.hp.com!zaphod.mps.ohio-state.edu!news.acns.nwu.edu!network.ucsd.edu!news!nosc!ryptyde!tumidity
  2. Newsgroups: comp.databases.oracle
  3. Subject: backups
  4. From: tumidity@netlink.cts.com (Joel Garry)
  5. Message-ID: <ioTeuB1w165w@netlink.cts.com>
  6. Date: Tue, 17 Nov 92 16:53:53 PST
  7. Organization: NetLink Online Communications, San Diego CA
  8. Lines: 107
  9.  
  10. Somebody (sorry, can't find the posting) recently asked for backup 
  11. procedures.  We recently aquired a tape drive that can actually hold
  12. all of our current disk contents.  I have implemented the following
  13. as a cron program (on a Sun Sparc 2, Solaris/SunOS 4.1.3).  We have
  14. no users on at night.  Ignore Unify and DBPATH references.  Does anybody
  15. think this is a bad thing (not bringing the system down, I mean)?  
  16. Should I include shutdown/startup commands for oracle?  Or does someone
  17. know a procedure to bring the system to single user and then back up
  18. controlled by cron (like, is it safe to have shutdown -r in a cron file?)  
  19. Send comments to:
  20. tumidity@netlink.cts.com
  21. Thanks!
  22. ------------------------------------ cut here ------------------------------
  23. :
  24. # @(#) dumpall - Dump all the filesystems onto a single 8 mm tape.
  25. # by J. Garry 11/13/92.
  26. #
  27. # To restore a particular filesystem (files): 
  28. #
  29. # mt -f /dev/nrst0 asf x 
  30. # where x is how many systems you want to skip.  Then do a normal restore.
  31. #
  32. # cd (proper partition)
  33. # restore if /dev/nrst0
  34. #
  35. # for example, to restore the entire /home (/dev/sd1h) filesystem:
  36. #
  37. # mt -f /dev/nrst0 asf 2
  38. # cd /home
  39. # restore rvf /dev/nrst0
  40. #
  41. /usr/bin/df
  42. dump 0dsbfu 54000 6000 126 /dev/nrst0 /dev/sd1a
  43. dump 0dsbfu 54000 6000 126 /dev/nrst0 /dev/sd1g
  44. dump 0dsbfu 54000 6000 126 /dev/nrst0 /dev/sd1h
  45. dump 0dsbfu 54000 6000 126 /dev/nrst0 /dev/sd2g
  46. dump 0dsbfu 54000 6000 126 /dev/nrst0 /dev/sd3g
  47. mt -f /dev/rst0 rew
  48. ------------------------------------- cut here -----------------------------
  49. :
  50. # @(#) backup_progs - cron control file for dumping entire system to 8mm tape.
  51. #
  52. # Leave Top Line Null; so csh knows to pass this script to sh.
  53. #
  54. PATH=:/etc:/usr/bin:/usr/hosts:/usr/local/bin
  55. TAPE=/dev/rst0
  56. DBPATH=/usr2/cpen/bin
  57. export TAPE PATH DBPATH
  58. #
  59. #
  60. ADM=/usr/adm
  61. ERR_FILE=$ADM/backup_err
  62. #
  63. set `date | tr '[a-z]' '[A-Z]'`
  64. CURRDA=$1
  65. CURRMO=$2
  66. CURRDD=$3
  67. CURRYR=$6
  68. CURRYY=`echo $6 | cut -c3-4`
  69. #
  70. #
  71.    echo 'running backup program - Sun4'
  72.    date
  73.    if [ $CURRDA = THU ]
  74.    then
  75.       mv $ADM/backup_out $ADM/backup_out_archive
  76.    fi
  77.    if [ $CURRDA = FRI ] 
  78.    then
  79.       mv $ERR_FILE $ADM/backup_err_archive
  80.    fi
  81.    echo 'running backup program - Sun4'             >> $ERR_FILE
  82.    date                                             >> $ERR_FILE
  83.    cd /
  84.    lock.unify
  85.    pwd
  86. #
  87. # Daily dump of all files.
  88.    if [ $CURRDA = SAT -o $CURRDA = MON -o $CURRDA = TUE -o $CURRDA = WED \
  89.                       -o $CURRDA = THU -o $CURRDA = FRI ]
  90.    then
  91.       date
  92.       echo  'Perform daily backup'
  93.       echo  'Perform daily backup'                >> $ERR_FILE
  94.       /usr/local/bin/dumpall                     2>> $ERR_FILE
  95.       echo 'dump completed of all files'
  96.       echo 'dump completed of all files'          >> $ERR_FILE
  97.    fi
  98. date
  99. date                                              >> $ERR_FILE
  100. #
  101.    unlock.unify
  102. #
  103. #
  104. #
  105.  echo ''
  106.  echo 'Started on ' $CURRDA $CURRMO $CURRDD
  107.  date
  108.  echo 'all done for tonight'
  109.  echo ''
  110.  echo ''
  111. 
  112.  
  113. --                    
  114. INTERNET:  tumidity@netlink.cts.com (Joel Garry)
  115. UUCP:   ...!ryptyde!netlink!tumidity
  116. NetLink Online Communications * Public Access in San Diego, CA (619) 453-1115
  117.