Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
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.
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.
ok, I want to set up some mirroring, so I figured I can use rsync and learn something along the way. So I think it is running because it is in the xinetd.d directory and the disabled option is set to no. I can't figure out how to test it unless I knew a share name on it. So I was looking for the .conf file and can't find it. I did a 'find / -name rsync' and only got the binary file and the one in the xinetd.d dir. The config file is supposed to be at /etc/rsyncd.conf but there's nothing there. do I just create it?
If you just want to sync one slave box to a master box, you don't need to run rsync in daemon mode and you don't need an rsync.conf file. You can put the rsync commands in a script (running on the slave box) and rsync will rsh or SSH into the master box and mirror the data.
If you have SSH installed on both machines, it's pretty easy to set it up so rsync won't prompt for a password when the script is executed (look in the SSH man page for "authorized_keys" for an explanation, if you need it.)
so do I just setup another share in samba that points the direcorty I'm mirroring? then would the name I use to call it something like rsync machine:sharename /usr/bak (or whatever, I know there's some command options I should set as well, but the basic idea)
no, they both are running Mandrake 9.0. I thought samba is used to share files between linux computers as well as windows.
Perhaps it would be a better question to ask is how exactly do I set this up? the backup computer is going to pull the data from the main computer. I just assumed you have to make shares in order for rsync to know where to get the files.
Last edited by vrillusions; 02-22-2003 at 01:13 PM.
Yes, Samba can be used to share files between two Linux boxes, but normally it's purpose is to allow Windows boxes to access resources on a Linux box. The more common way to share files between two Linux (or Unix) boxes is with NFS.
Take a look at this link to see how to setup rsync+ssh. Also, the man page for rsync has examples spread throughout and it lists some important things to pay attention to (slash or no slash at the end of the directory, --delete, etc.)
Another program, lftp, exists that can perform a similar mirroring function as rsync, but it uses FTP instead. I think rsync is more robust and smarter when it comes to how it transfers the data, but lftp is a very good scriptable ftp program that could be another alternative for you.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.