Subject | Re: How make a back up from php? |
---|---|
Author | Reinhard Neidl |
Post date | 2009-08-19T12:26:37Z |
--- In firebird-php@yahoogroups.com, Oscar Darío Perdiguero <dperdisysa@...> wrote:
from file.php , file.bat or file.sh as cronjob
<?php
//there are better places to make a backup
//beware of: php.timeout
$output = array();
$returncode = -999;
$cmd = "/path/to/gbak.exe";
$cmd .= " -b";
$cmd .= " -v";
$cmd .= " -user ...";
$cmd .= " -password ...";
$cmd .= " .... ";
exec($cmd, $out, $returncode);
echo ("gbak going home with:".$returncode);
echo ("gbak output:");
var_dump($output);
?>
>start 'D:\path\to\gbak(.exe) -a -b -c ...'
> Hi. My name is Darío and I'm needing some help to put to work the
> following code
>
> Please help me and forgive me my english.
>
> function BackUp()
> {
> $host = "whitegandalf";
> $username = "SYSDBA";
> $password = "masterkey";
> $charset = "NONE";
> $base = "C:\SysAdmin\Sistemas\Repositorio SA\Herramientas
> SA\InfoTester\Datos\DBClientServer\DBINFOTESTER.GDB";
>
> $resource_service_handle = ibase_service_attach ($host,
> $username, $password);
> if ($resource_service_handle)
> {
> ibase_backup($resource_service_handle, $base,
> 'C:\SysAdmin\Sistemas\Repositorio SA\Herramientas
> SA\InfoTester\Datos\DBClientServer\Respaldo\DBINFOTESTER.GDB');
> ibase_service_detach ($resource_service_handle);
> }
> }
>
> but I'm having this error.
>
> Warning: ibase_backup() [function.ibase-backup]: unassigned code in
> C:\Documents and Settings\SysAdmin\Mis documentos\Delphi for PHP
> Projects\firebirdbackup.php on line 23
>
> Thanks in advance
>
from file.php , file.bat or file.sh as cronjob
<?php
//there are better places to make a backup
//beware of: php.timeout
$output = array();
$returncode = -999;
$cmd = "/path/to/gbak.exe";
$cmd .= " -b";
$cmd .= " -v";
$cmd .= " -user ...";
$cmd .= " -password ...";
$cmd .= " .... ";
exec($cmd, $out, $returncode);
echo ("gbak going home with:".$returncode);
echo ("gbak output:");
var_dump($output);
?>