Discussion:
Beginner with Perl - multiple scripts sequential and autoclose window
(too old to reply)
Fribse
2005-11-07 11:45:01 UTC
Permalink
Hi Guys

I'm not really using perl for anything interesting, except doing a
backup of mysql with the mysqlhotcopy script.
As far as I understand the script, I can only backup one database at a
time with it, so the different databases I have running, needs a
seperate script calls.

How do I accomplish running the scripts in sequence, and how do I make
perl close the window after itself?

I've put this in an .ncf file:
load address space=mybackup perl sys:/mysql/scripts/mysqlhotcopy.pl
phpgedview web:/mysqlbk --user=* --password=* --allowold
load address space=mybackup perl sys:/mysql/scripts/mysqlhotcopy.pl
videodb web:/mysqlbk --user=* --password=* --allowold
load address space=mybackup perl sys:/mysql/scripts/mysqlhotcopy.pl
fribertchat web:/mysqlbk --user=* --password=* --allowold
load address space=mybackup perl sys:/mysql/scripts/mysqlhotcopy.pl
intranet web:/mysqlbk --user=* --password=* --allowold
load address space=mybackup perl sys:/mysql/scripts/mysqlhotcopy.pl
mysql web:/mysqlbk --user=* --password=* --allowold
load address space=mybackup perl sys:/mysql/scripts/mysqlhotcopy.pl
phpmyadmin web:/mysqlbk --user=* --password=* --allowold

But that just opens 6 parallel backup jobs, and leaves 6 windows open
:-)
--
/Fribse
Fribse
2005-11-07 11:49:53 UTC
Permalink
Post by Fribse
Hi Guys
I'm not really using perl for anything interesting, except doing a
backup of mysql with the mysqlhotcopy script.
As far as I understand the script, I can only backup one database at a
time with it, so the different databases I have running, needs a
seperate script calls.
How do I accomplish running the scripts in sequence, and how do I make
perl close the window after itself?
load address space=mybackup perl sys:/mysql/scripts/mysqlhotcopy.pl
phpgedview web:/mysqlbk --user=* --password=* --allowold
load address space=mybackup perl sys:/mysql/scripts/mysqlhotcopy.pl
videodb web:/mysqlbk --user=* --password=* --allowold
load address space=mybackup perl sys:/mysql/scripts/mysqlhotcopy.pl
fribertchat web:/mysqlbk --user=* --password=* --allowold
load address space=mybackup perl sys:/mysql/scripts/mysqlhotcopy.pl
intranet web:/mysqlbk --user=* --password=* --allowold
load address space=mybackup perl sys:/mysql/scripts/mysqlhotcopy.pl
mysql web:/mysqlbk --user=* --password=* --allowold
load address space=mybackup perl sys:/mysql/scripts/mysqlhotcopy.pl
phpmyadmin web:/mysqlbk --user=* --password=* --allowold
But that just opens 6 parallel backup jobs, and leaves 6 windows open
:-)
Of course, 30 seconds after I post this, I finally find a script where
it shows '--autodestroy' as an argument for the perl interpreter, so at
least thats cleared now, I just need to get the sequential stuff in
order then.
--
/Fribse
Guenter Knauf, DevNet SysOp 32
2005-11-07 13:10:34 UTC
Permalink
Hi Fribse,
its my guess (!!) that if you use the root account so that you can access
all databases you can simply give motre than one database as argument - and
then the script does the sequence for you...

Guenter.
Post by Fribse
Post by Fribse
Hi Guys
I'm not really using perl for anything interesting, except doing a
backup of mysql with the mysqlhotcopy script.
As far as I understand the script, I can only backup one database at a
time with it, so the different databases I have running, needs a
seperate script calls.
How do I accomplish running the scripts in sequence, and how do I make
perl close the window after itself?
load address space=mybackup perl sys:/mysql/scripts/mysqlhotcopy.pl
phpgedview web:/mysqlbk --user=* --password=* --allowold
load address space=mybackup perl sys:/mysql/scripts/mysqlhotcopy.pl
videodb web:/mysqlbk --user=* --password=* --allowold
load address space=mybackup perl sys:/mysql/scripts/mysqlhotcopy.pl
fribertchat web:/mysqlbk --user=* --password=* --allowold
load address space=mybackup perl sys:/mysql/scripts/mysqlhotcopy.pl
intranet web:/mysqlbk --user=* --password=* --allowold
load address space=mybackup perl sys:/mysql/scripts/mysqlhotcopy.pl
mysql web:/mysqlbk --user=* --password=* --allowold
load address space=mybackup perl sys:/mysql/scripts/mysqlhotcopy.pl
phpmyadmin web:/mysqlbk --user=* --password=* --allowold
But that just opens 6 parallel backup jobs, and leaves 6 windows open
:-)
Of course, 30 seconds after I post this, I finally find a script where
it shows '--autodestroy' as an argument for the perl interpreter, so at
least thats cleared now, I just need to get the sequential stuff in
order then.
Fribse
2005-11-07 14:07:29 UTC
Permalink
Post by Guenter Knauf, DevNet SysOp 32
its my guess (!!) that if you use the root account so that you can access
all databases you can simply give motre than one database as argument - and
then the script does the sequence for you...
Hi hi, good guess :-) Very very nice, it's doing the backups very nicely
now.
--
/Fribse
Loading...