Subject | Automatic Backup & Validation Procedure |
---|---|
Author | Artur Anjos |
Post date | 2002-03-22T00:12:48Z |
Hi,
I wonder what's the best way to make sure that I have got a good backup
file. What I want to do is simply create some kind of a batch procedure (FB
1.0, W2K Server) that:
- GBak the Database
- Verify the integrity of the GBaked file created
- Good One - Archive
- Bad One - Some warning to the DB Administrator
Is there any rules to do such kind of thing in Windows? I don't know if when
a GBak fails he sends some kind of ERRORLEVEL control to the OS, and I can
not find any info about this in the manuals.
For now, I've got:
a) GBak'it using -y option and create a log for the backup;
b) Restore this GBaked File to a Temporary GDB file using again the -y
switch for another log
c) Delete this restored file (Not so simple, I'm keeping the last one, but
irrelevant here)
d) email this two logs to the DB Administrator & make him look at it!
In the manuals I have a list of error messages, so I'm thinking about
creating a small appl that parse's this two logs and if it finds some match
email the logs to the Administrator.
So:
a) Anyone knows if GBak produces some Errorlevel output?
b) It's ok to use the gbak error messages on pages 168...173 from Operations
Guide, or is there any other messages that were append/eliminated in
Firebird? (Nothing related in Release Notes from Helen). And are this
messages ok? In this kind of parsing I'm sure I will have some error related
to some string not exactly as the manual...
and finally...
c) I don't know if this is the best approach for this problem. Is someone
doing some kind of automatic verification of backup operation in some
different way? I'm re-inventing the wheel here?
TIA,
Artur
I wonder what's the best way to make sure that I have got a good backup
file. What I want to do is simply create some kind of a batch procedure (FB
1.0, W2K Server) that:
- GBak the Database
- Verify the integrity of the GBaked file created
- Good One - Archive
- Bad One - Some warning to the DB Administrator
Is there any rules to do such kind of thing in Windows? I don't know if when
a GBak fails he sends some kind of ERRORLEVEL control to the OS, and I can
not find any info about this in the manuals.
For now, I've got:
a) GBak'it using -y option and create a log for the backup;
b) Restore this GBaked File to a Temporary GDB file using again the -y
switch for another log
c) Delete this restored file (Not so simple, I'm keeping the last one, but
irrelevant here)
d) email this two logs to the DB Administrator & make him look at it!
In the manuals I have a list of error messages, so I'm thinking about
creating a small appl that parse's this two logs and if it finds some match
email the logs to the Administrator.
So:
a) Anyone knows if GBak produces some Errorlevel output?
b) It's ok to use the gbak error messages on pages 168...173 from Operations
Guide, or is there any other messages that were append/eliminated in
Firebird? (Nothing related in Release Notes from Helen). And are this
messages ok? In this kind of parsing I'm sure I will have some error related
to some string not exactly as the manual...
and finally...
c) I don't know if this is the best approach for this problem. Is someone
doing some kind of automatic verification of backup operation in some
different way? I'm re-inventing the wheel here?
TIA,
Artur