Hernan Lopes
2013-05-05 22:12:47 UTC
I want to transfer
from FTPSOURCE: /some/dirs/This-Dir-Source
into FTPDESTINY: /some/other/dirs/This-Dir-Destiny
I can do it in one w ?ay that i know of:
slot FTPDESTINY; mkdir /some/other/dirs/This-Dir-Destiny; cd
/some/other/dirs/This-Dir-Destiny;
slot FTPSOURCE; mirror /some/dirs/This-Dir-Source slot:FTPDESTINY
Ok, that works but i think it looks awful.
The problem with the approach above is if i have many of those commands, i
have a feeling that lftp will get lost because the commands are not chained
somehow. For example, when i execute the cmd aboce, imagine FTPDESTINY is
busy at the time i try:
slot FTPDESTINY; mkdir /some/other/dirs/This-Dir-Destiny; cd
/some/other/dirs/This-Dir-Destiny;
Then, FTPDESTINY was busy and conclusion: none of those commands were
executed and i am at directory /the/wrong/directory/
And then comes the next command which is:
slot FTPSOURCE; mirror /some/dirs/This-Dir-Source slot:FTPDESTINY
And BAAAM, its going to mirror into /the/wrong/directory/
So to solve this, i think the whole tihng should be passed all together
within one command so either the whole thing works or none of it... at
least it will always act correctly.
Here is my sugested command:
mirror --source-slot=FTPSOURCE --source-dir=/some/dirs/This-Dir-Source
--destiny-slot=FTPDESTINY --destiny-dir=/some/other/dirs/This-Dir-Destiny
What do you guys think?
Is this safe way possible already
from FTPSOURCE: /some/dirs/This-Dir-Source
into FTPDESTINY: /some/other/dirs/This-Dir-Destiny
I can do it in one w ?ay that i know of:
slot FTPDESTINY; mkdir /some/other/dirs/This-Dir-Destiny; cd
/some/other/dirs/This-Dir-Destiny;
slot FTPSOURCE; mirror /some/dirs/This-Dir-Source slot:FTPDESTINY
Ok, that works but i think it looks awful.
The problem with the approach above is if i have many of those commands, i
have a feeling that lftp will get lost because the commands are not chained
somehow. For example, when i execute the cmd aboce, imagine FTPDESTINY is
busy at the time i try:
slot FTPDESTINY; mkdir /some/other/dirs/This-Dir-Destiny; cd
/some/other/dirs/This-Dir-Destiny;
Then, FTPDESTINY was busy and conclusion: none of those commands were
executed and i am at directory /the/wrong/directory/
And then comes the next command which is:
slot FTPSOURCE; mirror /some/dirs/This-Dir-Source slot:FTPDESTINY
And BAAAM, its going to mirror into /the/wrong/directory/
So to solve this, i think the whole tihng should be passed all together
within one command so either the whole thing works or none of it... at
least it will always act correctly.
Here is my sugested command:
mirror --source-slot=FTPSOURCE --source-dir=/some/dirs/This-Dir-Source
--destiny-slot=FTPDESTINY --destiny-dir=/some/other/dirs/This-Dir-Destiny
What do you guys think?
Is this safe way possible already