Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
12-20-2004, 10:48 AM
|
#1
|
Member
Registered: Dec 2004
Location: Nepal
Posts: 86
Rep:
|
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
|
|
|
12-20-2004, 12:49 PM
|
#2
|
Moderator
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047
Rep:
|
|
|
|
12-21-2004, 10:42 AM
|
#3
|
Member
Registered: Dec 2004
Location: Nepal
Posts: 86
Original Poster
Rep:
|
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?
|
|
|
12-22-2004, 01:57 PM
|
#4
|
Moderator
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047
Rep:
|
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
|
|
|
12-27-2004, 04:05 AM
|
#5
|
Member
Registered: Dec 2004
Location: Nepal
Posts: 86
Original Poster
Rep:
|
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
|
|
|
12-28-2004, 08:39 AM
|
#6
|
Moderator
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047
Rep:
|
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
|
|
|
01-03-2005, 12:43 AM
|
#7
|
LQ Newbie
Registered: Jan 2005
Location: Wollongong, Australia
Distribution: SUSE 9.1
Posts: 10
Rep:
|
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 08:00 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|