1 itec 400 backups george vaughan franklin university
TRANSCRIPT
![Page 1: 1 itec 400 Backups George Vaughan Franklin University](https://reader036.vdocuments.us/reader036/viewer/2022081511/5697c00b1a28abf838cc873f/html5/thumbnails/1.jpg)
1
itec 400Backups
George Vaughan
Franklin University
![Page 2: 1 itec 400 Backups George Vaughan Franklin University](https://reader036.vdocuments.us/reader036/viewer/2022081511/5697c00b1a28abf838cc873f/html5/thumbnails/2.jpg)
2
Topics
• Determining Backup Needs
• Backup Strategies
• Data Verification
• Storage
• Backup Media
![Page 3: 1 itec 400 Backups George Vaughan Franklin University](https://reader036.vdocuments.us/reader036/viewer/2022081511/5697c00b1a28abf838cc873f/html5/thumbnails/3.jpg)
3
Determining Backup Needs
• Your Valuables (Data)– research data– billing, tax records– customer data
• Your Insurance (Backups/Archives)– cost (money, interference with operations)– quality of insurance policy (backup process)– speed of recovery– type of disasters covered
![Page 4: 1 itec 400 Backups George Vaughan Franklin University](https://reader036.vdocuments.us/reader036/viewer/2022081511/5697c00b1a28abf838cc873f/html5/thumbnails/4.jpg)
4
Determining Backup Needs
• Can you tolerate the loss of everything?
• Can you tolerate the loss of some filesystems or files? which ones?
• How often is this critical data changing?
• How long can you wait before it is restored?
![Page 5: 1 itec 400 Backups George Vaughan Franklin University](https://reader036.vdocuments.us/reader036/viewer/2022081511/5697c00b1a28abf838cc873f/html5/thumbnails/5.jpg)
5
Determining Backup Needs
• How old can the restored version be (hours, days, weeks)?
• How much can you afford to spend on a backup strategy?
• Does your system need to be available 24x7?
![Page 6: 1 itec 400 Backups George Vaughan Franklin University](https://reader036.vdocuments.us/reader036/viewer/2022081511/5697c00b1a28abf838cc873f/html5/thumbnails/6.jpg)
6
Backup Strategies
• Different Strategies may be applied to different filesystems.
• 2 Types of backups– Full Backup– Incremental Backup
![Page 7: 1 itec 400 Backups George Vaughan Franklin University](https://reader036.vdocuments.us/reader036/viewer/2022081511/5697c00b1a28abf838cc873f/html5/thumbnails/7.jpg)
7
Backup Strategies
• Full Backup– Backup everything– Can take a long time– Can consume a lot of backup media– Simplest to restore from
![Page 8: 1 itec 400 Backups George Vaughan Franklin University](https://reader036.vdocuments.us/reader036/viewer/2022081511/5697c00b1a28abf838cc873f/html5/thumbnails/8.jpg)
8
Backup Strategies
• Incremental: – only backup files that changed since some
point in time.– Faster Backups– Less consumption of backup media– More complicated restore process– Still need to do full backup every once in a
while
![Page 9: 1 itec 400 Backups George Vaughan Franklin University](https://reader036.vdocuments.us/reader036/viewer/2022081511/5697c00b1a28abf838cc873f/html5/thumbnails/9.jpg)
9
Multi-level backup
• A popular strategy: multi-level backup– Level 0: Full Backup.– Level 1: Incremental backup since last level 0
backup.– Level 2: Incremental backup since last level 1
backup.
![Page 10: 1 itec 400 Backups George Vaughan Franklin University](https://reader036.vdocuments.us/reader036/viewer/2022081511/5697c00b1a28abf838cc873f/html5/thumbnails/10.jpg)
10
Multi-level backup
Sun Mon Tue Wed Thur Fri Sat
1
0
2
13
24
25
26
27
8 9
110
211
212
213
214
15 16
117
218
219
220
221
22 23
124
225
226
227
228
• Level 0: First Sunday of Month• Level 1: Every Monday• Level 2: Every Tuesday through Friday• If I accidentally deleted my directory on the 25th, which backups do I need?
![Page 11: 1 itec 400 Backups George Vaughan Franklin University](https://reader036.vdocuments.us/reader036/viewer/2022081511/5697c00b1a28abf838cc873f/html5/thumbnails/11.jpg)
11
Data Verification
• You never know how good your backups are until you need to restore.
• You can’t wait till disaster hits only to find that your tape units were never working.
• Need to periodically check/verify backups– against original files– on alternative machines– for backup media degradation
![Page 12: 1 itec 400 Backups George Vaughan Franklin University](https://reader036.vdocuments.us/reader036/viewer/2022081511/5697c00b1a28abf838cc873f/html5/thumbnails/12.jpg)
12
Storage
• Where should you store your backups?
• Maybe store level 1 and level 2 in an alternate location?
• What about archived data?
![Page 13: 1 itec 400 Backups George Vaughan Franklin University](https://reader036.vdocuments.us/reader036/viewer/2022081511/5697c00b1a28abf838cc873f/html5/thumbnails/13.jpg)
13
Organization of Backups
• Labels– Color Coded– Printed
• Dedicated Shelf Location– By Day of Week?– By Week of Month?
• 3rd Party Software– Stored separately?
![Page 14: 1 itec 400 Backups George Vaughan Franklin University](https://reader036.vdocuments.us/reader036/viewer/2022081511/5697c00b1a28abf838cc873f/html5/thumbnails/14.jpg)
14
Backup MediaType Capacity (GB) Media Price
($)($)/GB Drive Price
($)
Mammoth Tape 60.00 45.00 0.75 3700
8mm Tape 7.00 6.00 0.86 1200
AIT Tape 100.00 105.00 1.05 3900
Hard Disk 100.00 120.00 1.20 120
CD-R 0.70 0.85 1.21 150
CD-RW 0.64 1.00 1.56 150
DVD-R 4.70 8.00 1.70 400
DVD-RW 4.70 8.00 1.70 400
Zip Disk 0.25 12.00 48.00 140
Zip Disk 0.10 5.00 50.00 70
Jazz Disk 2.00 100.00 50.00 340
Jazz Disk 1.00 80.00 80.00 300
Floppy 0.00 0.25 178.57 10
![Page 15: 1 itec 400 Backups George Vaughan Franklin University](https://reader036.vdocuments.us/reader036/viewer/2022081511/5697c00b1a28abf838cc873f/html5/thumbnails/15.jpg)
15
Backup Tools
• Tools/Commands to facilitate backups:– tar– cpio– dump/restore– amanda
![Page 16: 1 itec 400 Backups George Vaughan Franklin University](https://reader036.vdocuments.us/reader036/viewer/2022081511/5697c00b1a28abf838cc873f/html5/thumbnails/16.jpg)
16
tar
• tar - tape archive utility– a tar file is a file that contains other files and
directories, plus information about them, such as their file name, owner, timestamps, and access permissions.
– The archive can be another file on the disk, a magnetic tape, or a pipe. used to store and extract files from ‘tarfile’
– commonly used to for creating a tarfile on disk
![Page 17: 1 itec 400 Backups George Vaughan Franklin University](https://reader036.vdocuments.us/reader036/viewer/2022081511/5697c00b1a28abf838cc873f/html5/thumbnails/17.jpg)
17
Example: Creating a tar File
• Solaris example: create a compressed tarfile containing the directory ‘myDir’:– First, create the tar file from the directory
“myDir”:tar cf myDir.tar myDir
-Next, compress the tar file, for easier distribution and/or storagegzip myDir.tar
-Finally we end up with a compressed tar file named, “myDir.tar.gz”
![Page 18: 1 itec 400 Backups George Vaughan Franklin University](https://reader036.vdocuments.us/reader036/viewer/2022081511/5697c00b1a28abf838cc873f/html5/thumbnails/18.jpg)
18
Example: Unpacking a tar File
• Solaris example: create a directory from a compressed tarfile named ‘myDir.tar.gz’:– First, uncompress the the tar file:
gunzip myDir.tar.gz
-Next, untar the file. This will result in a directory named myDirtar xf myDir.tar
![Page 19: 1 itec 400 Backups George Vaughan Franklin University](https://reader036.vdocuments.us/reader036/viewer/2022081511/5697c00b1a28abf838cc873f/html5/thumbnails/19.jpg)
19
cpio
• cpio - copy in and out of archive– copies files into or out of a cpio or tar archive– cpio has three operating modes:
• copy-out - copies files out to archive• copy-in - copies files in from archive• copy-pass - copies files from one directory tree to
another without creating intermediate archive
![Page 20: 1 itec 400 Backups George Vaughan Franklin University](https://reader036.vdocuments.us/reader036/viewer/2022081511/5697c00b1a28abf838cc873f/html5/thumbnails/20.jpg)
20
Example: Creating a cpio File
• Solaris example: create a compressed cpio file containing the directory ‘myDir’:– First, create the cpio file from the directory
“myDir”:find myDir | cpio -o > myDir.cpio
-Next, compress the cpio file, for easier distribution and/or storagegzip myDir.cpio
-Finally we end up with a compressed cpio file named, “myDir.cpio.gz”
![Page 21: 1 itec 400 Backups George Vaughan Franklin University](https://reader036.vdocuments.us/reader036/viewer/2022081511/5697c00b1a28abf838cc873f/html5/thumbnails/21.jpg)
21
Example: Unpacking a cpio File
• Solaris example: create a directory from a compressed cpio file named ‘myDir.cpio.gz’:– First, uncompress the cpio file:
gunzip myDir.cpio.gz
-Next, unpack the cpio file. This will result in a directory named myDircpio -imd ‘myDir’ < myDir.cpio
![Page 22: 1 itec 400 Backups George Vaughan Franklin University](https://reader036.vdocuments.us/reader036/viewer/2022081511/5697c00b1a28abf838cc873f/html5/thumbnails/22.jpg)
22
dump/restore
• The dump and restore commands are used collectively
• More sophisticated than tar, cpio
• Supports multi-level backups
• Records backup history in /etc/dumpdates
• restore supports interactive mode
![Page 23: 1 itec 400 Backups George Vaughan Franklin University](https://reader036.vdocuments.us/reader036/viewer/2022081511/5697c00b1a28abf838cc873f/html5/thumbnails/23.jpg)
23
Example of dump/restore
0009: dump -0 -u -f /backup/home_0 /home
0010: DUMP: Date of this level 0 dump: Mon Mar 10 23:08:54 2003
0011: DUMP: Dumping /dev/hdb2 (/home) to /backup/home_0
0025: DUMP: finished in 39 seconds, throughput 6498 kBytes/sec
0026: DUMP: Date of this level 0 dump: Mon Mar 10 23:08:54 2003
0027: DUMP: Date this dump completed: Mon Mar 10 23:10:48 2003
0028: DUMP: Average transfer rate: 2283 kB/s
0029: DUMP: DUMP IS DONE
• Line 9: perform level 0 (full) backup of /home filesystem and store in file /backup/home_0
• Lines 10-29: output of dump
![Page 24: 1 itec 400 Backups George Vaughan Franklin University](https://reader036.vdocuments.us/reader036/viewer/2022081511/5697c00b1a28abf838cc873f/html5/thumbnails/24.jpg)
24
Example of dump/restore0031: # cat /etc/dumpdates0032: /dev/hdb2 0 Mon Mar 10 23:08:54
2003
0034: # dump -1 -u -f /backup/home_1 /home
0035: DUMP: Date of this level 1 dump: Mon Mar 10 23:14:32 2003
0060: rm -rf dummy
• Lines 31-32: Look at contents of dumpdates
• Lines 34-35: Perform level 1 (incremental) backup
• Line 60: The act of much regret…
![Page 25: 1 itec 400 Backups George Vaughan Franklin University](https://reader036.vdocuments.us/reader036/viewer/2022081511/5697c00b1a28abf838cc873f/html5/thumbnails/25.jpg)
25
Example of dump/restore0062: # cd /home0063: 0064: # restore -i -f /backup/home_00065: restore > ls0066: .:0067: dummy/ dummy1/
gvaughan/ johnsonm/lost+found/
0068: 0069: restore > add dummy0070: restore > extract0071: You have not read any tapes yet.0072: Unless you know which volume your
file(s) are on you should start0073: with the last volume and work
towards the first.0074: Specify next volume #: 10075: set owner/mode for '.'? [yn] n0076: restore > quit
• Line 62: cd to filesystem
• Line 64: restore for level 0 backup
![Page 26: 1 itec 400 Backups George Vaughan Franklin University](https://reader036.vdocuments.us/reader036/viewer/2022081511/5697c00b1a28abf838cc873f/html5/thumbnails/26.jpg)
26
Example of backup/restore
0082: # restore -i -f /backup/home_1
0102: # cat /etc/dumpdates
0103: /dev/hdb2 0 Mon Mar 10 23:08:54 2003
0104: /dev/hdb2 1 Mon Mar 10 23:14:32 2003
• Line 82: Complete restore from level_1 backup.
• Lines 102-104: Look at contents of /etc/dumpdates
![Page 27: 1 itec 400 Backups George Vaughan Franklin University](https://reader036.vdocuments.us/reader036/viewer/2022081511/5697c00b1a28abf838cc873f/html5/thumbnails/27.jpg)
27
Amanda
• amanda - Advanced Maryland Automatic Network Disk Archiver
• Developed at University of Maryland
• Client/Server model
• Multiple clients can be backed up onto a single backup server.
• Uses a combination of full and incremental backups.