Backup & Restore Objectives –to understand Unix backup strategies Contents –why have backups –backup terminology –backup media –backup utilities –issues.

Slides:



Advertisements
Similar presentations
Chapter 4 Storing Information in a Computer Peter Nortons Introduction to Computers.
Advertisements

Backing up data On LINUX and UNIX. Logical backup Why? Job security For user data. Remember endian order, character set issues. Full backup + incremental.
11 BACKING UP AND RESTORING DATA Chapter 4. Chapter 4: BACKING UP AND RESTORING DATA2 CHAPTER OVERVIEW Describe the various types of hardware used to.
2000 Copyrights, Danielle S. Lahmani UNIX Tools G , Fall 2000 Danielle S. Lahmani Lecture 12.
CIS 240 Introduction to UNIX Instructor: Sue Sampson.
70-290: MCSE Guide to Managing a Microsoft Windows Server 2003 Environment Chapter 12: Managing and Implementing Backups and Disaster Recovery.
Chapter 12 File Management Systems
Guide To UNIX Using Linux Third Edition
Hands-On Microsoft Windows Server 2003 Administration Chapter 6 Managing Printers, Publishing, Auditing, and Desk Resources.
Linux+ Guide to Linux Certification Chapter 12 Compression, System Backup, and Software Installation.
*nix and Non-Intel Platform issues CSC 486/586 1.
Linux+ Guide to Linux Certification, Third Edition Chapter 11 Compression, System Backup, and Software Installation.
Backup and Recovery Part 1.
Guide to Linux Installation and Administration, 2e1 Chapter 13 Backing Up System Data.
Backup & Restore The purpose of backup is to protect data from loss. The purpose of restore is to recover data that is temporarily unavailable due to some.
BACKUP/MASTER: Immediate Relief with Disk Backup Presented by W. Curtis Preston VP, Service Development GlassHouse Technologies, Inc.
STORAGE DEVICES AND MEDIA BY: T.MINH. Backing Up Data Refers to the copying of files and data to different medium in case of problem with the main storage.
70-290: MCSE Guide to Managing a Microsoft Windows Server 2003 Environment, Enhanced Chapter 12: Managing and Implementing Backups and Disaster Recovery.
70-293: MCSE Guide to Planning a Microsoft Windows Server 2003 Network, Enhanced Chapter 14: Problem Recovery.
1 Objectives Discuss the Windows Printer Model and how it is implemented in Windows Server 2008 Install the Print Services components of Windows Server.
Presented by: Manjeet Singh. Secondary Storage Devices Magnetic media Tape Disks Optical Media Compact Discs CD-R, WORM (Write Once, Read Many) CD-RW.
Backup Strategy. Backup strategy Backup copy is a second copy saved to another location, usually on a backup device e.g. USB stick.Backup copy is a second.
Backups in Linux Ning Zhu Class presentation. Introduction The dump and restore commands are the most common way to create and restore from backups in.
Chapter 11 Compression, System Backup, and Software Installation.
Linux Operations and Administration
Linux+ Guide to Linux Certification
Backup Techniques Objectives –to illustrate practical application of backup utilities Contents –using dd, a direct device access command –manipulating.
1 CSC2405: System Administration Week 5 -- Backup what to do? where to? which way? Tools?
Offline File Storage. Module 12 Offline File Storage ♦ Introduction Backup is usually done by first collecting all the data in a single archive file,
Backup and Restore CPTE 433 John Beckett. Why Back Up? So you can restore later! SLA Restore Policy Backup Policy Backup Schedule.
1 Chapter 12 File Management Systems. 2 Systems Architecture Chapter 12.
BACKUP & RESTORE The purpose of backup is to protect data from loss. The purpose of restore is to recover data that is temporarily unavailable due to some.
BACKUP AND ARCHIVING DATA BACKUP AND RECOVERY OF DATA.
70-290: MCSE Guide to Managing a Microsoft Windows Server 2003 Environment, Enhanced Chapter 12: Managing and Implementing Backups and Disaster Recovery.
15 Copyright © 2005, Oracle. All rights reserved. Performing Database Backups.
Backups Ching-li Peng CMSC691X Date: June 11, 2002.
Chapter Four UNIX File Processing. 2 Lesson A Extracting Information from Files.
Guide To UNIX Using Linux Fourth Edition
Linux Operations and Administration
1 Maintain System Integrity Maintain Equipment and Consumables ICAS2017B_ICAU2007B Using Computer Operating system ICAU2231B Caring for Technology Backup.
15 Copyright © 2007, Oracle. All rights reserved. Performing Database Backups.
Linux+ Guide to Linux Certification Chapter Thirteen Compression, System Back-Up, and Software Installation.
Managing Disks and Drives Chapter 13 powered by dj.
File Systems (1). Readings r Reading: Disks, disk scheduling (3.7 of textbook; “How Stuff Works”) r Reading: File System Implementation ( of textbook)
Overview of Physical Storage Media
Backup & Restore The purpose of backup is to protect data from loss. The purpose of restore is to recover data that is temporarily unavailable due to some.
Backups CSCI N321 – System and Network Administration Copyright © 2000, 2011 by Scott Orr and the Trustees of Indiana University.
McLean HIGHER COMPUTER NETWORKING Lesson 15 (a) Disaster Avoidance Description of disaster avoidance: use of anti-virus software use of fault tolerance.
IT Database Administration Section 09. Backup and Recovery Backup: The available options Full Consistent (cold) Backup Database shutdown, all files.
Cosc 4750 Backups Why Backup? In case of failure In case of loss of files –User and system files Because you will regret it, if you don’t. –DUMB = Disasters.
1 Backups Part of a Systems Administrators job is maintaining the integrity of the system. This does not mean that she is expected to prevent anything.
Security and Backup. Introduction A back-up strategy must cover all eventualities: Accidental damage Equipment failure Deliberate damage It must consider:
System Administration – Part 2. Devices in UNIX are files: A device can be accessed with different file names All device files are stored in /dev or its.
1 3 Computing System Fundamentals 3.6 Errors Prevention and Recovery.
Filesystem Management and Backups. 2 Section Overview Devices and Files Filesystem Management Network Filesystems Backups.
Hands-On Microsoft Windows Server 2008 Chapter 7 Configuring and Managing Data Storage.
ICT Unit 3 Storage Devices and Media. What is backing up of data? Backing up refers to the copying of file to a different medium It’s useful if in case.
Chapter 19 File System Backup. Copyright © 2005 Pearson Addison-Wesley. All rights reserved. Objectives To describe how files and directories can be archived.
SVBIT SUBJECT:- Operating System TOPICS:- File Management
Memory management. Linux Memory Management Total memory available for processes = real memory + paging space - 1MB. First megabyte of real memory is used.
tar: The tape archive program _______________________ Amber Jain IC-2K7-05 _______________________.
File-System Management
Integrating Disk into Backup for Faster Restores
Filesystem Management and Backups
AS ICT Module 2 Objectives: Security of Data
Introduction to Operating Systems
Chapter III, Desktop Imaging Systems and Issues: Lesson II Storing Image Data
LO2: Understand Computer Software
1.2 Types of information storage media
Chapter 10 Archives and Backups.
Presentation transcript:

Backup & Restore Objectives –to understand Unix backup strategies Contents –why have backups –backup terminology –backup media –backup utilities –issues about backup security Practical –to perform backups Summary

Why Backup? BACKUPS ARE USELESS IF THEY CANNOT BE RESTORED Backups help recover data in the event of system failure Allow users to recover accidentally (or deliberately) corrupt or deleted files Used to retain data while systems are upgraded Backups are also be used for transferring data between non- networked machines

When to Backup Use cron to schedule backup scripts to run overnight Backup changing data every day –possibly use a full backup on one day –and incremental backups on the rest –make sure you change tapes every day –don't backup to the same tape all the time # more backup.inc DAY=`date +%a` cd / find etc home var -newer /var/adm/backup.full -print | \ cpio -ocvBO /dev/nst0 2> /var/adm/log.$DAY # more backup.inc DAY=`date +%a` cd / find etc home var -newer /var/adm/backup.full -print | \ cpio -ocvBO /dev/nst0 2> /var/adm/log.$DAY # more backup.full DAY=`date +%a` cd / touch /var/adm/backup.full find etc home var -print | \ cpio -ocvBO /dev/st0 2>/var/adm/log.$DAY # more backup.full DAY=`date +%a` cd / touch /var/adm/backup.full find etc home var -print | \ cpio -ocvBO /dev/st0 2>/var/adm/log.$DAY

Store backups in a lockable fireproof safe –if you don't have one buy one, they're not expensive Unix backups are insecure –there are no access controls –anyone with physical access to the media can restore the data Take backups and archives off-site –backups are no good if they are burnt/flooded with the computer systems –however, remember that data is confidential Don't keep backups immediately next to the machine –at the very least put the backups in a different building or room Where to Store Backups

What to Backup? Backup those files which change on a daily basis: /etcUnix configuration file /varUnix files which vary on a day to day basis /homeuser files –only backup the entire system when needed Backup the entire system on a regular basis –especially before updating the system –before preventative maintenance or moving the hardware Be careful with database systems –databases usually involve several files which must be consistent –stop database systems before backing up their files –some databases have a backup mode used when the system cannot be taken down for backups –databases using raw disks for storage will provide their own backup

Backup Media Traditional backup media is magnetic tape –reel-to-reel (½" or 9-track) –cartridge tape (¼" or SCSI tape) –video-8 (Exabyte) –DAT (Digital Audio Tape) –DLT (Digital Linear Tape) Other media include –removable disk packs (Bernoulli) –WORM disk (Write Once Read Many optical disks) –recordable CD (CD-R/DVD) –rewriteable optical disk (MO, phase change)

Magnetic Tape Magnetic tapes susceptible to magnetic fields –power cables, motors, magnets, etc. Cartridge media degrades with time and use –2 year life span and should be read every 6-12 months –replace tapes after 10 writes (20 at most!) DAT, DLT and Exabyte will last longer –but still have a limited life Needs careful storage –temperate and humidity controlled –sunlight (don't leave on a windowsill) Don't compromise your backups by using cheap or worn media

Optical Disks Optical disks have advantages over magnetic tapes –digital recording –reliable & robust media –compact media –can be treated as disks (no need to use backup utilities) Also have disadvantages –smaller capacity –more expensive media/drives (less true as technology advances) WORM or CD-R is the only choice for long term archives –data that must be kept for more than one year

Unix Backup Terminology Archive –full backup taken off-line (deleted from the system) Image backup –complete copy of a disk or partition Full backup –complete directory backup by files Incremental backup –files changed since last full or incremental backup Dump levels (0-9) –files changed since last backup at same or lower dump level –level 0 dump is a full backup

Backup Utilities File oriented utilities cpio- copy to I/O tar- tape archive and restore Filesystem utilities dump - backup linux filesystems WARNING! OBSOLETE! restore - restore linux dump WARNING! OBSOLETE! dumprx - dump Veritas filesystems restorerx- restore Veritas dump Device level dd- direct device access(image backups) Proprietary utilities –yast backup, SuSE backup –some manufacturers provide their own utilities (AIX: backup & restore) –if you use these you are tied to that manufacturer Third party Applications

Tape Archive and Restore Use tar for quick and simple backups –not flexible enough for sophisticated backup strategies Files are written to the archive in tar format –directory pathname and inode information –user, group and permission information –creation and modification times SCSI Tape device in Linux are usally called: /dev/nst[0-31]rewind /dev/st[0-31]no rewind Dencity modes: -, a, l, m # cd /home/radar # tar cvf /dev/st0. # tar tvf /dev/st0 # cd /tmp # tar xvf /dev/st0 # cd /home/radar # tar cvf /dev/st0. # tar tvf /dev/st0 # cd /tmp # tar xvf /dev/st0

Copy to I/O Use cpio for system backups –supports flexible and sophisticated backup strategies Files are written to the archive in cpio format –directory pathname and inode information –user, group and permission information, creation and modification times cpio -o list of files from stdin writes archive to stdout cpio -it archive read from stdin table of contents to stdout cpio -i archive read from stdin files restored according to archived pathname

Options to cpio General options -v verbose mode -B use large blocks -C n use blocks of n bytes -c use ASCII headers (always use this option)  Specify I/O devices with -O file for better handling of multi-volume media when archiving -I file for better handling of multi-volume media when restoring  Input (restore) options -t list table of contents rather than restore files -d create directories if needed -u unconditionally restore files -m retain file modification times

Exercise - Using cpio Explain the purpose of the following commands? # find. -print | cpio -ovcB >/dev/rmt/0m # cpio -itvcB </dev/rmt/0m # cd /tmp # cpio -ivcdumB </dev/rmt/0m # cd / # find etc home var -print | cpio -ovcB -O /dev/rmt/0m # cd /tmp # cpio -ivcdmB -I /dev/rmt/0m 'etc/init.d etc/rc*.d' # find. -print | cpio -ovcB >/dev/rmt/0m # cpio -itvcB </dev/rmt/0m # cd /tmp # cpio -ivcdumB </dev/rmt/0m # cd / # find etc home var -print | cpio -ovcB -O /dev/rmt/0m # cd /tmp # cpio -ivcdmB -I /dev/rmt/0m 'etc/init.d etc/rc*.d'

Summary Unix provides basic utilities for performing backups tar, cpio dump & restore dumprx & restorerx dd Unix backups are written to the media with their file attributes and pathnames Unix backups are insecure, there are no access control restrictions Keep all backups in a locked temperature and humidity controlled environment Backups are vital to system integrity - keep offsite backups if possible