1
Backing up, Compression, and Scheduling
School of Business, Liberty University
CSIS 352_D02: System Administration
Joe Breeden
August 15, 2025
Abstract
This report details my practical exploration of essential data management and system
administration techniques within a Linux environment. Through hands-on experimentation, I
investigated file compression, comparing the efficiency and speed of various algorithms
including zip, gzip, bzip2, xz, and 7zip. The lab extended to task scheduling, where I
implemented automated processes using both the traditional cron utility and the more modern
systemd timers, evaluating the benefits and complexities of each. Furthermore, I delved into
data backup strategies, employing rsync for efficient incremental backups, rdiff-backup for
creating and managing versioned backups, and rsnapshot for rapid restoration via snapshotting.
The core of this report lies in outlining the specific steps undertaken in each exercise, critically
analyzing the trade-offs between different tools and methodologies, and ultimately providing
2
informed insights into selecting the most appropriate techniques tailored to diverse operational
scenarios and data protection requirements. This includes considerations for compression
ratios, scheduling precision, restoration speed, and storage efficiency.
Good data management is super important, whether you're a system admin or just a
regular user. It's about storing data without wasting space (compression), automating stuff you
do all the time (scheduling), and making sure you don't lose your data if something goes wrong
(backups). This report is about a lab where I got to play around with these ideas on Linux. I
looked at different ways to compress, schedule, and backup, figuring out what each one is good
for.
2. Methodology
The lab was split into three parts: Compression, Scheduling, and Backups. Here's what I did in
each section.
2.1 Compression
First, I went to the ~/books directory, which had some sample text files. The first thing I
did was compress alice_in_wonderland.txt using the zip command. I ran zip alice.zip
alice_in_wonderland.txt and checked how much smaller the file got. To make sure the file was
still good, I unzipped it with unzip alice.zip, but I renamed it to alice2.txt so I wouldn't overwrite
the original. Then, I used the diff command (diff alice2.txt alice_in_wonderland.txt) to make
sure it was the same. Next, I tried password-protecting a zip file. I used zip -e books.zip \*.txt to
zip up all the .txt files with encryption. I checked the contents with unzip -l books.zip and saw
that the filenames were still visible, even though the contents were encrypted. I unzipped
everything to a new directory that I made with mkdir extracted_books and unzip books.zip -d
extracted_books.
3
Then, I messed around with compressing single files, starting with gzip. I used gzip
dracula.txt to compress the file, which replaced the original with dracula.txt.gz. I uncompressed
it with gunzip dracula.txt.gz. I did the same thing with bzip2 and sherlock_holmes.txt, using
bzip2 sherlock_holmes.txt and bunzip2 sherlock_holmes.txt.bz2. I also tried xz with
frankenstein.txt, using xz frankenstein.txt and unxz frankenstein.txt.xz.
Finally, I used 7zip, which is different because it makes a new archive instead of replacing
the original. I ran 7z a tale.7z tale_of_two_cities.txt to compress tale_of_two_cities.txt and then
extracted it with 7z x tale.7z. To see which compression method was faster, I used the time
command with zip and 7zip to compress all the .txt files. I ran time zip books.zip \*.txt and time
7z a book.7z \*.txt and compared the times and file sizes. I also used tar to make an
uncompressed archive with tar -cvf books.tar \*.txt and a compressed archive with gzip using
tar -czvf books.tgz \*.txt. I extracted the compressed archive with tar -xvzf books.tgz.
2.2 Scheduling
In the scheduling part, I used cron and systemd timers. First, I edited the crontab with
crontab -e. I added the line * * * * * id >> /home/student/crontab.log to run the id command
every minute and save the output to crontab.log. I checked the log file to make sure it worked. I
tried different scheduling options by changing the line in the crontab to use ranges, lists, and
step values. When I was done, I removed the crontab with crontab -r and made sure it was gone
with crontab -l.
Next, I tried systemd timers. I created two files:
/home/student/.config/systemd/user/id.timer and
/home/student/.config/systemd/user/id.service, with the contents from the lab instructions. I
reloaded systemd with systemctl --user daemonreload, and then enabled and started the timer
with systemctl --user enable id.timer and systemctl --user start id.timer. I checked
/home/student/systemd.id.log to see if it was working.
4
2.3 Backups
In the backups section, I used rsync, rdiff-backup, and rsnapshot. I started with rsync to
back up /home/student/ to a remote machine (10.10.0.51) using rsync -avz /home/student/
studen[email protected]:~/backups. Then I changed a file (books/frankenstein.txt) and ran rsync
again to see how it did an incremental backup.
Next, I used rdiff-backup. I made an initial backup of /home/student to /opt/backup with
rdiff-backup /home/student /opt/backup. I changed books/frankenstein.txt again and made
more backups. Then, I messed up the file and restored the latest version by copying it from the
backup directory. To try restoring older versions, I listed the available increments with rdiff-
backup -list-increments /opt/backup/books/frankenstein.txt. I restored a specific version by
specifying the increment file and by using the -r option with a time. Finally, I cleared out the
/opt/backup directory.
Last, I explored rsnapshot. I edited /etc/rsnapshot.conf using sudo gedit
/etc/rsnapshot.conf. I set snapshot_root to /opt/backup/, configured the retain settings for
minute, hourly, daily, and weekly snapshots, and set the backup directive to backup
/home/student/. I ran rsnapshot with sudo rsnapshot minute and checked out the directory
structure in /opt/backup. I changed books/frankenstein.txt again and ran rsnapshot again, then
compared the contents of the new and old snapshots.
3. Results and Discussion
•Compression: I found that 7zip gave the best compression, but it was slow. zip and
gzip were faster, but the files weren't as small.
•Scheduling: The scheduling part of the lab showed me two ways to schedule tasks.
cron is simple, but systemd timers let you do more advanced stuff, even though they
take more setup.
5
•Backups: Rsync is a good way to quickly backup a directory. rdiffbackup and
rsnapshot let you go back to older versions of files, but rdiff-backup can be slower
when restoring older files because it uses reverse diffs.
4. Conclusion
This lab was a great way to get hands-on with data management and automation on
Linux. I learned a lot about the tradeoffs between different ways to compress, schedule, and
backup. Picking the right tool really depends on what you need: how small the files need to be,
how fast you need to run, how easy it needs to be to use, and how important it is to keep old
versions of your data. The stuff I learned in this lab will help me manage data and systems better
in the future.
Powered by TCPDF (www.tcpdf.org)