Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
syncing local site and remote site [SOLVED]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
mordredP
Apprentice
Apprentice


Joined: 17 Oct 2005
Posts: 155
Location: bari.italy.€urope.earth

PostPosted: Sat Nov 26, 2005 11:08 am    Post subject: syncing local site and remote site [SOLVED] Reply with quote

i would like to keep the files on my web server always up-to-date with the one i update on my desktop machine. I thought about using rsync but i guess i should put the daemon on my desktop and a client on the server (maybe with a cron job). But i don't like this way very much..
I was wondering if there's some other way to do this (maybe without using an ftp daemon on my server)..
_________________
People fall into 10 groups: those who know binary and those who don't
dosmary.netsons.org
01010110


Last edited by mordredP on Sat Dec 03, 2005 11:12 pm; edited 1 time in total
Back to top
View user's profile Send private message
Akhouk
Guru
Guru


Joined: 23 May 2003
Posts: 476
Location: The Two Niles, Africa

PostPosted: Sat Nov 26, 2005 11:17 am    Post subject: Re: syncing local site and remote site Reply with quote

mordredP wrote:
i would like to keep the files on my web server always up-to-date with the one i update on my desktop machine. I thought about using rsync but i guess i should put the daemon on my desktop and a client on the server (maybe with a cron job). But i don't like this way very much..
I was wondering if there's some other way to do this (maybe without using an ftp daemon on my server)..


You don't necessarily need to have a server running at all. You could just run rsync over an ssh connection initiated from your local desktop machine.

Code:

rsync -arv --rsh=ssh --delete /my/local/path remote.server.com:/my/remote/path

_________________
AMD 64 3500+, 2Gb RAM DDR400, 2 x 180Gb SATA, 256Mb Nvidia
Back to top
View user's profile Send private message
mordredP
Apprentice
Apprentice


Joined: 17 Oct 2005
Posts: 155
Location: bari.italy.€urope.earth

PostPosted: Sat Nov 26, 2005 11:39 am    Post subject: Reply with quote

thanks for the help.. but how can i tell rsync to connect not to port 22 for ssh?
_________________
People fall into 10 groups: those who know binary and those who don't
dosmary.netsons.org
01010110
Back to top
View user's profile Send private message
Akhouk
Guru
Guru


Joined: 23 May 2003
Posts: 476
Location: The Two Niles, Africa

PostPosted: Sat Nov 26, 2005 11:53 am    Post subject: Reply with quote

mordredP wrote:
thanks for the help.. but how can i tell rsync to connect not to port 22 for ssh?

Hmm...don't quite understand what you are asking. The command I gave means you don't need to have an rsync server running. It relies on the ssh server that will be running on port 22. It will automatically try to use ssh for the connection and then run the rsync over the established connection. You therefore get the security of using ssh and you remove the need for an rsync server. An rsync server IMHO is an overkill if you are the only one using it.
_________________
AMD 64 3500+, 2Gb RAM DDR400, 2 x 180Gb SATA, 256Mb Nvidia
Back to top
View user's profile Send private message
mordredP
Apprentice
Apprentice


Joined: 17 Oct 2005
Posts: 155
Location: bari.italy.€urope.earth

PostPosted: Sat Nov 26, 2005 12:04 pm    Post subject: Reply with quote

Akhouk wrote:
mordredP wrote:
thanks for the help.. but how can i tell rsync to connect not to port 22 for ssh?

Hmm...don't quite understand what you are asking. The command I gave means you don't need to have an rsync server running. It relies on the ssh server that will be running on port 22. It will automatically try to use ssh for the connection and then run the rsync over the established connection. You therefore get the security of using ssh and you remove the need for an rsync server. An rsync server IMHO is an overkill if you are the only one using it.


i mean that i have the ssh daemon listening on another port than the default one..
_________________
People fall into 10 groups: those who know binary and those who don't
dosmary.netsons.org
01010110
Back to top
View user's profile Send private message
kamikaze04
Guru
Guru


Joined: 28 Mar 2004
Posts: 366
Location: Valencia-Spain

PostPosted: Sat Nov 26, 2005 12:32 pm    Post subject: Reply with quote

It will use the port where your Sshd is running, don't worry about it
_________________
Todo lo que quisiste saber sobre google en: www.noticiasgoogle.es
Back to top
View user's profile Send private message
mordredP
Apprentice
Apprentice


Joined: 17 Oct 2005
Posts: 155
Location: bari.italy.€urope.earth

PostPosted: Sat Nov 26, 2005 12:55 pm    Post subject: Reply with quote

kamikaze04 wrote:
It will use the port where your Sshd is running, don't worry about it


it does not..
_________________
People fall into 10 groups: those who know binary and those who don't
dosmary.netsons.org
01010110
Back to top
View user's profile Send private message
kamikaze04
Guru
Guru


Joined: 28 Mar 2004
Posts: 366
Location: Valencia-Spain

PostPosted: Sat Nov 26, 2005 2:05 pm    Post subject: Reply with quote

Okey, yeah, i failed my answer, in one of my servers i've got:

#!/bin/bash
rsync -av --rsh="ssh -l myuser -p 30" user@12.12.128.25:/backups/ ./backup_remote

So with -p you should solve it.
_________________
Todo lo que quisiste saber sobre google en: www.noticiasgoogle.es
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum