Setup: system "prime" with Ubuntu 16.04 and a second hard drive just for backups.

/dev/sdb1 is mounted at /mnt

I created a subdirectory named /mnt/prime for the first backup, of the prime boot SSD contents.

--> Running the command:

sudo rsync -aAXv / --delete --ignore-errors --exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/media/*","/lost+found"} /mnt/prime

does indeed make a nice mirror copy of the root file system into that directory /mnt/prime

So now, in attempting to set up a rsync server for the rest of the Linux systems (Another Ubuntu and a handful of Raspian Jessie systems), I am following these directions:

How to Use rsync to Backup Your Data on Linux

EXCERPT: it says to enter the following two commands:

yum -y install ssh rsync
sudo apt-get install ssh rsync

First problem is that there is no yum command on this system, so I skipped that step. rsync installed with no problems.

All of my systems have done the passwordless login setup

ssh-copy-id ~/.ssh/id_rsa.pub prime

and I have no problem with passwordless scp copies.

The question is: how to I proceed so this system can become a rsync server for other Linux systems.

  • 1
    Why in the world are you installing yum!? Doesn't sudo apt-get install ssh rsync work? – terdon Jul 25 '17 at 16:44
  • Yes, that works, so I changed the question to reflect that fact. – SDsolar Jul 25 '17 at 16:49
  • No, you are still using yum. Forget yum. Ignore any commands involving yum. Follow the rest of the tutorial now. – terdon Jul 25 '17 at 16:50
  • Roger that, @terdon – SDsolar Aug 13 '17 at 16:51

You're using the wrong tool for the job. In the Debian world (which includes Ubuntu), packages are installed using apt or apt-get. This is the system's package manager. You were trying to use a package manager (yum) from a different family of distributions, the Red Hat family. This is actually mentioned in the site you linked to:

On Red Hat distributions, the command is “yum install rsync” and on Debian it is “sudo apt-get install rsync.”

So, instead of this:

sudo yum -y install ssh rsync

Do this:

sudo apt install ssh rsync

And forget about yum.

| improve this answer | |

If "prime" prompts for a password even after the public key has been installed, then you need to review /etc/ssh/sshd_config and ~/.ssh on "prime".


RSAAuthentication yes
PubkeyAuthentication yes
AuthorizedKeysFile     %h/.ssh/authorized_keys

~/.ssh: (check permissions and naming)

drwx------  2 [user] [group]   1024 Dec  5  2012 .ssh
-rw-------  1 [user] [group]   5622 May 18  2015 .ssh/authorized_keys

Also check /etc/ssh/ssh_config on "solar" to ensure it references the private key you generated.

| improve this answer | |
  • OK. I don't see anything out of the ordinary, and I can ssh and scp back and forth just fine. – SDsolar Jul 25 '17 at 17:41
  • Ahh - so only rsync is asking for the password... it's being run with sudo and you aren't specifying the base login in the rsync command. - might that be it? – Larry R. Irwin Jul 25 '17 at 18:02
  • Yeah, @Larry, I see the right answer at askubuntu.com/questions/939677/… ;-) – SDsolar Jul 26 '17 at 9:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.