Re: [PHP] Firebird Backup
Sándor Tamás (HostWare Kft.) wrote: Hi, I don't know if it's Firebird or PHP question. Bit of both - probably worth moving to the firebird-php list http://groups.yahoo.com/group/firebird-php/ I want to use remote administration on one of my pages, at least do a backup for a Firebird database. Because the database file is located on a different intranet machine, I have to use service manager to do backup. So I tried: $svc_mgr = ibase_service_attach(FBSERVER, FBUSER, FBPASS); if ($svc_mgr) { $bkp = ibase_backup($svc_mgr, $source_db, $dest_file, IBASE_BKP_NO_GARBAGE_COLLECT, true); } ibase_service_detach($svc_mgr); The bad thing: if I include server: in $source_db string, it gives me an unkown ISC 0 error. When I simply put the database alias in $source_db, it freezes the whole apache, but at least it starts the backup... Then, when I turn off verbose, it does nothing at all, but gives back a true value. So I think the closest solution is the second one, but does anybody have any idea why it shuts down apache? And what can I do to prevent this? I use Firebird 2.1, PHP 5.2.8 and Apache 2.2.3 on WinXP (as a development environment) ibase_backup is not something we would use normally. I think that things have advanced somewhat since the function was created, and I suspect it simply does not know about those changes. I've not checked what ibWebAdmin does currently :( One of the nice features of Firebird is the ability to backup while still working with the database, and so it's more normal to have backup happening as a background task, or via one of the management tools. -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/lsces/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk// Firebird - http://www.firebirdsql.org/index.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Firebird Backup
Sure, you're right. I wouldn't normally do this, but this is the only way. I took a look at ibWebAdmin. It simply calls the host machine's Firebird gbak utility. So I had to know the exact path to this utility on the linux based web server. But I don't know. In fact I don't have any access to this machine, only FTP and of course, web. The PHP installation doesn't even let me to do exec_command(). SanTa - Original Message - From: Lester Caine les...@lsces.co.uk To: php-general@lists.php.net Sent: Wednesday, January 07, 2009 9:07 AM Subject: Re: [PHP] Firebird Backup Sándor Tamás (HostWare Kft.) wrote: Hi, I don't know if it's Firebird or PHP question. Bit of both - probably worth moving to the firebird-php list http://groups.yahoo.com/group/firebird-php/ I want to use remote administration on one of my pages, at least do a backup for a Firebird database. Because the database file is located on a different intranet machine, I have to use service manager to do backup. So I tried: $svc_mgr = ibase_service_attach(FBSERVER, FBUSER, FBPASS); if ($svc_mgr) { $bkp = ibase_backup($svc_mgr, $source_db, $dest_file, IBASE_BKP_NO_GARBAGE_COLLECT, true); } ibase_service_detach($svc_mgr); The bad thing: if I include server: in $source_db string, it gives me an unkown ISC 0 error. When I simply put the database alias in $source_db, it freezes the whole apache, but at least it starts the backup... Then, when I turn off verbose, it does nothing at all, but gives back a true value. So I think the closest solution is the second one, but does anybody have any idea why it shuts down apache? And what can I do to prevent this? I use Firebird 2.1, PHP 5.2.8 and Apache 2.2.3 on WinXP (as a development environment) ibase_backup is not something we would use normally. I think that things have advanced somewhat since the function was created, and I suspect it simply does not know about those changes. I've not checked what ibWebAdmin does currently :( One of the nice features of Firebird is the ability to backup while still working with the database, and so it's more normal to have backup happening as a background task, or via one of the management tools. -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/lsces/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk// Firebird - http://www.firebirdsql.org/index.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Firebird Backup
Sándor Tamás (HostWare Kft.) wrote: Sure, you're right. I wouldn't normally do this, but this is the only way. I took a look at ibWebAdmin. It simply calls the host machine's Firebird gbak utility. So I had to know the exact path to this utility on the linux based web server. But I don't know. In fact I don't have any access to this machine, only FTP and of course, web. The PHP installation doesn't even let me to do exec_command(). It's difficult to manage a site when all the best tools are switched off :( - I'm surprised Firebird is actually available :) We probably need to add further testing for the ibase_service_attach facilities, and look at what is missing. This is probably one that needs a bug opening on the php tracker, but I suspect it's actually an area where the fbird_ version of php_interbase may be a required split? Not using Interbase, I don't know how different this area of facilities are nowadays. One of the reasons for discussion on the php-firebird list so we can bounce questions to the firebird development team. -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/lsces/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk// Firebird - http://www.firebirdsql.org/index.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Firebird Backup
Hi, I don't know if it's Firebird or PHP question. I want to use remote administration on one of my pages, at least do a backup for a Firebird database. Because the database file is located on a different intranet machine, I have to use service manager to do backup. So I tried: $svc_mgr = ibase_service_attach(FBSERVER, FBUSER, FBPASS); if ($svc_mgr) { $bkp = ibase_backup($svc_mgr, $source_db, $dest_file, IBASE_BKP_NO_GARBAGE_COLLECT, true); } ibase_service_detach($svc_mgr); The bad thing: if I include server: in $source_db string, it gives me an unkown ISC 0 error. When I simply put the database alias in $source_db, it freezes the whole apache, but at least it starts the backup... Then, when I turn off verbose, it does nothing at all, but gives back a true value. So I think the closest solution is the second one, but does anybody have any idea why it shuts down apache? And what can I do to prevent this? I use Firebird 2.1, PHP 5.2.8 and Apache 2.2.3 on WinXP (as a development environment) Thanks, SanTa -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php