Thanks for your help. One issue fixed.
Now I have problem to succesfully execute the most important backup command.
Second foreach loop have system command (below pasted latest, fixed a bit version):
foreach (@files) {
chdir($fbbin);
print "Tworze kopie bazy $_ \n";
system('./gbak -user sysdba -password masterkey -BACKUP_DATABA
+SE localhost:$bazy$_ $kopie$_.gbk') or print "Blad archiwizowania baz
+y $_ \n";
print "Gotowa kopia bazy $_ \n";
}
I`ve try it in many ways in single quotes `` or '' also in "" always command output is the same:
gbak: ERROR:requires both input and output filenames
gbak:Exiting before completion due to errors
sh: 2: /mnt/storage/testy/simplemarketing.gdb: not found
sh: 3: .gbk: not found
Gotowa kopia bazy simplemarketing.gdb
It looks like the ./gbak command from Firebird binaries don`t reads the variables correctly.
By hand this command looks:
./gbak -user sysdba -password masterkey -BACKUP_DATABASE localhost:/op
+t/databases/demo.gdb /mnt/storage/testy/demo.gdb.gbk
and works without problems.
In my script:
/opt/dabasaes/ comes from $bazy
demo.gdb - database filename should be inserted by $_ from table @files
destination dir /mnt/storage/testy/ should be inserted by $localdir and extended by .gbk file extension.
But from perl script this command don`t work....