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 |
Take a look at this LA:
http://www.linuxquestions.org/questi...ticle&artid=80 |
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? |
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 |
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 |
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 |
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. |