Thanks Daniel,

the parallel option was it... I removed that and it started working just fine... (and the recls was not necessary - I threw it in because I needed it to see the update interactively...)

as for the syntax, I couldn't get it to work as you described, although it does look cleaner... I get the following error: Unknown command `set ftp:list-options -a; quote cwd NONVOL:; recls; mirror -a -v . /root/test/tmp'.

Original syntax works, so I am running at least now...

THANKS ALL!!

On Feb 25, 2010 2:45pm, Daniel Fazekas <[email protected]> wrote:
On Feb 25, 2010, at 17:42, [email protected] wrote:



> I thought just adding to the script would work, but now mirror appears to be using the file listing from the wrong drive?

> (manually, I had to issue recls to update the filelisting....)

> Modified:

> lftp -c "open -e \"set ftp:list-options -a; quote cwd drive2:; recls; mirror -a --parallel=10 -v . /local_dest_dir\" -u admin,passwd SERVERNAME"

> How to update the mirror command with the other drive then?



I can't really try it, not having such a weird server, but here are some observations:



- Your issue is most likely caused by using the --parallel switch with mirror. That means lftp has to open 10 connections to the server simultaneously. None of the subsequent reconnections will have your "quote CWD" applied. There may be some way to get lftp to execute a given command automatically on reconnections but I only found "ftp:acct" on a quick search and that's not quite what you'd need… Personally, I'd just drop the parallel switch. You may also want to turn automatic retries off in case of network/connection errors since any automatic reconnection will also have you ending up on the wrong drive.



- I would recommend spelling CWD all uppercase (in quote CWD). LFTP really does quote whatever you write after "quote" as-is.



- I don't think there's any need for "recls" (or "cache flush") in your command above.



- Your command looks unnecessarily convoluted.



Instead of:

lftp -c "open -e \"commands to execute go here\" -u admin,passwd SERVERNAME"



You could simply use:

lftp -c "commands to execute go here" -u admin,passwd SERVERNAME



- If things still don't work as they should, set the debug level to 5 or more ("debug 5")



Reply via email to