Subject RE: [ib-support] Backup and restore of a database
Author Alan McDonald
corruptions.. no wonder!
here's one strategy (others may follow and it depends how much use your db
has and how big it is and how much traffic it gets)

1. backup regularly (as often as you see fit) - perhaps nightly just before
any arcserve tape backup takes place.
2. restore to temp dir less regularly and make a connection and validation
to ensure that the backups are being done properly
3. once quite infrequently (perhaps 2 times a year)
your backup is restored to another name adjacent to real database then the
real one is renamed to "oldXXX" and the restored original file is rename to
"your real dbname.gdb"
step 3 has to be done while noone is connected - you have to manage this
process somehow.

Check out ibphoeniz for some tools to do some of this e.g. IBBackupService
(i think)

Alan
PS. DON'T COPY GDB files as a general rule - if you can rename them, then
noone is connected.


-----Original Message-----
From: Anthony Ison [mailto:anthony@...]
Sent: Tuesday, 18 March 2003 2:16 PM
To: ib-support@yahoogroups.com
Subject: [ib-support] Backup and restore of a database


Hi all,

I'm looking to automatically backup and restore a database after an upgrade.

My first attempt at achieving this has met with almost complete failure.
My approach has been as follows:
1. Backup the database (db1.gdb).
2. Restore to another file (db2.gdb)
3. Copy db1.gdb to db1.gdb.bak
4. Copy db2.gdb to db1.gdb

Unfortunately, this approach has produced a significantly high number of
corrupt databases. I believe it is to do with the fact that I'm copying a
database, that could potentially have a number of connections open while
this is going on.

I want to introduce more tests, etc that will guarantee a non-corrupt
database at the end of the process. This should be the original file if the
backup and resotre was not successful. I would like to be able to do this
on a remote machine except, I don't trust the backups produced (there is no
guarantee they will restore) and I am not really prepared to wait for the
database to restore to a temp location and then restore to the location I
want...

What do others do to regularly maintain their databases? Is a backup and
restore enough? How do you guarantee the system is not in use when you
start a backup and restore? How do you stop someone from using your system
once the backup and restore has been started?

Any help is greatly appreciated!

Thanks
Anthony




To unsubscribe from this group, send an email to:
ib-support-unsubscribe@egroups.com



Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/