Ubuntu – Ubuntu 16.04 How to install rsync server for other systems to access via ssh using cron

backuprsyncssh

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-keygen
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.

Best Answer

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.