Unix Shell - Via FTP, any way to copy a remote file to another remote directory

This is Interesting: Free IT Magazines  
Home > Archive > Unix Shell > February 2007 > Via FTP, any way to copy a remote file to another remote directory





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Via FTP, any way to copy a remote file to another remote directory
bay_dar@yahoo.com

2007-02-19, 7:15 pm

Hi, with FTP I'm trying to make a copy of an existing remote file in
another remote directory, but I could find no way to do this. Some
background: I'm trying to upload 50+ traffic webcam images into two
different directories on my webcam server as QUICKLY as possible. One
directory will be viewable at all times (e.g. for police etc). The
other directory, we may close down to the public (in case of injury or
bridge jumper etc). So in most cases I want to upload to the always
viewable directory and make a copy to the other directory. Sure I can
upload the file twice, but the seconds add up when you are uploading
50+ files.

But it seems I can't make remote copies, in any way via ftp, or can I.
Or maybe I could execute a remote script, does anybody know if there
is a way or how to execute a remote script with a parameter via ftp.
Or any other suggestions? The webserver is running on a UNIX box.

Thanks

Bill Marcum

2007-02-19, 7:15 pm

On 19 Feb 2007 12:30:10 -0800, bay_dar@yahoo.com
<bay_dar@yahoo.com> wrote:
>
>
> Hi, with FTP I'm trying to make a copy of an existing remote file in
> another remote directory, but I could find no way to do this. Some
> background: I'm trying to upload 50+ traffic webcam images into two
> different directories on my webcam server as QUICKLY as possible. One
> directory will be viewable at all times (e.g. for police etc). The
> other directory, we may close down to the public (in case of injury or
> bridge jumper etc). So in most cases I want to upload to the always
> viewable directory and make a copy to the other directory. Sure I can
> upload the file twice, but the seconds add up when you are uploading
> 50+ files.
>
> But it seems I can't make remote copies, in any way via ftp, or can I.
> Or maybe I could execute a remote script, does anybody know if there
> is a way or how to execute a remote script with a parameter via ftp.
> Or any other suggestions? The webserver is running on a UNIX box.
>

You can use ssh to execute remote scripts, if the administrators of your
server allow it.


--
Keep out of reach of children.
Harry331

2007-02-20, 1:26 am

bay_dar@yahoo.com wrote...

>But it seems I can't make remote copies, in any way via ftp, or can I.


WS_FTP Pro

http://www.ipswitch.com/products/ws....asp?t=features

The web page says server-to-server transfers.

Never tried it myself.

If you don't have a *FTP* constraint, I would suggest
using scp ...

just ssh to the first remote server,
from there scp to the second remote server.

Harry331

2007-02-20, 1:26 am

Harry331 wrote...
>
>bay_dar@yahoo.com wrote...
>
>
>WS_FTP Pro
>
> http://www.ipswitch.com/products/ws....asp?t=features
>
> The web page says server-to-server transfers.
>
>Never tried it myself.
>
>If you don't have a *FTP* constraint, I would suggest
>using scp ...
>
> just ssh to the first remote server,
> from there scp to the second remote server.


man scp ... says OK for copies between 2 remote hosts

NAME
scp -- secure copy (remote file copy program)

SYNOPSIS
scp [-1246BCEpqrv] [-c cipher] [-F ssh_config] [-i identity_file]
[-l limit] [-o ssh_option] [-P port] [-S program]
[[user@]host1:]file1 [...] [[user@]host2:]file2

DESCRIPTION
scp copies files between hosts on a network. It uses ssh(1) for data
transfer, and uses the same authentication and provides the same security
as ssh(1). Unlike rcp(1), scp will ask for passwords or passphrases if
they are needed for authentication.

Any file name may contain a host and user specification to indicate that
the file is to be copied to/from that host. Copies between two remote
hosts are permitted.

bay_dar@yahoo.com

2007-02-20, 7:16 pm


Thanks for the suggestions, but I should have mentioned that my source
box that I am ftping from is a Windows 2003 server, while the
destination server is Unix. I don't think scp and ssh are supported
with my windows server.

- Regarding WS_FTP Pro, yes it allows use of the "cp" command but what
it is really doing is making a local copy and then transferring it up
- very inefficient for what I need to do (copy 50+ images in less than
10 seconds).

I have heard that my administrator can put additional commands in the
server's
/usr/bin directory and configure the server to allow clients to use
the "cp"
via the "SITE <command>" command. Does anybody know how to do this?

Thanks.

Harry331

2007-02-21, 1:23 am

bay_dar@yahoo.com wrote...
>
>
>Thanks for the suggestions, but I should have mentioned that my source
>box that I am ftping from is a Windows 2003 server, while the
>destination server is Unix. I don't think scp and ssh are supported
>with my windows server.


SSH (client & server) are available on Unix, Linux, as well as Windows.

BTW, why don't you RDP (Remote Desktop) or VNC to your Windows 2003
server, and from there you can ftp to the Unix box.

If you don't want GUI (RDP & VNC), you can use commandline tools
(such as telnet to your W2K3 server, or use psexec.exe -- google pstools)
to login / remote execute scp / rcp scripts for remote file transfers.

You may also set up schedule tasks on W2K3S box to scp / rcp files
to your Unix box.

You may also setup Outlook on W2K3S such that, upon receiving an email
with some keywords on the subject line, will fire off an schedule task
to scp / rcp files to your Unix box.

Lots of options. You just need to do some research your own.





Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2009 webservertalk.com