LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-29-2004, 09:49 PM   #1
Guerin
LQ Newbie
 
Registered: Apr 2004
Location: Christchurch, New Zealand
Distribution: Red Hat
Posts: 3

Rep: Reputation: 0
copying/backing up between 2 linux pc's across network.


Hello there,


This is my first proper install of Linux for a job.

Have a situation where there is 2 Linux servers.

Server 1 = Redhat 7.2 - 192.168.0.1
Server 2 = Redhat 9.0 - 192.168.0.3

Both have been setup with Samba, no network problems.
Server 1 has been installed before my time.
Server 2 is a new server which has just been installed.

Basically we want to copy the home and a shared directory
from Server2 to a new created shared directory on Server1 so it can grab the data onto Server1 backup tapes using Arkeia.

Is there a way to accomplish this and perhaps make this an automated routine with crontab.

That's all I can think of the moment to describe the situation.
Please ask if you need any more info and I do my best to anwser them.



Thanks for you time in advance.
 
Old 05-01-2004, 01:47 PM   #2
adamwenner
Member
 
Registered: Aug 2003
Distribution: windows xp home, windows 98, red hat 9, fedora core 3, redhat enterprise linux, win2000 pro/server
Posts: 217

Rep: Reputation: 32
it is possible, and i think the easiest way to do it is with either scp (which will copy files with the ssh protocol), or FTP

for SCP:

scp (path to file on local machine) root@otheripaddress:(path on remote machine)

this can be interesting and sometimes tedious with pathname expansion and such.

FTP:
the easiest way i think to do it
set up a user that has a home directory of the files you want to copy using

useradd username -d (path to files on local machine)
then do
passwd username

make sure vsftpd is running by running
"service vsftpd start" as root

log into that machine with an ftp client and then drag and drop if you are using gftp

if u need further clarification, lemme know

:-D

adam wenner

Last edited by adamwenner; 05-01-2004 at 01:48 PM.
 
Old 05-01-2004, 09:24 PM   #3
Guerin
LQ Newbie
 
Registered: Apr 2004
Location: Christchurch, New Zealand
Distribution: Red Hat
Posts: 3

Original Poster
Rep: Reputation: 0
Hey adamwenner,

Thanks very very much for your reply, I was getting worried that no one was replying. Will definetely give it go.

Monday is the start of another week and hopefully of success


The scp suggestions seems alot clearer and easier for me to try first.
As there is only about 4 users on the new server and I think I have setup the directory structure quite simple

So following your advice

e.g.

scp /home/user1 root@192.168.0.1/shareddirectory.
scp /home/user2 root@192.168.0.1/shareddirectory.


They will only be storing word, excel docs. so hopefully the above commands will grab the whole home users directories.

Sounds like once those commands work, I could add those commands to some of script to automate it. But that will be next step in figuring how to create them for linux.



Will keep this posted.

Thanks again.
Guerin
 
Old 05-01-2004, 10:24 PM   #4
adamwenner
Member
 
Registered: Aug 2003
Distribution: windows xp home, windows 98, red hat 9, fedora core 3, redhat enterprise linux, win2000 pro/server
Posts: 217

Rep: Reputation: 32
your commands would be

scp /home/user1 root@192.168.0.1:/shareddirectory
scp /home/user2 root@192.168.0.1:/shareddirectory

make sure you use the colons after the machines address, or it will not work


if this does not work, you may have to do

scp /home/user1/* root@192.168.0.1:/shareddirectory
scp /home/user2/* root@192.168.0.1:/shareddirectory

using the /* to specify the files inside the directory instead of just the directories




now that i am taking a linux class and starting to learn more about linux, i am starting to go into these forums and look for topics that have no replies and take a stab at them

Last edited by adamwenner; 05-01-2004 at 10:35 PM.
 
Old 05-04-2004, 12:02 AM   #5
Guerin
LQ Newbie
 
Registered: Apr 2004
Location: Christchurch, New Zealand
Distribution: Red Hat
Posts: 3

Original Poster
Rep: Reputation: 0
Just thought I keep this posted.

Haven't had much time to give this 100% as I really like to. so many interruptions when you don't need it.


Had a little problems with the RSA key authorization at first when trying the
scp commands suggested above. It was not wanting to connect at all between the 2 PC's but researching up I found
this article. Which is almost what I would like to achieve in my situation.

http://linuxgazette.com/node/view/193

Follow some of the instruction and So far I can connect to each others but still requires a password to copy through.

Will have to think it through so more.


Thanks to adamwenner for pointing me in the write direction of scp.


Will continue to keep this posted once fully successful.
 
Old 05-04-2004, 06:47 AM   #6
adamwenner
Member
 
Registered: Aug 2003
Distribution: windows xp home, windows 98, red hat 9, fedora core 3, redhat enterprise linux, win2000 pro/server
Posts: 217

Rep: Reputation: 32
the RSA key authentication should pop up when you attempt to connect the two pc's, it should ask yes or no to continue connecting

if there is a problem with the RSA and it says "offending key", just clear out the ~/.ssh/known_hosts (i think) file

ive never used passwordless authentication yet, so good luck
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Home network (connecting 2 pc's) ninadb Linux - Networking 2 01-18-2005 03:16 AM
can't network two PC's with RH 7.1 installed to them biscuitboy Red Hat 1 10-17-2004 01:45 PM
copying file in a network (linux server and window workstation) shadowsurfer Linux - Newbie 4 09-17-2004 11:15 AM
How to network 3 PC's on Suse Linux 9.0 Bob Moore Linux - Networking 4 04-26-2004 12:58 PM
Copying distro to other pc's iceman47 Linux - Software 2 01-13-2004 12:10 AM


All times are GMT -5. The time now is 10:19 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration