LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 05-14-2004, 12:54 PM   #1
phatboyz
Member
 
Registered: Feb 2004
Location: Mooresville NC
Distribution: CentOS 4,Free BSD,
Posts: 358

Rep: Reputation: 30
Need Help Mirroring Data


I have allready setup public keys with no password.

I have a server behind the corporate firewall, I can connect to the server at my house using a ssh connection.

I hate to ask for someone to draw this out for me, but I am not all linux complient.

Just for ease of use I'd like to do the following.

Compress two directorys
then rsynce them to the server at my house and then uncompress them.

I know that I need to use a script for this, but like I said I dont know all these commands.

I have tried rsync with no luck as I must be doing something wrong.
 
Old 05-14-2004, 01:07 PM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 64
Take a look at these LinuxAnswers:
http://www.linuxquestions.org/questi...ticle&artid=79
http://www.linuxquestions.org/questi...ticle&artid=80
 
Old 05-14-2004, 03:56 PM   #3
phatboyz
Member
 
Registered: Feb 2004
Location: Mooresville NC
Distribution: CentOS 4,Free BSD,
Posts: 358

Original Poster
Rep: Reputation: 30
Thanks david, I have been going by your guides. The public key is done.

This is the command that I am running.
rsync -e ssh -avz --delete-after root@165.247.000.000:/home/midgett/drawings /home/backup


I am not sure what order to put the directorys. Which one is source and which one is the offsite directory?

I have to start the connection from the host side as it is behind a firewall and I have to tunnel through the VPN.

Second note: Can you help me use linux to connect through our cisco 501 PIX? I have the vpn client software for windows.





[root@backupsvr root]# rsync -e ssh -avz --delete-after root@165.247.000.000:/home/midgett/drawings /home/backup
receiving file list ... done
wrote 16 bytes read 51 bytes 26.80 bytes/sec
total size is 0 speedup is 0.00
[root@backupsvr root]#
 
Old 05-15-2004, 07:15 AM   #4
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 64
Just as with a copy command the source is always first - ie:
cp /path/to/source /path/to/destination

So this:
rsync -e ssh -avz --delete-after root@165.247.000.000:/home/midgett/drawings /home/backup

Copys from the remote machine to the local machine.

I've never used Cisco PIX VPN what problems are you having with it?
 
Old 05-16-2004, 09:14 PM   #5
phatboyz
Member
 
Registered: Feb 2004
Location: Mooresville NC
Distribution: CentOS 4,Free BSD,
Posts: 358

Original Poster
Rep: Reputation: 30
Here is the latest.
[root@backupsvr root]# rsync -e ssh -avz --delete-after root@165.247.000.00:/home/backup/ /home/midgett/drawings/
receiving file list ... link_stat /home/backup/. : No such file or directory
done
client: nothing to do: perhaps you need to specify some filenames or the --recursive option?
rsync error: partial transfer (code 23) at main.c(594)


I am still getting nothing from the host to the client.
What am I doing wrong?
 
Old 05-17-2004, 12:13 AM   #6
emetib
Member
 
Registered: Feb 2003
Posts: 482

Rep: Reputation: 33
first question though. when i just cp'd your script here, i noticed where your at. now are you going into your server, at home, and then dropping it to work? or are you at work dropping it to your house?

now if your at work and bringing it from home back to where you're at, this would be the script-
# rsync -e ssh -avz --delete-after user@home:~/home/backup/ /home/midgett/drawings/./

if your at work and you want to drop it at home, then it's this-
[root@backupsvr root]# rsync -e ssh -avz --delete-after /home/midgett/drawings/ root@165.247.000.00:~/home/backup/./

hoepfully that makes some sense to you.
the thing that one of the other gentlemen forgot to tell you about the direction, is that you have to put what you want moved before the address of where it's going, like the second script. as to the first, you had to put the user of the or campus box in to get what you wanted and then bring it back to where you are at.
i always use the ./ so that i don't overwrite anything, that way your system knows to put it in that directory and not name the target dir what you are bringing to it. i also use the ~ even though it's not really necessary on your script, especially if your going from work to home with the data. actually it wouldn't really matter.

cheers.

Last edited by emetib; 05-17-2004 at 12:23 AM.
 
Old 05-17-2004, 07:17 AM   #7
phatboyz
Member
 
Registered: Feb 2004
Location: Mooresville NC
Distribution: CentOS 4,Free BSD,
Posts: 358

Original Poster
Rep: Reputation: 30
Thank you for stopping by to lend a hand. I tried what you were talking about and this is the results that I got. Oh I am droping files from work to my home server.

[root@backupsvr root]# rsync -e ssh -avz --delete-after /home/midgett/drawings/./ root@165.247.000.000:~/home/backup/./
building file list ... link_stat /home/midgett/drawings/./. : No such file or directory
done
wrote 25 bytes read 20 bytes 18.00 bytes/sec
total size is 0 speedup is 0.00
rsync error: partial transfer (code 23) at main.c(578)


I know that on the client box the dir is /home/midgett/drawings/

Last edited by phatboyz; 05-17-2004 at 07:19 AM.
 
Old 05-17-2004, 07:36 AM   #8
LuggerHouse
Member
 
Registered: May 2004
Location: Montreal,QC,Canada
Distribution: Fedora Core 7
Posts: 208

Rep: Reputation: 30
Please do the following:

ls /home/midgett/drawings/

if the result is not a bunch of file ok, fine... :-)

Usualy when rsync is issuing that kind of message it is because no files are found...

Dont give up!!

Last edited by LuggerHouse; 05-17-2004 at 07:38 AM.
 
Old 05-17-2004, 07:50 AM   #9
phatboyz
Member
 
Registered: Feb 2004
Location: Mooresville NC
Distribution: CentOS 4,Free BSD,
Posts: 358

Original Poster
Rep: Reputation: 30
This is the destintination directory. There shouldn't be any files there untill this runs. The directory is there if that what you are looking for.
 
Old 05-17-2004, 07:59 AM   #10
LuggerHouse
Member
 
Registered: May 2004
Location: Montreal,QC,Canada
Distribution: Fedora Core 7
Posts: 208

Rep: Reputation: 30
Quote:
Originally posted by phatboyz
This is the destintination directory. There shouldn't be any files there untill this runs. The directory is there if that what you are looking for.
So if this was the destination dir your command should be something like this:

rsync -e ssh -avz --delete-after root@165.247.000.000:~/home/backup/
/home/midgett/drawings/

No ??
It should be like a regular copy
Rsync source destination...

Well that's how it worked with my tests ...
 
Old 05-17-2004, 09:05 AM   #11
phatboyz
Member
 
Registered: Feb 2004
Location: Mooresville NC
Distribution: CentOS 4,Free BSD,
Posts: 358

Original Poster
Rep: Reputation: 30
This is the error that I got when I tried your way.


[root@backupsvr root]# rsync -e ssh -avz --delete-after root@165.247.000.000:~/home/backup/ /home/midgett/drawings/
receiving file list ... link_stat /root/home/backup/. : No such file or directory
done
client: nothing to do: perhaps you need to specify some filenames or the --recursive option?
rsync error: partial transfer (code 23) at main.c(594)



I also tried it with out the ~ so it didn't use the root dir.

Last edited by phatboyz; 05-17-2004 at 11:31 AM.
 
Old 05-17-2004, 09:09 AM   #12
LuggerHouse
Member
 
Registered: May 2004
Location: Montreal,QC,Canada
Distribution: Fedora Core 7
Posts: 208

Rep: Reputation: 30
So, what is the result of your ls when you shh ???

You have to have the right absolute path

Hint:
Normaly, on a standard setupit might be

/home/[USERNAME]/backup...

try to determine what is the right path from / and then put that path on you command ...
 
Old 05-17-2004, 11:32 AM   #13
phatboyz
Member
 
Registered: Feb 2004
Location: Mooresville NC
Distribution: CentOS 4,Free BSD,
Posts: 358

Original Poster
Rep: Reputation: 30
I know that!

Its right I have checked 3 times.

The directorys are there its just not copying the files.

Last edited by phatboyz; 05-17-2004 at 12:44 PM.
 
Old 05-17-2004, 01:12 PM   #14
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 64
Quote:
Originally posted by phatboyz
[root@backupsvr root]# rsync -e ssh -avz --delete-after root@165.247.000.000:~/home/backup/ /home/midgett/drawings/
receiving file list ... link_stat /root/home/backup/. : No such file or directory
done
client: nothing to do: perhaps you need to specify some filenames or the --recursive option?
rsync error: partial transfer (code 23) at main.c(594)
When using that command your are using a tilde "~" this references your home directory so /home/backup/ is being translated to /root/home/backup/

If you want to copy the "/home/backup" directory to "/home/midgett/drawings/" on your local machine then:
rsync -e ssh -avz --delete-after root@165.247.000.000:/home/backup /home/midgett/drawings/
 
Old 05-19-2004, 01:19 PM   #15
phatboyz
Member
 
Registered: Feb 2004
Location: Mooresville NC
Distribution: CentOS 4,Free BSD,
Posts: 358

Original Poster
Rep: Reputation: 30
I am on my local machine in the office and want it to connect to remote at the house. I can ssh in fine. I have to start the connection from this side b/c i can not get from the outside in on the VPN in linux. If am on a windows puter I can get on the VPN and conect to the office. But this has really nothing to do with my problem. Now from the computer that is hosting the files I am running

rsync -e ssh -avz --delete-after root@server:/home/ /home/

ok I have figured this out. But I still need help. This command above copyed everything from my home server to my backup server at the office. I had the office server start the connection. How can I get this to run the other way around. I need to copy from the work server to my home server, but the connection has to be made from the work server to the home server b/c of the VPN.

Last edited by phatboyz; 05-19-2004 at 02:53 PM.
 
  


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
mirroring a whole server ginger.fish0 Fedora 3 08-22-2005 12:58 PM
Mirroring Drives dmedici Fedora - Installation 0 05-28-2004 09:49 AM
Mirroring bkeating Linux - Software 1 06-22-2003 06:37 AM
X Session Mirroring WeNdeL Linux - Software 0 05-15-2003 09:32 AM
Data mirroring from W2K/XP? PopeKevinI Linux - Networking 5 04-23-2003 10:04 PM


All times are GMT -5. The time now is 02:04 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration