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.
Linux is not a distribution. Linux is the kernel of an operating system. Distributions include the Linux kernel and a multitude of supporting software, an installer, a desktop environment, etc. You are apparently using a distribution that does not use apt-get for package management, which is why there is no apt-get on your system. apt-get is used by Debian-based distributions. Redhat and its derivatives use yum, openSUSE uses zypper, etc.
So I ask again, what distribution are you using? You can usually find out by running:
Code:
cat /etc/*release*
If you want to see if rsync is already installed, just try running "rsync".
Last edited by suicidaleggroll; 12-31-2013 at 04:23 PM.
it says I need to set up an rsyncd.conf file under the /etc directory.
It says "You must set up a configuration file on the machine meant to be the server and run the rsync binary in daemon mode. Even your rsync client machines can run rsync in daemon mode for two-way transfers."
So for the computer that will act as my "source" or server of which I will push files from, I need to set up the configuration file.
should I just read the manual for the rsyncd.conf to set up the security options across two different servers?
Be careful where you get advice. From the website you referenced...
Quote:
You must set up one machine or another of a pair to be an "rsync server" by running rsync in a daemon mode ("rsync --daemon" at the commandline) and setting up a short, easy configuration file (/etc/rsyncd.conf). Below I'll detail a sample configuration file. The options are readily understood, few in number -- yet quite powerful.
And that simply is not true, or at least not applicable to common rsync usage.
Read the manual and learn the simple commands.
It might also be helpful to tell us what you want to use rsync for, maybe we can give some simple variations to use.
It depends on what you're trying to do and how you plan to run it. You can run rsync through ssh without any conf files or daemon mode, as long as you have an account and rsync installed on both machines.
I wish to use rsync as a mirroring tool to replace the command I normally use 'scp -r path/to/source/push path/to/destination/serverath/to/directory/of/files/within/server'
I usually have issues using the scp -r because I am too hasty and run scp -r on two different linux terminals and flood the destination server. novice error.
I wish to use rsync as a mirror tool such that when I run the rsync in daemon mode I can transfer over files from serverA to serverB. I also need security options set.
I am looking at the configuration manual... not to sure what is the most important things I need
Just change "scp" to "rsync" and swap out "-r" with "-a". Everything else should work exactly the same.
BTW - if you want to do mirroring, you should be using the "-p" flag in scp to preserve timestamps and modes. You may find it very difficult to hunt down the file you want from the backup when they all have [basically] the same timestamp.
talks about setting up the ssh keys. I need to do this too.
advice? I will click on his links now and read through them
If you already set it up for your scp command, then it'll work on rsync too, and ssh. If you haven't set them up at all, it's pretty easy.
On the source machine:
Code:
ssh-keygen -t dsa
or rsa, there are some subtle differences. Type in a passphrase if you want, or if you want fully password/phrase-less login just keep hitting enter until you're back at a command prompt.
When it's done, you should have a ~/.ssh/id_dsa.pub (or rsa) file, which will have a single very long line
Copy that line and paste it into the ~/.ssh/authorized_keys2 file on the destination machine (create this file if it doesn't already exist). Make sure the permissions on the destination machine are as follows
[acolombo@hpc-login2 ~]$ ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/home/rcf-13/acolombo/.ssh/id_rsa):
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.