Question: Exercise 1 : Create Backup Files with tar: Part 1 : Create a Full Backup Step 1 : Open a terminal window and su to

Exercise 1: Create Backup Files with tar:
Part 1: Create a Full Backup
Step 1: Open a terminal window and su to root
Step 2: Change to the directory/srv/www
Step 3: Create a tar archive of the directory htdocs by entering the following: tar czf/tmp/htdocs.tar.gz htdocs
Step 4: Delete the directory htdocs by entering the following: mm -r htdocs
Step 5: Copy the backup archive to the directory/srv/www cptmphtdocs.tar.gzsrvwww
Step 6: Restore the directory htdocs by entering the following: tar xzf htdocs.tar.gz
Step 7: View the content of the restored directory by entering Is htdocs
Take screen shot #1 the screenshot of the of the terminal shows all steps from 1 to 7. Make sure to include the name of your host in your screenshot. Multiple screenshots maybe required.
Part 2: Create an Incremental Backup:
Step 1: . From the root terminal window, change to the directory/srv/www by entering the following: cd/srv/www.
Step 2: Create a full backup by entering the following command:
tar czv -g / tmp/snapshot_file -f/tmp/htdocs_full.tar.gz htdocs
Step 3: Create a new file in the directory htdocs by entering the following: touch htdocs/incremental.html
Step 4: Perform an incremental backup by entering the following command:
tar czv - g/tmp/snapshot_file -f/tmp/htdocs_incremental.tar.gz htdocs Note that tar backs up the file incrementally.
Step 5: View the content of the incremented backup file by entering the following:
tar-tzf/tmp/htdocs_incremental.tar.gz
Step 6: Remove the directory htdocs by entering the following:
rm-r htdocs
Step 7: Start restoring the directory by unpacking the backup by entering the following:
tar xzf/tmp/htdocs_full.tar.gz
Step 8: Unpack the incremental backup by entering the following command:
tar xzftmphtdocs incremental.tar.gz
Take screen shot #2, the screenshot of the terminal shows all steps from 1 to 8. Make sure to include the name of your host in your screenshot. Multiple screenshots maybe required.
Note: Only include the commands that was successfully executed and try to highlight it for better clarity.
Exercise 1 : Create Backup Files with tar: Part 1

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!