1 00:00:07,020 --> 00:00:10,113 - So let's use the Ubuntu machine as server 1. 2 00:00:11,884 --> 00:00:13,780 systemctl status 3 00:00:15,210 --> 00:00:18,690 of sshd showing that SSH is running. 4 00:00:18,690 --> 00:00:21,750 And we already know the IP address is 169. 5 00:00:21,750 --> 00:00:22,700 That's good enough. 6 00:00:26,670 --> 00:00:30,960 So, to server 2, where I am going to use 7 00:00:30,960 --> 00:00:32,410 sudo tar 8 00:00:35,131 --> 00:00:38,300 czvf 9 00:00:38,300 --> 00:00:42,670 /tmp/backup.tgz 10 00:00:46,140 --> 00:00:48,330 And what we need to put in there, 11 00:00:48,330 --> 00:00:50,833 that will be /etc and /home. 12 00:00:58,170 --> 00:01:01,410 So now we created this tarball. 13 00:01:01,410 --> 00:01:06,410 ls -l on /tmp/backup.tgz is showing it. 14 00:01:06,930 --> 00:01:09,360 And can we synchronize it? 15 00:01:09,360 --> 00:01:11,070 Well, let's use 16 00:01:11,070 --> 00:01:12,397 rsync -azP 17 00:01:15,220 --> 00:01:19,180 on /tmp/backup.tgz 18 00:01:22,187 --> 00:01:24,020 student@192.168.29.169 19 00:01:28,736 --> 00:01:30,650 :/tmp/ 20 00:01:33,569 --> 00:01:37,350 (keyboard softly clacking) 21 00:01:37,350 --> 00:01:40,500 And as you can see, it's sending the incremental file list. 22 00:01:40,500 --> 00:01:43,440 So we need to check if it really arrived at the other site. 23 00:01:43,440 --> 00:01:44,823 Let's go to the other site. 24 00:01:46,080 --> 00:01:50,280 ls -l on /tmp/backup.tgz 25 00:01:50,280 --> 00:01:51,113 There we go. 26 00:01:51,113 --> 00:01:53,070 This all worked out correctly. 27 00:01:53,070 --> 00:01:54,360 One little thing. 28 00:01:54,360 --> 00:01:57,060 I created the backup on the other server 29 00:01:57,060 --> 00:01:58,590 with root permissions. 30 00:01:58,590 --> 00:02:01,470 So the ownership right here 31 00:02:01,470 --> 00:02:04,473 is really a root ownership, 32 00:02:07,260 --> 00:02:08,460 as you can see. 33 00:02:08,460 --> 00:02:12,660 Then I used the rsync command student @ the remote host. 34 00:02:12,660 --> 00:02:16,350 Well, as I'm SSHing into the remote host as student, 35 00:02:16,350 --> 00:02:19,290 the file will be created with student permissions. 36 00:02:19,290 --> 00:02:21,300 And that's because student is not root. 37 00:02:21,300 --> 00:02:22,133 That's all.