Re: backup Oracle DB at AMANDA server

2005-03-15 Thread Tom Brown
Jack$on wrote:
hi.
Thankx to everyone!
currently I'm recompile my amanda, with my tar script.
shutdown/startup schema good working  now I'm replace start/shop of
my Oracle DB to a switching DB in  switching out hot backup mode...
I'm reconfigure my Oracle DB,  change archive_log_dest to another
partition (may be to another server), and try backup redo logs with
starttime param in dumptype. I think, that if I backup redo logs with
estimated delay (2 or 3 hours) all must works correctly... i think...
:)
not sure what version of Oracle you use but here we use 8.1.7.4 and 
9.2.0.4 all on Linux. To backup i simply backup the DB using RMAN and 
backup to a directory on the local oracle server. I then use Amanda to 
backup that directory and so i get control files, datafiles etc all in 
the RMAN backup.

This works fine as i can't stop my db's either as we are a 24x7 shop
thanks


Re[2]: backup Oracle DB at AMANDA server

2005-03-05 Thread Jack$on
hi.

Thankx to everyone!

currently I'm recompile my amanda, with my tar script.
shutdown/startup schema good working  now I'm replace start/shop of
my Oracle DB to a switching DB in  switching out hot backup mode...

I'm reconfigure my Oracle DB,  change archive_log_dest to another
partition (may be to another server), and try backup redo logs with
starttime param in dumptype. I think, that if I backup redo logs with
estimated delay (2 or 3 hours) all must works correctly... i think...
:)

-- 
Best regards,
 Jack$onmailto:[EMAIL PROTECTED]



backup Oracle DB at AMANDA server

2005-03-04 Thread Jack$on
Hello amanda-users,

  I have configured AMANDA Server, my daily  weekly backups from my
  servers working successful...
  but I wonna backup My Oracle Database by The AMANDA.
  previously, i must do export of DB, or stop Oracle Database...
  only after this i may backup my Database files, or export files...
  but how i can synchronize my export procedure  amanda backup?

  PS I'm sorry for my bad English...
  
-- 
Best regards,
 Jack$on  mailto:[EMAIL PROTECTED]



Re[2]: backup Oracle DB at AMANDA server

2005-03-04 Thread Jack$on
Hello Bert,

Friday, March 4, 2005, 2:39:19 PM, you wrote:

Bpb I don't even take credit for this solution;
Bpb all credits should go to Paul Bijnens - also on this list. 

Bpb (alles kits, Paul ? ;-) )

Bingo! :)
beautiful!!! :)
Thanx a lot!
finaly -- some dumes questions.

i build amanda whith my tar scripts at client?
and using at amanda server comp-root-tar...

but if I must backup several directories, but only 1 of them needs
Oracle stop...
May I compile amanda, with any different dumptype?
example -- comp-root-oratar

what about it?

-- 
Best regards,
 Jack$onmailto:[EMAIL PROTECTED]



Re: backup Oracle DB at AMANDA server

2005-03-04 Thread Gavin Henry
quote who=Jack$on
 Hello amanda-users,

   I have configured AMANDA Server, my daily  weekly backups from my
   servers working successful...
   but I wonna backup My Oracle Database by The AMANDA.
   previously, i must do export of DB, or stop Oracle Database...
   only after this i may backup my Database files, or export files...
   but how i can synchronize my export procedure  amanda backup?

Via crontab.

Write a script that stops Oracle, backs up and then run amdump.

That's what we do.


   PS I'm sorry for my bad English...

 --
 Best regards,
  Jack$on  mailto:[EMAIL PROTECTED]




-- 
Kind Regards,

Gavin Henry.
Managing Director.

T +44 (0) 1224 279484
M +44 (0) 7930 323266
F +44 (0) 1224 742001
E [EMAIL PROTECTED]

Open Source. Open Solutions(tm).

http://www.suretecsystems.com/


Re: backup Oracle DB at AMANDA server

2005-03-04 Thread Bert_De_Ridder

Build amanda with this parameter : 

--with-gnutar=/bin/amandatar 

In this /bin/amandatar you can do something
like this : 
( I know this perl code is probably
awful coding, but it works)



#!/usr/bin/perl

use Getopt::Long qw(:config pass_through);

$result = GetOptions (
'directory=s' = \$dir,
'file=s' = \$file
);


if ( $file ne '/dev/null' )
{
 if ( $dir eq '/your/oracle/dir'
)
 {
  system echo 'Start
backup oracle at '  /var/lib/amanda/runtime ;
  system date 
/var/lib/amanda/runtime;
  system ( command
to stop oracle  /var/lib/amanda/runtime );
 }
}

# reconstruct command line
while ( $ARGV[0] ne '' )
{
 $val = $ARGV[0] ;
 unshift ( @NEWARGV, $val, ) ;
 shift @ARGV;
}

while ( $NEWARGV[0] ne '' )
{
 $val = $NEWARGV[0] ;
 unshift ( @ARGV, $val ) ;
 shift @NEWARGV;
}

if ( $dir ne '' )
{
 unshift ( @ARGV, '--directory',
$dir );
}
if ( $file ne '' )
{
 unshift ( @ARGV, '--file', $file
);
}

if ( $file ne '/dev/null' )
{
 system echo 'Backing up
directory ' $dir  /var/lib/amanda/runtime ;
}

unshift ( @ARGV , /bin/tar
) ;

system ( @ARGV ) ;

# postprocessing 
#
if ( $file ne '/dev/null' )
{
 if ( $dir eq '/your/oracle/dir'
)
 {
  system ( command
to start oracle  /var/lib/amanda/runtime );
  system echo 'End
backup oracle at '  /var/lib/amanda/runtime ;
  system date 
/var/lib/amanda/runtime;
 }
}

exit 0;


I don't even take credit for this solution;
all credits should go to Paul Bijnens - also on this list. 

(alles kits, Paul ? ;-) )






Kind regards, 


Bert De Ridder

PeopleWare NV - Head Office
Cdt.Weynsstraat 85 
B-2660 Hoboken 
Tel: +32 3 448.33.38 
Fax: +32 3 448.32.66 

PeopleWare NV - Branch Office Geel
Kleinhoefstraat 5
B-2440 Geel
Tel: +32 14 57.00.90
Fax: +32 14 58.13.25

http://www.peopleware.be

http://www.mobileware.be






Jack$on [EMAIL PROTECTED]

Sent by: [EMAIL PROTECTED]
04/03/2005 13:27



Please respond to
Jack$on [EMAIL PROTECTED]





To
amanda-users@amanda.org


cc



Subject
backup Oracle DB at AMANDA
server








Hello amanda-users,

 I have configured AMANDA Server, my daily  weekly backups from
my
 servers working successful...
 but I wonna backup My Oracle Database by The AMANDA.
 previously, i must do export of DB, or stop Oracle Database...
 only after this i may backup my Database files, or export files...
 but how i can synchronize my export procedure  amanda backup?

 PS I'm sorry for my bad English...
 
-- 
Best regards,
 Jack$on 
   mailto:[EMAIL PROTECTED]




Re: backup Oracle DB at AMANDA server

2005-03-04 Thread Mike Delaney
On Fri, Mar 04, 2005 at 06:07:19PM +0100, Paul Bijnens wrote:
 Last time I looked at doing backups of Oracle (Ora 6-7-8), I
 approached it as follows:  first set each tablespace in hot backup mode
 (alter tablespace TS begin backup) then doing a filesystem backup
 of all the directories with datafiles, using plain amanda DLE's,
 then setting each tablespace out of hot backup mode, (alter
 tablespace TS end backup);  then force a redo log switch (alter
 system switch logfile) and then doing a backup of the archived redologs.
 

Ouch.  If that database is seeing any signifigant activity during the
backup, you're going to be generating *alot* of redo with that approach.
Putting the whole database in backup mode at once is typically frowned
upon unless you're using something like mirror splitting or snapshots
so you can turn backup mode off after a few seconds.

 Is Oracle 9-10 any different for hot backup mode (i.e. more
 complicated than it need to be?).

Not that I'm aware of.  alter tablespace begin backup is still there, and
reportedly they've added an alter database begin backup to put all tablespaces
in backup mode at once for the snapshot crowd.  RMAN is, however, the
preferred backup method these days - it's typically much faster than copying
the datafile, either cold or in backup mode, and doesn't cause the database
to generate additional redo the way backup mode does.

Currently, I run RMAN backups of our databases to disk, and let Amanda
pick up both the RMAN output and the archive logs.  I keep the last
three RMAN runs around, plus all archive logs that RMAN hasn't backed
up at least 3 times.  That way, even if the Amanda run overlaps the
RMAN run and a disaster occurs before the next time Amanda runs, I can
still restore from the previous RMAN run + archive logs.  Unfortunately,
this doesn't scale too well, since you need anywhere from 2-3 times
as much space for the RMAN output as your database + archive logs require
(and I've got nearly as much space taken by archive logs as I have datafiles).

For larger databases, I be inclined to go the alter database begin backup +
snapshot route.




Re: backup Oracle DB at AMANDA server

2005-03-04 Thread Stefan G. Weichinger
Hi, Paul,

on Freitag, 04. März 2005 at 18:07 you wrote to amanda-users:

PB Last time I looked at doing backups of Oracle (Ora 6-7-8), I
PB approached it as follows:  first set each tablespace in hot backup mode
PB (alter tablespace TS begin backup) then doing a filesystem backup
PB of all the directories with datafiles, using plain amanda DLE's,
PB then setting each tablespace out of hot backup mode, (alter
PB tablespace TS end backup);  then force a redo log switch (alter
PB system switch logfile) and then doing a backup of the archived redologs.

PB No need to stop the database at all.

PB The dirty trick with amanda here is getting the archived redo logs done
PB after the rest. That is difficult, because the datafiles
PB are spread over different DLE's, and, as another thread this week
PB already explained, you can't very well specify an order for the DLE's
PB in amanda.  My solution was to mirror the archived redologs to a
PB different machine. Having a tapebackup of datafiles + archived redologs
PB on two different machines was enough to restore the database. That
PB mirror was kept up to date during daytime too.
PB To be really sure, I did a full export too (also nice to restore a
PB single table if needed).

PB Is Oracle 9-10 any different for hot backup mode (i.e. more
PB complicated than it need to be?).

Paul, Bert, and anyone else:
Could anyone of you imagine writing a small Howto back up Oracle dbs
for the docs?

-- 
best regards,
Stefan

Stefan G. Weichinger
mailto:[EMAIL PROTECTED]






Re: backup Oracle DB at AMANDA server

2005-03-04 Thread Paul Bijnens
Mike Delaney wrote:
On Fri, Mar 04, 2005 at 06:07:19PM +0100, Paul Bijnens wrote:
Last time I looked at doing backups of Oracle (Ora 6-7-8), I
approached it as follows:  first set each tablespace in hot backup mode
(alter tablespace TS begin backup) then doing a filesystem backup
of all the directories with datafiles, using plain amanda DLE's,
then setting each tablespace out of hot backup mode, (alter
tablespace TS end backup);  then force a redo log switch (alter
system switch logfile) and then doing a backup of the archived redologs.
Ouch.  If that database is seeing any signifigant activity during the
backup, you're going to be generating *alot* of redo with that approach.
Putting the whole database in backup mode at once is typically frowned
upon unless you're using something like mirror splitting or snapshots
so you can turn backup mode off after a few seconds.

That's why you do it during the night...
And on Solaris I do use snapshots, which takes indeed a few seconds
only, for all the DLE's, not only the oracle datafiles.
Never File changed while reading messages anymore.
A pitty snapshots on Linux LVM2 does not work (yet).  On some
older systems still running a 2.4.18 kernel and LVM1, I use snapshots
too (and MySQL instead of Oracle: a magnitude or two less in footprint,
and still suitable for the tasks I need.)

Is Oracle 9-10 any different for hot backup mode (i.e. more
complicated than it need to be?).

Not that I'm aware of.  alter tablespace begin backup is still there, and
reportedly they've added an alter database begin backup to put all tablespaces
in backup mode at once for the snapshot crowd.  RMAN is, however, the
preferred backup method these days - it's typically much faster than copying
the datafile, either cold or in backup mode, and doesn't cause the database
to generate additional redo the way backup mode does.
Need to study again, I see...
Currently, I run RMAN backups of our databases to disk, and let Amanda
pick up both the RMAN output and the archive logs.  I keep the last
three RMAN runs around, plus all archive logs that RMAN hasn't backed
up at least 3 times.  That way, even if the Amanda run overlaps the
RMAN run and a disaster occurs before the next time Amanda runs, I can
still restore from the previous RMAN run + archive logs.  Unfortunately,
this doesn't scale too well, since you need anywhere from 2-3 times
as much space for the RMAN output as your database + archive logs require
(and I've got nearly as much space taken by archive logs as I have datafiles).
For larger databases, I be inclined to go the alter database begin backup +
snapshot route.
--
Paul Bijnens, XplanationTel  +32 16 397.511
Technologielaan 21 bus 2, B-3001 Leuven, BELGIUMFax  +32 16 397.512
http://www.xplanation.com/  email:  [EMAIL PROTECTED]
***
* I think I've got the hang of it now:  exit, ^D, ^C, ^\, ^Z, ^Q, F6, *
* quit,  ZZ, :q, :q!,  M-Z, ^X^C,  logoff, logout, close, bye,  /bye, *
* stop, end, F3, ~., ^]c, +++ ATH, disconnect, halt,  abort,  hangup, *
* PF4, F20, ^X^X, :D::D, KJOB, F14-f-e, F8-e,  kill -1 $$,  shutdown, *
* kill -9 1,  Alt-F4,  Ctrl-Alt-Del,  AltGr-NumLock,  Stop-A,  ...*
* ...  Are you sure?  ...   YES   ...   Phew ...   I'm out  *
***


Re: backup Oracle DB at AMANDA server

2005-03-04 Thread Andreas Sundstrom
Paul Bijnens wrote:
Mike Delaney wrote:
On Fri, Mar 04, 2005 at 06:07:19PM +0100, Paul Bijnens wrote:
Last time I looked at doing backups of Oracle (Ora 6-7-8), I
approached it as follows:  first set each tablespace in hot backup mode
(alter tablespace TS begin backup) then doing a filesystem backup
of all the directories with datafiles, using plain amanda DLE's,
then setting each tablespace out of hot backup mode, (alter
tablespace TS end backup);  then force a redo log switch (alter
system switch logfile) and then doing a backup of the archived redologs.
Ouch.  If that database is seeing any signifigant activity during the
backup, you're going to be generating *alot* of redo with that approach.
Putting the whole database in backup mode at once is typically frowned
upon unless you're using something like mirror splitting or snapshots
so you can turn backup mode off after a few seconds.

That's why you do it during the night...
And on Solaris I do use snapshots, which takes indeed a few seconds
only, for all the DLE's, not only the oracle datafiles.
Never File changed while reading messages anymore.
A pitty snapshots on Linux LVM2 does not work (yet).  On some
older systems still running a 2.4.18 kernel and LVM1, I use snapshots
too (and MySQL instead of Oracle: a magnitude or two less in footprint,
and still suitable for the tasks I need.)
It has been working for me for atleast 3 months now.. I had a couple of 
oopses at first but they were apparantly fixed in later kernels.

/Andreas