Working with Backups and Compression on a Linux Host

15 minutes
  • 2 Learning Objectives

About this Hands-on Lab

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 using xz compression.
  • Use the tar command to create a backup of /opt/dev using bzip2 compression.
  • List the contents of dev.tbz and capture it in a file called dev_list.txt.
Synchronize Files and Backups to Server02
  • Use rsync to copy dev.tbz, server01.txz, and dev_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.

Additional Resources

You are part of a team of Linux administrators, and have been tasked with creating some backups of important data on a host that you administer. As part of the effort, a server has been created for you and the administrators on your team to store your backups.

To complete this task, you will need to create a series of compressed archives of important directories on the host. For the archive of /opt/dev, you will need to create an inventory file of the contents. Once completed, the archives, the inventory list, and the contents of the /opt/prod directory should be synchronized to the backup server (server02). Finally, you will need to extract the compressed archives.


  • All tasks should be performed as the cloud_user.
  • The cloud_user has been given sudo access to perform the required tasks.

What are Hands-on Labs

Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.

Sign In
Welcome Back!

Psst…this one if you’ve been moved to ACG!

Get Started
Who’s going to be learning?