chapter 11 backups unix system administration. backup. why? because we like you. w why backup at...
TRANSCRIPT
![Page 1: Chapter 11 Backups Unix System Administration. Backup. Why? Because We Like You. w Why backup at all? Restore from data loss Disaster recovery Archival](https://reader036.vdocuments.net/reader036/viewer/2022082710/56649e4a5503460f94b3db97/html5/thumbnails/1.jpg)
Chapter 11Backups
Unix System Administration
![Page 2: Chapter 11 Backups Unix System Administration. Backup. Why? Because We Like You. w Why backup at all? Restore from data loss Disaster recovery Archival](https://reader036.vdocuments.net/reader036/viewer/2022082710/56649e4a5503460f94b3db97/html5/thumbnails/2.jpg)
Backup. Why? Because We Like You. Why backup at all?
• Restore from data loss• Disaster recovery• Archival of old data - possibly for legal reasons
![Page 3: Chapter 11 Backups Unix System Administration. Backup. Why? Because We Like You. w Why backup at all? Restore from data loss Disaster recovery Archival](https://reader036.vdocuments.net/reader036/viewer/2022082710/56649e4a5503460f94b3db97/html5/thumbnails/3.jpg)
In the Media...
Backup devices/media• Tape• Optical (MO)• CDROM (CD-R, CD-RW)• DVD-R, DVD-R+W, DVD-RAM• Removable Disk (Zip, Jaz, floppy?)• Paper?
![Page 4: Chapter 11 Backups Unix System Administration. Backup. Why? Because We Like You. w Why backup at all? Restore from data loss Disaster recovery Archival](https://reader036.vdocuments.net/reader036/viewer/2022082710/56649e4a5503460f94b3db97/html5/thumbnails/4.jpg)
Mr. Nixon’s Preferred Media
There are a variety of tape formats to choose from…• QIC Cartridge 60+MB per tape• 8mm - 2 to 20GB per tape (native)• 4mm - 1.3 to 24GB per tape (native)• DLT - Digital Linear Tape - 20 to 35GB per
tape (native)
![Page 5: Chapter 11 Backups Unix System Administration. Backup. Why? Because We Like You. w Why backup at all? Restore from data loss Disaster recovery Archival](https://reader036.vdocuments.net/reader036/viewer/2022082710/56649e4a5503460f94b3db97/html5/thumbnails/5.jpg)
8mm - Coming to Video Soon Cartridge-based tape derived from the Sony
Handycam type video tape Handycam tapes will work, but data 8mm
tapes are of higher qualityDrive Model Tape Length Capacity
8200 112 2.3Gb
8500 112 5
8505 112 5
8505XL 160 7
8900 (Mammoth) 170 20
![Page 6: Chapter 11 Backups Unix System Administration. Backup. Why? Because We Like You. w Why backup at all? Restore from data loss Disaster recovery Archival](https://reader036.vdocuments.net/reader036/viewer/2022082710/56649e4a5503460f94b3db97/html5/thumbnails/6.jpg)
Sometimes Smaller Is Better
4mm• Based on DAT (Digital Audio Tape) format
Tape Format Tape Length Capacity
DDS-1 60 1.3GB
DDS-DC 90 2
DDS-2 120 4
DDS-3 125 12
![Page 7: Chapter 11 Backups Unix System Administration. Backup. Why? Because We Like You. w Why backup at all? Restore from data loss Disaster recovery Archival](https://reader036.vdocuments.net/reader036/viewer/2022082710/56649e4a5503460f94b3db97/html5/thumbnails/7.jpg)
I’ll Have a DLT on Toast DLT - Digital Linear Tape
• Tape to reel format, that is, the tape is spool to another reel in the drive. It is not cartridge format.
• 100% duty cycle
Tape Format Capacity
DLT 4000 20GB
DLT 7000 35GB
DLT 8000 40GB
![Page 8: Chapter 11 Backups Unix System Administration. Backup. Why? Because We Like You. w Why backup at all? Restore from data loss Disaster recovery Archival](https://reader036.vdocuments.net/reader036/viewer/2022082710/56649e4a5503460f94b3db97/html5/thumbnails/8.jpg)
Give Your Data a Big Hug
Compression• 8mm, 4mm and DLT drive perform hardware
compression• Marketing usually uses 2:1 ratio• Actual is usually 1.8:1• Compression is based on the type of data you
are backing up. Text = most compressible and pre-compressed data = least compressible
![Page 9: Chapter 11 Backups Unix System Administration. Backup. Why? Because We Like You. w Why backup at all? Restore from data loss Disaster recovery Archival](https://reader036.vdocuments.net/reader036/viewer/2022082710/56649e4a5503460f94b3db97/html5/thumbnails/9.jpg)
Do and Doh’s Do
• Test your backup periodically• Store copies of data offsite• Label your backups so you know what’s on them
Doh’s• Store your tapes near magnetic or electromagnetic
sources• The Earth’s background radiation can eventually
erase magnetic tapes
![Page 10: Chapter 11 Backups Unix System Administration. Backup. Why? Because We Like You. w Why backup at all? Restore from data loss Disaster recovery Archival](https://reader036.vdocuments.net/reader036/viewer/2022082710/56649e4a5503460f94b3db97/html5/thumbnails/10.jpg)
Cage Match: Stackers Vs. Autoloaders Vs. Jukeboxes Stacker = autoloader
• Sequential tape access• Feeds next tape into drive when on is ejected
Jukebox• Random access to tapes in library
![Page 11: Chapter 11 Backups Unix System Administration. Backup. Why? Because We Like You. w Why backup at all? Restore from data loss Disaster recovery Archival](https://reader036.vdocuments.net/reader036/viewer/2022082710/56649e4a5503460f94b3db97/html5/thumbnails/11.jpg)
Backup $oftware Commercial
• Veritas Netbackup• Legato Networker• IBM ADSM
Free or OS Provided• tar• cpio• dd• dump/restore
![Page 12: Chapter 11 Backups Unix System Administration. Backup. Why? Because We Like You. w Why backup at all? Restore from data loss Disaster recovery Archival](https://reader036.vdocuments.net/reader036/viewer/2022082710/56649e4a5503460f94b3db97/html5/thumbnails/12.jpg)
![Page 13: Chapter 11 Backups Unix System Administration. Backup. Why? Because We Like You. w Why backup at all? Restore from data loss Disaster recovery Archival](https://reader036.vdocuments.net/reader036/viewer/2022082710/56649e4a5503460f94b3db97/html5/thumbnails/13.jpg)
OS Backup Tools tar - Tape Archiver
• tar cf /dev/rmt/0 filea fileb filec• tar xf /dev/rmt/0• tar tf /dev/rmt/0
cpio - copy in/out• similar to tar, AT&T specific
dd - disk duplicate• dd if=/dev/rmt/0 of=/dev/rmt/1• dd if=boot.img of=/dev/rdiskette
![Page 14: Chapter 11 Backups Unix System Administration. Backup. Why? Because We Like You. w Why backup at all? Restore from data loss Disaster recovery Archival](https://reader036.vdocuments.net/reader036/viewer/2022082710/56649e4a5503460f94b3db97/html5/thumbnails/14.jpg)
Who’d Want To Restore a Dump? Dump and Restore
• ufsdump and ufsrestore in Solaris• Primarily Used to backup partitions/slices• Maintains “levels” of backups for doing
incremental dumps• Restore program has option for interactive shell
like file browsing• Dump/Restore can be used to backup a
partition/slice to another partition/slice
![Page 15: Chapter 11 Backups Unix System Administration. Backup. Why? Because We Like You. w Why backup at all? Restore from data loss Disaster recovery Archival](https://reader036.vdocuments.net/reader036/viewer/2022082710/56649e4a5503460f94b3db97/html5/thumbnails/15.jpg)
Dump Examples
ufsdump 0ubf 126 /dev/rmt/0n /dev/rdsk/c0t0d0s0
ufsdump 5ubf 126 /dev/rmt/0n /dev/rdsk/c0t1d0s7
ufsrestore ifs /dev/rmt/0 2
Slice-to-Slice Dump
newfs -v /dev/rdsk/c0t1d0s6
mount /dev/dsk/c0t1d0s6 /mnt
ufsdump 0f - /dev/rdsk/c0t1d0s7 | (cd /mnt; ufsdump 0f -)
![Page 16: Chapter 11 Backups Unix System Administration. Backup. Why? Because We Like You. w Why backup at all? Restore from data loss Disaster recovery Archival](https://reader036.vdocuments.net/reader036/viewer/2022082710/56649e4a5503460f94b3db97/html5/thumbnails/16.jpg)
Managing Your Tape Worm
mt - Magnetic Tape• mt -f /dev/rmt/0 rewind• mt -f /dev/rmt/0 erase• mt -f /dev/rmt/0 offline• mt -f /dev/rmt/0 status• mt -f /dev/rmt/0 fsf
![Page 17: Chapter 11 Backups Unix System Administration. Backup. Why? Because We Like You. w Why backup at all? Restore from data loss Disaster recovery Archival](https://reader036.vdocuments.net/reader036/viewer/2022082710/56649e4a5503460f94b3db97/html5/thumbnails/17.jpg)
Good Ol’ AT&T Vs. BSD Again
/dev/rmt/0 - AT&T device name• Tape head is left positioned BEFORE filemark• You must explicitly move it past the filemark
or subsequent reads will return 0, -1 or EOF
/dev/rmt/0b - BSD device name• Tape head left positioned AFTER filemark• Data is read/written from that point
![Page 18: Chapter 11 Backups Unix System Administration. Backup. Why? Because We Like You. w Why backup at all? Restore from data loss Disaster recovery Archival](https://reader036.vdocuments.net/reader036/viewer/2022082710/56649e4a5503460f94b3db97/html5/thumbnails/18.jpg)
Q Du Jour
What could happen if you mix AT&T and BSD tape device names when putting multiple backups on a tape?
What’s a “holey” file?
![Page 19: Chapter 11 Backups Unix System Administration. Backup. Why? Because We Like You. w Why backup at all? Restore from data loss Disaster recovery Archival](https://reader036.vdocuments.net/reader036/viewer/2022082710/56649e4a5503460f94b3db97/html5/thumbnails/19.jpg)
Holey Files Batman! When a file says it is using more disk space
than it actually is. Output of du doesn’t equal what “ls -l” says. Seeking way past the eof and writing data; no
data exists between the old eof the new data. Tar and cpio can be fooled into backup this
empty space, dump/ufsdump can handle this oddity.