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....

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

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.