in reply to Re^2: Firebird databases backup script
in thread Firebird databases backup script

Hello,
By hand gbak command looks:
./gbak -user sysdba -password masterkey -BACKUP_DATABASE localhost:/opt/databases/demo.gdb /opt/backup/demo.gdb.gbk
and works fine.
Also in simple script:
chdir ($fbbin); system("./gbak -user sysdba -password masterkey -BACKUP_DATABA +SE localhost:/opt/databases/demo.gdb /opt/databases/demo.gbk")==0 or +die "Failed to create backup file \n";

I see where is the issue with loading details from variables to system command but i don`t have any idea how to fix it.
See:
foreach (@files) { chdir ($fbbin); print "./gbak -user sysdba -password masterkey -BACKUP_DATABAS +E localhost:$data$_ $tempdir$_.gbk \n";
Gives me output:
./gbak -user sysdba -password masterkey -BACKUP_DATABASE localhost:/op +t/databases/simplemarketing.gdb /opt/backup/simplemarketing.gdb .gbk
This output should be in one row not in three ;). It looks like enter pressed always after $_ variable loaded from @files table which contains databases filenames. Any ideas how to fix it?

Replies are listed 'Best First'.
Re^4: Firebird databases backup script
by Anonymous Monk on Mar 01, 2012 at 03:52 UTC