- So let's use the Ubuntu machine as server 1.
systemctl status
of sshd showing that SSH is running.
And we already know the IP address is 169.
That's good enough.
So, to server 2, where I am going to use
sudo tar
czvf
/tmp/backup.tgz
And what we need to put in there,
that will be /etc and /home.
So now we created this tarball.
ls -l on /tmp/backup.tgz is showing it.
And can we synchronize it?
Well, let's use
rsync -azP
on /tmp/backup.tgz
student@192.168.29.169
:/tmp/
(keyboard softly clacking)
And as you can see, it's sending the incremental file list.
So we need to check if it really arrived at the other site.
Let's go to the other site.
ls -l on /tmp/backup.tgz
There we go.
This all worked out correctly.
One little thing.
I created the backup on the other server
with root permissions.
So the ownership right here
is really a root ownership,
as you can see.
Then I used the rsync command student @ the remote host.
Well, as I'm SSHing into the remote host as student,
the file will be created with student permissions.
And that's because student is not root.
That's all.