View previous topic :: View next topic |
Author |
Message |
mordredP Apprentice
Joined: 17 Oct 2005 Posts: 155 Location: bari.italy.€urope.earth
|
Posted: Sat Nov 26, 2005 11:08 am Post subject: syncing local site and remote site [SOLVED] |
|
|
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 |
|
|
Akhouk Guru
Joined: 23 May 2003 Posts: 476 Location: The Two Niles, Africa
|
Posted: Sat Nov 26, 2005 11:17 am Post subject: Re: syncing local site and remote site |
|
|
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 |
|
|
mordredP Apprentice
Joined: 17 Oct 2005 Posts: 155 Location: bari.italy.€urope.earth
|
Posted: Sat Nov 26, 2005 11:39 am Post subject: |
|
|
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 |
|
|
Akhouk Guru
Joined: 23 May 2003 Posts: 476 Location: The Two Niles, Africa
|
Posted: Sat Nov 26, 2005 11:53 am Post subject: |
|
|
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 |
|
|
mordredP Apprentice
Joined: 17 Oct 2005 Posts: 155 Location: bari.italy.€urope.earth
|
Posted: Sat Nov 26, 2005 12:04 pm Post subject: |
|
|
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 |
|
|
kamikaze04 Guru
Joined: 28 Mar 2004 Posts: 366 Location: Valencia-Spain
|
Posted: Sat Nov 26, 2005 12:32 pm Post subject: |
|
|
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 |
|
|
mordredP Apprentice
Joined: 17 Oct 2005 Posts: 155 Location: bari.italy.€urope.earth
|
Posted: Sat Nov 26, 2005 12:55 pm Post subject: |
|
|
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 |
|
|
kamikaze04 Guru
Joined: 28 Mar 2004 Posts: 366 Location: Valencia-Spain
|
Posted: Sat Nov 26, 2005 2:05 pm Post subject: |
|
|
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 |
|
|
|