Networking Forums

Networking Forums > Computer Networking > Linux Networking > transfer data from one machine to another

Reply
Thread Tools Display Modes

transfer data from one machine to another

 
 
bahoo
Guest
Posts: n/a

 
      03-04-2007, 11:56 AM
Hi,

I have ssh access to two linux machines (both WITHOUT root account),
and I'd like to copy data from one to another.
Since the directory structure is different, I want to specify in a
script (ideally in python, because that's what I want to learn) what
to copy over like this:

source: /home/john/folderA
destination: /home/smith/folderB

I'm a newbie on linux and ssh networking and python, so your
suggestions are welcome! A small working example would be appreciated!

bahoo

 
Reply With Quote
 
 
 
 
Bjoern Schliessmann
Guest
Posts: n/a

 
      03-04-2007, 12:12 PM
bahoo wrote:

> I have ssh access to two linux machines (both WITHOUT root
> account), and I'd like to copy data from one to another.
> Since the directory structure is different, I want to specify in a
> script (ideally in python, because that's what I want to learn)
> what to copy over like this:
>
> source: /home/john/folderA
> destination: /home/smith/folderB
>
> I'm a newbie on linux and ssh networking and python, so your
> suggestions are welcome! A small working example would be
> appreciated!


On example machine 10.0.0.1, logged in as john:

scp -r ~/folderA smith@10.0.0.2:~/folderB

It's IMHO simpler and quicker than developing the same functionality
in Python. Or is there a simple module I overlooked?

Regards,


Björn

Fup2 comp.lang.python

P.S.: Please don't crosspost over hierarchies without setting
followup.

--
BOFH excuse #53:

Little hamster in running wheel had coronary; waiting for
replacement to be Fedexed from Wyoming

 
Reply With Quote
 
Rikishi 42
Guest
Posts: n/a

 
      03-04-2007, 02:03 PM
On Sunday 04 March 2007 13:56, bahoo wrote:

> I have ssh access to two linux machines (both WITHOUT root account),
> and I'd like to copy data from one to another.
> Since the directory structure is different, I want to specify in a
> script (ideally in python, because that's what I want to learn) what
> to copy over like this:
>
> source: /home/john/folderA
> destination: /home/smith/folderB
>
> I'm a newbie on linux and ssh networking and python, so your
> suggestions are welcome! A small working example would be appreciated!


Try rsync, if you need a second run, it will only copy what has been
modified in the source.

rsync -var -e ssh /home/john/folderA name@computerB:/home/smith/folderB

Should be enough.
Remove 'v' for less verbose operation.

--
Research is what I'm doing, when I don't know what I'm doing.
(von Braun)

 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Data transfer works only one-way ?! Please help ... Gilles Garrigues Wireless Networks 3 05-25-2008 02:21 PM
Data transfer speeds 'Nel' Home Networking 9 07-15-2007 11:19 AM
data transfer louis@inlovewithfashion.com Windows Networking 2 12-09-2006 05:49 AM
Data transfer twosheds Wireless Networks 2 08-16-2005 09:29 AM
data transfer 98 to xp brad Windows Networking 1 07-26-2005 07:38 PM



1 2 3 4 5 6 7 8 9 10 11