When administering a server, it is important to keep backups of important data. In this hands-on lab, you will learn how to use the `tar` command to create compressed archives of files and directories, which will be copied to a backup server using the `rsync` utility.
Learning Objectives
Successfully complete this lab by achieving the following learning objectives:
- Create Backups of Files and Directories on Server01
- Use the
tar
command to create a backup of/etc and /var/log
usingxz
compression. - Use the
tar
command to create a backup of/opt/dev
usingbzip2
compression. - List the contents of
dev.tbz
and capture it in a file calleddev_list.txt
.
- Use the
- Synchronize Files and Backups to Server02
- Use
rsync
to copydev.tbz
,server01.txz
, anddev_list.txt
on server01 to/home/cloud_user
on server02 (use the private IP address provided). - Use
rsync
to synchronize the files in/opt/prod
on server01 with/home/cloud_user/prod
on server02 (use the private IP address provided). - Validate that files were successfully copied to server02.
- Extract
dev.tbz
to/home/cloud_user/dev
on server02.
- Use