linux backup system using rsync, tar, gzip
DESCRIPTION
Presentation from my first project in the unclass at BYU. Link to writeup -- https://island.byu.edu/wiki/final-report-linux-backup-system-using-rsync-and-tar-and-amazon-s3TRANSCRIPT
![Page 1: Linux Backup System using rsync, tar, gzip](https://reader033.vdocuments.net/reader033/viewer/2022061604/555501deb4c905c35e8b4acd/html5/thumbnails/1.jpg)
Linux backup system
Backup files from Linux laptop to Linux server All automated (ie I don't think about it) Use simple standard Linux command-line tools
![Page 2: Linux Backup System using rsync, tar, gzip](https://reader033.vdocuments.net/reader033/viewer/2022061604/555501deb4c905c35e8b4acd/html5/thumbnails/2.jpg)
Motivation
![Page 3: Linux Backup System using rsync, tar, gzip](https://reader033.vdocuments.net/reader033/viewer/2022061604/555501deb4c905c35e8b4acd/html5/thumbnails/3.jpg)
My situation
Laptop that goes everywhere – my primary workstation
Server, sits in my apartment. Doesn't do much other then hold files + serve as test bed for the occassional wacky experiment
Wireless network
![Page 4: Linux Backup System using rsync, tar, gzip](https://reader033.vdocuments.net/reader033/viewer/2022061604/555501deb4c905c35e8b4acd/html5/thumbnails/4.jpg)
What I did
Cron job on laptop which runs rsync script to mirror changes nightly at 10:10pm
Monthly which takes a snapshot of subset of files and pushes these to Amazon S3
[Still in the future] Nightly rsync from server to Amazon S3
![Page 5: Linux Backup System using rsync, tar, gzip](https://reader033.vdocuments.net/reader033/viewer/2022061604/555501deb4c905c35e8b4acd/html5/thumbnails/5.jpg)
S3FOX
![Page 6: Linux Backup System using rsync, tar, gzip](https://reader033.vdocuments.net/reader033/viewer/2022061604/555501deb4c905c35e8b4acd/html5/thumbnails/6.jpg)
Rsync
Is awesome! ”is an open source utility that provides fast
incremental file transfer” - samba.anu.edu.au/rsync/ Used for mirroring + backup purpose
![Page 7: Linux Backup System using rsync, tar, gzip](https://reader033.vdocuments.net/reader033/viewer/2022061604/555501deb4c905c35e8b4acd/html5/thumbnails/7.jpg)
Cron
”Program that enables unix users to execute commands or scripts automatically at a specified time/date.” - Wikipedia
Used extensively by all *nix systems and aspiring amateur Linux sysadmins
![Page 8: Linux Backup System using rsync, tar, gzip](https://reader033.vdocuments.net/reader033/viewer/2022061604/555501deb4c905c35e8b4acd/html5/thumbnails/8.jpg)
Tar + gzip
Tar turns many files into one file – no built-in compression
Commonly used with gzip or bzip2 (making, respectively *.tar.gz and *.tar.bz2 files
![Page 9: Linux Backup System using rsync, tar, gzip](https://reader033.vdocuments.net/reader033/viewer/2022061604/555501deb4c905c35e8b4acd/html5/thumbnails/9.jpg)
Unix Philosophy
Do one thing and do it well Rsync, tar, gzip, cron all do one task well
![Page 10: Linux Backup System using rsync, tar, gzip](https://reader033.vdocuments.net/reader033/viewer/2022061604/555501deb4c905c35e8b4acd/html5/thumbnails/10.jpg)
Small pieces loosly joined
Tools reusable Designed to interoperate Can be used together in scripts in 1000s of different
ways
![Page 11: Linux Backup System using rsync, tar, gzip](https://reader033.vdocuments.net/reader033/viewer/2022061604/555501deb4c905c35e8b4acd/html5/thumbnails/11.jpg)
Easier to learn
Use these different tools all the time Rsync to mirror changes from laptop to production
(or devel) server Tar to uncompress files from internet Makes it easier to start a new scripting project
![Page 12: Linux Backup System using rsync, tar, gzip](https://reader033.vdocuments.net/reader033/viewer/2022061604/555501deb4c905c35e8b4acd/html5/thumbnails/12.jpg)
K.I.S.S
Keep It Simple Stupid Simple tools make for simple systems that are easy
to build, understand, and maintain
![Page 13: Linux Backup System using rsync, tar, gzip](https://reader033.vdocuments.net/reader033/viewer/2022061604/555501deb4c905c35e8b4acd/html5/thumbnails/13.jpg)
Odes to Simplicity
”Everything should be made as simple as possible, but no simpler.” – Albert Einstein
"Simplicity is the ultimate sophistication" – Leonardo Da Vinci
"It seems that perfection is reached not when there is nothing left to add, but when there is nothing left to take away" – Antoine de Saint Exupéry
![Page 14: Linux Backup System using rsync, tar, gzip](https://reader033.vdocuments.net/reader033/viewer/2022061604/555501deb4c905c35e8b4acd/html5/thumbnails/14.jpg)
Backups = peace of mind
![Page 15: Linux Backup System using rsync, tar, gzip](https://reader033.vdocuments.net/reader033/viewer/2022061604/555501deb4c905c35e8b4acd/html5/thumbnails/15.jpg)