The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
.
google unix.com



UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Back-to-Back Connection using HBAs aldowsary IP Networking 3 11-28-2008 10:21 PM
back to back printing in UNIX amirthraj_12 AIX 3 05-06-2008 07:42 AM
back up bkan77 Shell Programming and Scripting 0 07-30-2007 09:30 AM
Back up's macdonto UNIX for Dummies Questions & Answers 3 08-01-2002 10:59 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 10-17-2001
guest100's Avatar
guest100 guest100 is offline
Banned
  
 

Join Date: Oct 2001
Location: London, UK
Posts: 146
Angry help with back up please

Can anyone please tell me how safe is the following backup script?
Does it really backing up the WHOLE system or just part of it?
I do that with the system running an oracle database.
Will I be able to restore the system in case of a fault?

<pre>
Here is the output of 'df -k'

isgsi01(root)10: df -k
Filesystem kbytes used avail capacity Mounted on
/proc 0 0 0 0% /proc
/dev/dsk/c0t0d0s0 1987399 943500 984278 49% /
fd 0 0 0 0% /dev/fd
/dev/dsk/c0t0d0s3 962571 842773 62044 94% /var
/dev/dsk/c0t0d0s4 962571 675979 228838 75% /home
/dev/dsk/c0t0d0s5 3009327 2065069 884072 71% /u01
/dev/dsk/c0t1d0s0 3009327 2262450 686691 77% /u02
/dev/dsk/c0t1d0s1 3009327 2318909 630232 79% /u03
/dev/dsk/c0t1d0s3 3009327 2939083 10058 100% /u04
swap 2814480 3024 2811456 1% /tmp


Here is the backup script:

mt -f /dev/rmt/0cn rewind
ufsdump 0uf /dev/rmt/0cn /dev/dsk/c0t0d0s0
ufsdump 0uf /dev/rmt/0cn /dev/dsk/c0t0d0s3
ufsdump 0uf /dev/rmt/0cn /dev/dsk/c0t0d0s4
ufsdump 0uf /dev/rmt/0cn /dev/dsk/c0t0d0s5
ufsdump 0uf /dev/rmt/0cn /dev/dsk/c0t1d0s0
ufsdump 0uf /dev/rmt/0cn /dev/dsk/c0t1d0s1
ufsdump 0uf /dev/rmt/0cn /dev/dsk/c0t1d0s3

</pre>
Thanks in advance
  #2 (permalink)  
Old 10-17-2001
Michael Michael is offline
Registered User
  
 

Join Date: May 2001
Location: Germany
Posts: 15
Yeah,

but before start the backup, shutdown the oracle database for an offline backup.

regards
Michael
  #3 (permalink)  
Old 10-17-2001
guest100's Avatar
guest100 guest100 is offline
Banned
  
 

Join Date: Oct 2001
Location: London, UK
Posts: 146
The problem is that I can not shut down the database,
needs to be up 24/7.
I know there are some other utilities for that, but I would like to know if it's a full system back up (0 level)
why when I try to ufsrestore interactivily I only see the / (root)level ?

Thanks
  #4 (permalink)  
Old 10-17-2001
Michael Michael is offline
Registered User
  
 

Join Date: May 2001
Location: Germany
Posts: 15
So you have to run the database in archive mode.
See oracle manuels for online backup(backup controlfile, tablespaces, archive files).

If you need more information send me an email
::email removed::

regards

Last edited by oombera; 02-20-2004 at 11:45 AM..
  #5 (permalink)  
Old 10-17-2001
Perderabo's Avatar
Perderabo Perderabo is offline Forum Staff  
Unix Daemon
  
 

Join Date: Aug 2001
Location: Ashburn, Virginia
Posts: 9,111
Re: help with back up please

Quote:
Originally posted by guest100

Here is the backup script:

mt -f /dev/rmt/0cn rewind
ufsdump 0uf /dev/rmt/0cn /dev/dsk/c0t0d0s0
ufsdump 0uf /dev/rmt/0cn /dev/dsk/c0t0d0s3
The trailing n in /dev/rmt/0cn means "no rewind". This means that there is no automativ rewind of the tape when the file is closed. So your first statement does an explicit rewind to get the tape at the beginning.

Then the next command backs up root. When it finishes, the tape is left positioned after the root backup.

Then you backup the /usr filesystem. And so on.

So you have several backups on one tape. When you put the tape on and do a ufsrestore, you see only the first backup.

Want to see the second backup? Do:
mt -f /dev/rmt/0cn fsf 1
first. This will skip the first backup and leave you positioned at the second.
  #6 (permalink)  
Old 10-17-2001
guest100's Avatar
guest100 guest100 is offline
Banned
  
 

Join Date: Oct 2001
Location: London, UK
Posts: 146
Thanks Perderabo,

To make things a bit more clear,
I use:

<pre>

mt -f /dev/rmt/0cn rewind // no rewind, so I have everything in the same dat tape

ufsdump 0uf /dev/rmt/0cn /dev/dsk/c0t0d0s0 //mounted on /
ufsdump 0uf /dev/rmt/0cn /dev/dsk/c0t0d0s3 //mounted on /var

ufsdump 0uf /dev/rmt/0cn /dev/dsk/c0t0d0s4 //mounted on /home

ufsdump 0uf /dev/rmt/0cn /dev/dsk/c0t0d0s5 //mounted on /u01
ufsdump 0uf /dev/rmt/0cn /dev/dsk/c0t1d0s0 //mounted on /u02
ufsdump 0uf /dev/rmt/0cn /dev/dsk/c0t1d0s1 //mounted on /u03

ufsdump 0uf /dev/rmt/0cn /dev/dsk/c0t1d0s3 //mounted on /u04
</pre>

So the above commands back up the root filesystem. When it finishes, the tape is left positioned after the root backup.

How do I backup the rest (inside files). I mean when for instance I backup /var/ does this mean that I back up everything inside the /var directory including all the sub-directories?

So I have several backups on the same tape. When I put the tape on and do a ufsrestore, you see only the first backup.(I suppose I have to rewind the tape before the restore , correct?

"Want to see the second backup? Do:
<pre>
mt -f /dev/rmt/0cn fsf 1
</pre>
first. This will skip the first backup and leave you positioned at the second."
what happens when I do a ufsrestore -i
Am I able to choose ??

Thank you for your help
  #7 (permalink)  
Old 10-17-2001
alex blanco alex blanco is offline
Registered User
  
 

Join Date: Jun 2001
Location: Mexico city
Posts: 36
backup

Hi if you,re using ufsrestore -ivf you got into the first filesystem backed up if you want to see the next one you just type "q" wait for a while and automatically the rmt device got forward the next filesystem.

Information about what filesystem you are step in is displayed at the begining of the next rmt reading so you can read if it is /usr or /var etc

if you're using the same tape for variuos backups then you do not need to rewind the tape if not, rewind it at all and run your script.

Your script is ok BUT if you cant stop DB runing for God's (and you) sake you Must be sure that nobody is logged in even in a telnet session this will avoid garbage in your backup.
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 08:59 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