LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   backing up remote folder with rsync and ssh (https://www.linuxquestions.org/questions/linux-software-2/backing-up-remote-folder-with-rsync-and-ssh-268429/)

ohcarol 12-20-2004 10:48 AM

backing up remote folder with rsync and ssh
 
hi

I want to backup my data from remote machine using rsync and ssh. Can anyone tell me how to do that? My ssh uses port 2002. What are the process for backing up data using rsync with ssh?

Local machine ip: 192.168.2.1
Remote machine ip: 192.168.2.25
both machine uses ssh port 2001

david_ross 12-20-2004 12:49 PM

Take a look at this LA:
http://www.linuxquestions.org/questi...ticle&artid=80

ohcarol 12-21-2004 10:42 AM

rsync and ssh port
 
Hello

I want to backup some files from remote machine with rsync and ssh, but my ssh uses different port ie 2002. Could you please help me with the rsync command for specifying command. for eg.

$ rsync -avr -e ssh thitto@192.168.0.1:2001/home/thitto/ /dstdir/


Is this correct?

david_ross 12-22-2004 01:57 PM

I haven't actually tried that with rsync but I think you need to specify the port in the -e option:
-e "ssh -p 1234"

Assuming the server is on port 1234

ohcarol 12-27-2004 04:05 AM

rsync and ssh port
 
Thank david_ross it worked. Another thing I want to ask is how can I specify ssh password in scripts so that it will automatically execute via cron at midnight.

#!/bin/bash

/usr/bin/rsync -avr -e "ssh -p1234" root@abc.domain.com:/home/root/mail \

/home/root/backup/

password

david_ross 12-28-2004 08:39 AM

Rather than leaving passwords in plain text files and having to remember to change them after a period of time I would reccomend using public key authentication - see:
http://www.linuxquestions.org/questions/answers/79

mtkeira 01-03-2005 12:43 AM

Alternatives to unison and rsync?
 
Has anyone come across anything more sophisticated that unison or rsync? I'd been using a freeware tool called SyncBack (http://www.2brightsparks.com/syncback/syncback-hub.html) under Windows to backup and mirror files between a laptop and PC over a simple peer network. I'm looking for something similar or to achieve the same result.

For example, in one instance I only sync new or modified files from the last 90 days and on the PC they are zipped to save space (but they remain unzipped on the laptop).

Thanks, James


All times are GMT -5. The time now is 01:56 PM.