Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re^2: Firebird databases backup script

by Mery84 (Novice)
on Feb 28, 2012 at 15:21 UTC ( [id://956686]=note: print w/replies, xml ) Need Help??


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

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

Replies are listed 'Best First'.
Re^3: Firebird databases backup script
by Anonymous Monk on Feb 28, 2012 at 16:16 UTC

    Single quotes do not interpolate, but double quotes do, so use "" (this part explained in basic syntax section of perlintro )

    Its time like these I yearn for a perlquote :)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://956686]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (8)
As of 2024-04-19 14:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found