-
Hi, all!
There are a short holidays now in our organization and i
want to do cold backup. I can't do it at another time as some
users are working at any time of day and night.
During the hot backup i ran script in server manager:
alter tablespace tbs1 begin backup;
host dd if=... of=/dev/nrmt0h
....
alter tablespace tbs1 end backup;
alter tablespace tbs2 begin backup;
...
Should i run similar script if i shut down instance?
Or how i can do it in UNIX?
I have 30 datafiles and backup is lasting usually about 7 hours.
I don't want wait near computer when each file will be copied
to DLT and then write comand for next file .
And once more question:
our system (UNIX) administrator said that i have to copy files
using dd (not tar) as with tar files will shrink and restore will not
correct. Is it so?
Thank you!
Tatyana
-
When the database is down, you don't have to take your tablespaces in and out of backup mode. In fact, when the database is down, you can't. Once the db is down, use dd or tar to copy the appropriate files to tape.
I have used tar to backup and restore oracle databases THOUSANDS of times. I would be completely comfortable using it.
Jeff Hunter
-
Hi
In cold backup you dont have to copy one file each time, for example you have 30 datafiles in 10 directories
u01/
u02/
u03/
.......
.......
u08/
u09/
u10/
etc.
you shutdown first the database then you just copy those directories to tape or disk, may be
tar /u01/* /tape
tar /u02/* /tape
.......
.......
until /u10
Then copy the redo logs and the control files.
You said it takes around 7 hours then schedule a cron job to start database after 7 hours or so.
Normally we would have 4 scripts
startdb
stardb.sql
stopdb
stopdb.sql
and schedule cron to run stopdb which will call stopdb.sql to stop the database (and the listener), then copy the datafiles to tape or disk. Then schedule cron to run startdb which will call startdb.sql to startup the database (and the listeenr).
-
I don't blame you for not wanting to sit there for hours waiting for it to write to tape.
If you have space on your server, shutdown the database, make copies of all datafiles in a backup directory, then startup the database. Then you can write the copied files to tape and don't have to worry about how long it's going to take. I don't know how big your datafiles are, but making copies to disk should be faster than writing to tape. Plus, if you copy all datafiles to a common directory, then you only need one tar command to tar the whole directory to tape.
-
this is exactly what we are doing, shutdown oracle, copy all db files (data, redo, init...) to a backup directory, start db, then tar all files from a central place to tape. we can use this tape to restore the whole db on different machine.
-
Thanks to all!
I like your idea to tar the whole dir as i have all datafiles +control +
logs in 2 directories.
So i tar them to tape as i haven't so much place on disks.
Tatyana
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|