The backup nobody ever tried
A shop keeps a backup every night for two years. Then the server disk dies. They try to restore, and the backup files are empty.
A backup is not a backup until you have restored from it. Resilience means the shop opens tomorrow, even after the worst night.
By the end of this lesson
Note
I can plan backups, spares and power protection, and prove a backup works by restoring it.
Key words
| Word | What it means |
|---|---|
| Resilience | the ability to keep working or recover fast after something fails |
| Redundancy | a spare part or spare path that takes over when one fails |
| Backup | a copy of data kept so it can be restored |
| Restore | to copy data back from a backup |
| Fall-back | a plan B that takes over when the main way fails |
| UPS | a battery box that keeps devices running for a short time after a power cut |
| Checksum | a short fingerprint of a file that changes if the file changes |
The cells students fill in are left blank in this preview.
Starter
Have a go
Starter
3 questionsYour answers are marked here and are not kept. A college account keeps every student’s marks.
This is practice
Important
The real Task 4a has its own devices and settings, and you will be told how to show backups and power protection. Here you run real commands in a Linux lab. A real power cut cannot be staged here, so the UPS part is a sum.
The 3-2-1 backup rule
| Number | Rule | Why |
|---|---|---|
| 3 | Keep three copies of important data: the original and two backups | One copy can be lost or damaged |
| 2 | Keep them on two different kinds of storage, such as a disk and a cloud store | One kind of storage can fail in a way another does not |
| 1 | Keep one copy somewhere else | A fire or a flood in the office takes everything in it |
The cells students fill in are left blank in this preview.
Make some data to protect
mkdir -p ~/dss-demo/data ~/dss-demo/backup; echo "till record 1" > ~/dss-demo/data/a.txt; echo "till record 2" > ~/dss-demo/data/b.txtA command for the lesson’s lab terminal. It is shown here and not run.
Take the backup
tar -czf ~/dss-demo/backup/data-mon.tar.gz -C ~/dss-demo dataA command for the lesson’s lab terminal. It is shown here and not run.
Record a fingerprint of each file
sha256sum ~/dss-demo/data/a.txt ~/dss-demo/data/b.txtA command for the lesson’s lab terminal. It is shown here and not run.