[ipac] interbase backup and restore?

Jonathan Rochkind rochkind at jhu.edu
Fri Aug 8 15:46:32 EDT 2008


Also,

http://www.ibexpert.info/documentation/%20%202.%20Database/%2014.%20Database%20Corruption/%20%201.%20How%20to%20corrupt%20a%20database/19121.html

Although Firebird is extremely stable and secure, there are a few things 
that you should NOT do, as these could result in corrupting the database!

The following tips have been taken from the Firebird Quick Start Guide, 
© IBPhoenix Publications 2002,2003. Many thanks to Paul Beach 
(www.ibphoenix.com)!
See Also: 1. Modifying Metadata Tables
See Also: 2. Disabling Forced Writes
See Also: 3. Restoring a Backup to a Running Database
See Also: 4. Allowing Users to Log in During a Restore
See Also: Structure of a Data Page

http://www.ibexpert.info/documentation/%20%202.%20Database/%2014.%20Database%20Corruption/%20%201.%20How%20to%20corrupt%20a%20database/%20%203.%20Restoring%20a%20backup%20to%20a%20running%20database/19152.html

One of the restore options in the GBAK utility (gbak -r[estore]) allows 
you to restore a gbak file over the top of an existing database. It is 
possible for this style of restore to proceed without warning while 
users are logged in to the database. Database corruption is almost 
certain to be the result.

    * Be aware that you will need to design your Admin tools and 
procedures to prevent any possibility for any user (including SYSDBA) to 
restore to your active database if any users are logged in.

If is practicable to do so, it is recommended to restore to spare disk 
space using the gbak -c[reate] option and test the restored database 
using isql [or IBExpert]. If the restored database is good, shut down 
the server. Make a file system copy of the old database and then copy 
the restored database file (or files) over their existing counterparts.

Chadwick, John, DCA wrote:
> Running Linux and using gbak command line tool, there is no need to stop
> and start firebird to do the backup.
>
> http://www.destructor.de/firebird/gbak.htm 
>
> To quote the first two paragraphs:
>
> GBAK is Firebird's command line tool for online backup and restore of a
> complete database.
>
> GBAK is able to perform a backup while the database is running. There is
> no need to shut down the database during a GBAK backup. GBAK will create
> a consistent snapshot of the database at the time it starts running. You
> will, however, notice a perfomance degradation during the backup, so it
> is a good idea to backup at night. As GBAK visits all pages of the
> database, so it will also perform a garbage collection on the database.
>
> John
>
> +-----------------------------------------------------------------------
> +
> John Chadwick, Ed.D. Information Technology Manager
> New Mexico State Library
> 1209 Camino Carlos Rey
> Santa Fe, NM 87507
> Phone: 505-476-9740  Cell: 505-629-8116 Fax: 505-476-9761
> john.chadwick at state.nm.us
> http://www.nmstatelibrary.org
>
> -----Original Message-----
> From: ipac-bounces at lists.tblc.org [mailto:ipac-bounces at lists.tblc.org]
> On Behalf Of Jonathan Rochkind
> Sent: Friday, August 08, 2008 1:03 PM
> To: Dynix's Horizon Information Portal,formerly iPac (discussion)
> Subject: Re: [ipac] interbase backup and restore?
>
> Yeah, googling for general advice on interbase and firebird, it looks 
> like you really are supposed to shut down the db before running backup 
> and restore---particularly the restore part, it's fine to do the backup 
> part without shutting it down.
>
> Of course, it is no surprise that SD doesn't tell us that or reccommend 
> that.
>
> SD does, I see in the knowledge base, "require" us to run backup and 
> restore weekly for HIP.  Oops. Now I've got to figure out how to get 
> firebird to automatically shut down and restart. Although really, it's 
> _probably_ sufficient to just make sure hzapp is stopped---what else 
> talks to firebird?
>
> [ It also looks like HIP uses a 6.x version of interbase/firebird. The 
> interbase/firebird web pages say that "no version of 6.x is considered 
> stable, and it should not be used." Surprise!]
>
> Jonathan
>
> Vern Mastel wrote:
>   
>> OK, what about the open files problem when backing up?
>>
>> When I backup my Windows HIP, I always stop all the HIP services and
>>     
> backup 
>   
>> (and restore, I have done it) works properly. If I do not stop the HIP
>>     
>
>   
>> services, the backup is worthless.
>>
>> I know there are commercial backup products that can backup open
>>     
> files.
>   
>> Does gbak fall in this category? Does the backup work job because it
>>     
> is a 
>   
>> Linux system?
>>
>>
>>
>>
>>   
>>     
>>> I do this while hip is running.
>>>
>>>
>>>
>>> John
>>>
>>> ----------
>>> From: ipac-bounces at lists.tblc.org
>>>       
> [mailto:ipac-bounces at lists.tblc.org] On 
>   
>>> Behalf Of Jay Roos
>>> Sent: Friday, August 08, 2008 11:44 AM
>>> To: Dynix's Horizon Information Portal,formerly iPac (discussion)
>>> Subject: Re: [ipac] interbase backup and restore?
>>>
>>>
>>>
>>> Are you doing this while hip is running or do you have to stop it
>>>       
> first?
>   
>>> On Fri, Aug 8, 2008 at 12:40 PM, Chadwick, John, DCA 
>>> <<mailto:john.chadwick at state.nm.us>john.chadwick at state.nm.us> wrote:
>>>
>>>
>>> I am backing up the database 5 days a week and we have done a
>>>       
> successful
>   
>>> test restore. Here is the script. We run it as a cron job. You may
>>>       
> want
>   
>>> to play around with this a bit.
>>>
>>> #!/bin/bash
>>> BCKNAME=/backup/ipacdb/`date +%Y`/ipacadmin-`date +%F`.gbk
>>> LOGNAME=/backup/ipacdb/`date +%Y`/log/ipacadmin-`date +%F`.log
>>> if [ ! -d /backup/ipacdb/`date +%Y` ]; then
>>> mkdir /backup/ipacdb/`date +%Y`
>>> fi
>>> if [ ! -d /backup/ipacdb/`date +%Y`/log ]; then
>>> mkdir /backup/ipacdb/`date +%Y`/log
>>> fi
>>> rm -f $BCKNAME.gz
>>> rm -f $LOGNAME
>>> find /backup/ipacdb/* -mtime +6 -exec rm {} \;
>>> (/opt/firebird/bin/gbak -b -v
>>>
>>>       
> localhost:/opt/dynix/appserver/jboss/server/default/data/ipacadmin.gdb
>   
>>> -user sysdba -pass xxxxxx $BCKNAME 2>&1) > $LOGNAME
>>> gzip $BCKNAME
>>>
>>>
>>>
>>>
>>> -----Original Message-----
>>> From: <mailto:ipac-bounces at lists.tblc.org>ipac-bounces at lists.tblc.org
>>>       
>
>   
>>> [mailto:ipac-bounces at lists.tblc.org]
>>> On Behalf Of Jonathan Rochkind
>>> Sent: Friday, August 08, 2008 11:30 AM
>>> To: Dynix's Horizon Information Portal,formerly iPac (discussion)
>>> Subject: [ipac] interbase backup and restore?
>>>
>>> Is anyone running regularly scheduled 'backup and restore' processes
>>>       
> on
>   
>>> their interbase/firebird dbs using gbak?
>>>
>>> I want to start scheduling such a thing. It is not clear to me if it
>>>       
> can
>   
>>> be done when the database is running, or if I need to shut down Jboss
>>> first.
>>>
>>> Jonathan
>>> _______________________________________________
>>> ipac mailing list
>>> <mailto:ipac at lists.tblc.org>ipac at lists.tblc.org
>>> http://lists.tblc.org/mailman/listinfo/ipac
>>>
>>>
>>>       
> ______________________________________________________________________
>   
>>> This inbound email has been scanned by the MessageLabs Email Security
>>> System.
>>>
>>>       
> ______________________________________________________________________
>   
>>> Confidentiality Notice: This e-mail, including all attachments is for
>>>       
> the 
>   
>>> sole use of the intended recipient(s) and may contain confidential
>>>       
> and 
>   
>>> privileged information. Any unauthorized review, use, disclosure or 
>>> distribution is prohibited unless specifically provided under the New
>>>       
>
>   
>>> Mexico Inspection of Public Records Act. If you are not the intended 
>>> recipient, please contact the sender and destroy all copies of this 
>>> message. -- This email has been scanned by the Sybari - Antigen Email
>>>       
> System.
>   
>>>
>>>
>>>
>>> _______________________________________________
>>> ipac mailing list
>>> <mailto:ipac at lists.tblc.org>ipac at lists.tblc.org
>>> http://lists.tblc.org/mailman/listinfo/ipac
>>>
>>>
>>>
>>>
>>> --
>>> Jay Roos
>>> Computer & Information Systems Coordinator
>>> Great River Regional Library
>>> 405 W. St. Germain
>>> St. Cloud, MN 56301
>>> (320) 650-2534
>>>
>>>
>>>
>>>       
> ______________________________________________________________________
>   
>>> This inbound email has been scanned by the MessageLabs Email Security
>>>       
> System.
>   
> ______________________________________________________________________
>   
>>> Confidentiality Notice: This e-mail, including all attachments is for
>>>       
> the 
>   
>>> sole use of the intended recipient(s) and may contain confidential
>>>       
> and 
>   
>>> privileged information. Any unauthorized review, use, disclosure or 
>>> distribution is prohibited unless specifically provided under the New
>>>       
>
>   
>>> Mexico Inspection of Public Records Act. If you are not the intended 
>>> recipient, please contact the sender and destroy all copies of this 
>>> message. -- This email has been scanned by the Sybari - Antigen Email
>>>       
> System.
>   
>>> _______________________________________________
>>> ipac mailing list
>>> ipac at lists.tblc.org
>>> http://lists.tblc.org/mailman/listinfo/ipac
>>>     
>>>       
>> Vern Mastel
>> Technology Coordinator, Bismarck Veterans Memorial Public Library
>> Desk Phone 701-355-1499 Cell Phone 701-426-5897
>>
>>
>>
>> _______________________________________________
>> ipac mailing list
>> ipac at lists.tblc.org
>> http://lists.tblc.org/mailman/listinfo/ipac
>>
>>   
>>     
>
>   

-- 
Jonathan Rochkind
Digital Services Software Engineer
The Sheridan Libraries
Johns Hopkins University
410.516.8886 
rochkind (at) jhu.edu



More information about the ipac mailing list