[ipac] interbase backup and restore?

Jonathan Rochkind rochkind at jhu.edu
Fri Aug 8 16:30:04 EDT 2008


Actually, what finally worked, is I needed to add some lines to the 
rebuild_interbase script supplied by SD.

I needed to 'touch' the file intended to be the .gdb destination, and 
then chgrp it to firebird. I have no idea why this doesn't seem 
neccesary for anyone but me, but it seems to have worked.  (Also odd 
that it's neccesary even though I was executing this script as root, but 
it appears from googling that on linux, gbak executes things as 
'firebird' even if you execute gbak as root.)

touch "$HZAPP/jboss/server/default/data/${DATE}ipacadmintmp.gdb"
chgrp firebird "$HZAPP/jboss/server/default/data/${DATE}ipacadmintmp.gdb"


Just spent about 5 hours banging my head against the wall on that one.

Jonathan

Jonathan Rochkind wrote:
> Thank you! I'll work on that. The crazy thing is that I'm not creating 
> the file, "gbak" is. I guess I could "touch" it first and then set it to 
> be executable.
>
> How very very confusing. Wonder why this step wasn't neccesary on 
> Solaris, and isn't included in the sample rebuild_firebird file 
> distributed by SD. But okay, with that tip maybe I can get it working, 
> thanks so much.
>
> Man, I wish SD actually provided reasonable support.
>
> Jonathan
>
> Chadwick, John, DCA wrote:
>   
>> The secret is to make the file executable. chmod +x filename.ext.
>>
>> I run it as root with no problems.
>>
>> John
>>
>>
>>  
>> -----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:29 PM
>> To: Dynix's Horizon Information Portal,formerly iPac (discussion)
>> Subject: Re: [ipac] interbase backup and restore?
>>
>> Hey John, what user do you run this cron as?
>>
>> I'm having all sorts of weird permission troubles on linux, that I 
>> didn't have with this stuff on Solaris. I'm trying to run it as root, 
>> which is what I used to do on Solaris, which you'd think would give it 
>> enough permissions to do anything, but it keeps complaining that it 
>> cant' create a file, and I can't figure out why. 
>>
>> Some google research suggested that even if you run it as 'root', it 
>> ends up executing as the 'firebird' user on Linux. But all the relevant 
>> directory locations are writeable by firebird! I'm kind of suspecting 
>> that if you run it as 'root', it creates a file as root, then switches 
>> to 'firebird' user and cant' read the file it created itself. But that's
>>
>> just a wild guess.
>>
>> Man, I hate this stuff.
>>
>> Jonathan
>>
>> Chadwick, John, DCA 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: 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
>>> 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
>>> 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