Backups Ching-li Peng CMSC691X Date: June 11, 2002.

Slides:



Advertisements
Similar presentations
Va-scanCopyright 2002, Marchany Unit 8 – Solaris File Systems Randy Marchany VA Tech Computing Center.
Advertisements

CMSC 691X, Summer 1999 Honglin Su, CSEE UMBC1 Chapter 11, Backups Honglin Su CSEE, UMBC
Everything your business needs to know but probably doesn’t.
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.
Backup & Restore Objectives –to understand Unix backup strategies Contents –why have backups –backup terminology –backup media –backup utilities –issues.
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.
Linux+ Guide to Linux Certification Chapter 12 Compression, System Backup, and Software Installation.
Linux+ Guide to Linux Certification, Third Edition Chapter 11 Compression, System Backup, and Software Installation.
Guide to Linux Installation and Administration, 2e1 Chapter 13 Backing Up System Data.
Security and Backup Avoid disasters – have a good backup policy Avoid disasters – have a tight security scheme in place UK law dictates the board of directors.
70-290: MCSE Guide to Managing a Microsoft Windows Server 2003 Environment, Enhanced Chapter 12: Managing and Implementing Backups and Disaster 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.
1 Chapter Overview Backing Up Your Network Backing Up and Restoring Active Directory.
SQL Server 2008 Implementation and Maintenance Chapter 7: Performing Backups and Restores.
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.
11 INFO 321 Server Technologies II Backup Applications.
Chapter 11 Compression, System Backup, and Software Installation.
LAN / WAN Business Proposal. What is a LAN or WAN? A LAN is a Local Area Network it usually connects all computers in one building or several building.
Security of Data. Key Ideas from syllabus Security of data Understand the importance of and the mechanisms for maintaining data security Understand the.
Linux+ Guide to Linux Certification
Backup Techniques Objectives –to illustrate practical application of backup utilities Contents –using dd, a direct device access command –manipulating.
Lesson 7-Creating and Changing Directories. Overview Using directories to create order. Managing files in directories. Using pathnames to manage files.
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 & 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.
Chapter 7 Making Backups with RMAN. Objectives Explain backup sets and image copies RMAN Backup modes’ Types of files backed up Backup destinations Specifying.
Lesson 11-Locating, Printing, and Archiving User Files.
Chapter 4 Solving Data Backup Challenges Prepared by: Khurram N. Shamsi.
Chapter Fourteen Windows XP Professional Fault Tolerance.
70-290: MCSE Guide to Managing a Microsoft Windows Server 2003 Environment, Enhanced Chapter 12: Managing and Implementing Backups and Disaster Recovery.
Chapter 18: Windows Server 2008 R2 and Active Directory Backup and Maintenance BAI617.
Backup Track SA-E AfNOG workshop May 15, 2009 Cairo, Egypt (Slides by Phil Regnauld)
Linux Operations and Administration
Please Note: Information contained in this document is considered LENOVO CONFIDENTIAL For Lenovo Internal Use Only Do Not Copy or Distribute!! For Lenovo.
1 Maintain System Integrity Maintain Equipment and Consumables ICAS2017B_ICAU2007B Using Computer Operating system ICAU2231B Caring for Technology Backup.
| nectar.org.au NECTAR TRAINING Module 9 Backing up & Packing up.
Linux+ Guide to Linux Certification Chapter Thirteen Compression, System Back-Up, and Software Installation.
1 Interface Two most common types of interfaces –SCSI: Small Computer Systems Interface (servers and high-performance desktops) –IDE/ATA: Integrated Drive.
Mark A. Magumba Storage Management. What is storage An electronic place where computer may store data and instructions for retrieval The objective of.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 3: Operating-System Structures System Components Operating System Services.
11 DISASTER RECOVERY Chapter 13. Chapter 13: DISASTER RECOVERY2 OVERVIEW  Back up server data using the Backup utility and the Ntbackup command  Restore.
Recover Your Data Quickly: Disaster Recovery Techniques with ARCserve  Disaster Recovery.
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.
Configuring Data Protection Chapter 12 powered by dj.
Backups CSCI N321 – System and Network Administration Copyright © 2000, 2011 by Scott Orr and the Trustees of Indiana University.
Guide To UNIX Using Linux Third Edition Chapter 8: Exploring the UNIX/Linux Utilities.
XP Practical PC, 3e Chapter 6 1 Protecting Your Files.
BACKUP & RECOVERY Option 1: Transaction Processing Systems.
Module 4.0: File Systems File is a contiguous logical address space.
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.
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.
IT1001 – Personal Computer Hardware & system Operations Week7- Introduction to backup & restore tools Introduction to user account with access rights.
1 itec 400 Backups George Vaughan Franklin University.
| nectar.org.au NECTAR TRAINING Module 9 Backing up & Packing up.
Page 1 of 38 Lenovo Confidential Lenovo Confidential Lenovo Confidential Lenovo Confidential Lenovo Confidential Please Note: Information contained in.
Lecture 02 File and File system. Topics Describe the layout of a Linux file system Display and set paths Describe the most important files, including.
Importance of Routine File System Backups To prevent loss data due to: Accidental deletion of files Hardware failures Problems with re-installation or.
Backups When just having a system isn’t enough. 321 Rule of Thumb 3 generations 2 media 1 off-site at least.
Chapter 19 File System Backup. Copyright © 2005 Pearson Addison-Wesley. All rights reserved. Objectives To describe how files and directories can be archived.
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
File System Interface CSSE 332 Operating Systems
Chapter 10 Backups.
AS ICT Module 2 Objectives: Security of Data
Cairo, Egypt (Slides by Phil Regnauld)
Backups Chapter 10.
Chapter 10 Archives and Backups.
Presentation transcript:

Backups Ching-li Peng CMSC691X Date: June 11, 2002

Contents General rules of backups Backup devices and media Setting up an incremental backup regime Restoring from dumps Dumping and restoring for upgrades Using other archiving programs Using multiple files on single tape AMANDA

General rules Perform all dumps from one machine rdump allows you to perform dumps over the network You can also use dd takes care of byte swapping problem but not for different versions of rdump. Label your tapes Clearly, complete and unique id their contents Pick a reasonable backup interval The more often backups are done, the smaller amount of data can be lost. Busy system—back up every workday. However, unheavy system, back up a week. Choose filesystems carefully /etc/passwd –is copied to other partition everyday and backup regularly /tmp directory –do not need to backup

General rules—cont. Make daily dumps fit on one tape Do daily dumps of all your user filesystems onto a single tape. Mount a tape every day before you leave work and run dumps late at night from cron. This way minimizes the dump impact with users. If you cannot fit daily backup into one tape, you will consider… Make filesystems smaller than your dump device Dump is capable of dumpling filesystem to multiple tapes. It must prompt you change tapes and tapes should be carefully label Keep tapes off-site Keep backups off-site so that a disaster cannot destroy the original data and backups. Keep the storage of backups in a climate-controlled and secure environment

General rules—cont. Protect your backups Keep them under lock and key. Confidentiality of careness. Limit activity during dumps Check your tapes Keep on monitoring the backup procedure and checking its functionality working. First, reread tapes immediately after it has finished dumping. Scanning a tape to verify that it contains the expected files Run restore t to generate a table of contents for each filesystem and to store the results on disk Use grep to look up the filename and pick the newest instance

General rules—cont. Develop a tape life cycle Design your data for backups Use the following information to design the storage architecture: the various kinds of data you will deal with the expected volatility of each tape of data, the backup frequency which you feel comfortable with potential losses Prepare for the worst

Backup devices and media Backup should write on a removable media. For example, backup a hard disk to another provides a little protection against disk controller failure. Most backup stores in locally. Many tape drives compress data before write it to tapes, allowing more data to be stored than the tapes’ nominal capacity. Although cost and media capacity are both important consideration, it is important consider throughput as well. Fast media are more pleasant to deal with, and they allow more flexible in the scheduling of dumps.

Setting up an incremental backup regime DUMP and restore are commands to create and restore from backups. Dump filesystem: Builds up a list of files that have been modified since last previous dump, then pack those files into a single file to archive to an external device. Limitations Every filesystem must be dumped individually Only filesystems on the local machine can be dumped. However, you an dump a local filesystem to a remote tape drive with rdump #rdump Ouf anchor:/dev/nst0 /spare

Dump functionality Dump d s Using d specifies the tape density in byte per inch, and s specifies size in kilobytes. For example, #dump 5usdf /dev/rst0 /work dump [flag] [size] [density][f:send output to this tape device][filesystem] Dump accepts many arguments, but thy do not vary too much from platform to platform,so, you must check these flags in man page you are dumping In red hat: You have to explicitly install dump and restore on your linux systems.

Setting up an incremental backup regime--cont. Features Incremental dumps It does not care about the length of filenames. Hierarchies can be arbitrarily deep and long names are handled correctly. Dump accepts many arguments U flag: to cause dump to automatically update/etc/dumpdates. F flag: to tell dump to send its output elsewhere. D|s flag: to specify the tape density in bytes per inch and the tape length in cubits.

Restoring form dump Extract data from dump tapes There are two types of restoring. Restoring a set of files Restoring a whole filesystem

Restoring individual files To determine which tapes contain the version of files user wanted. To create and cd to a temporary directory such as /var/restore To restore i, ls, cd and pwd To mark the files you want to restore with add command When you are done selecting, type extract to pull files form the tape. Restore i reads the catalog from the tape and then lets you navigate though the directory of the dump. For example restore the file /users/janet/jamlort from a remote tape drive. Determine which tape contains this file #mkdir /var/restore #cd /var/restore #ls ~janet Janet/garth/lost!foundlost +found, #rsh tapehost mt –f /dev/nst0 fsf3 Rrestore xf tapehost:/dev/nst0 /users/janet/iam.lost

Restoring Entire Filesystems Before restore entire filesystem, you must make sure that what problem caused the filesystem to be failed Create and mount the target filesystem cd to the mount point to the new filesystem Put the first tape of the most recent level 0 dump in the tape drive Type restore r command Mount and restore the incremental dumps. Restore the dump in the order they are created

Dumping and restoring for upgrades When you perform an OS upgrade, you must back up all filesystems with a level 0 dump and restore them. You must to backup and restore any system- specific files that are in / or /usr, such as /etc/passwd, /etc/shadow, or /usr/local. You must do a complete setof level 0 dumps immediately after an upgrade, too.

Using other archiving programs Using tar, cpio, and dd to back up an entire system Tar:reads multiple files or directories and packages them into one files Tar cf –fromdir |(cd todir; tar xfp- ) Create a copy of the director tree fromdir in todir Avoid using “..” In the todir argument, since symbolic links and automounters can make it mean something different what you expect Drawback: 1. It does not allow multiple tapes volumes (if not fit in one tape?) 2. Pathnames are limited to 100 characters. This limitation prevents tar from being used to archive deep hierarchy

tar Function options -c, --create a new archive -d, --compare the files store in tarfile with others -r, --append other files to the end of the existing archive -t, --list the names of files stored in archive -u, --update -x –extract, --get Examples: Create an archive of /bin and /usr/bin(c), show the command working (v), and store on the tape in /dev/rmt0: tar cvf /dev/rmt0 /bin /usr/bin List the tapes’s contents in a format like ls –l tar tvf /dev/rmt0

cpio cpio—copy file archives in from or out to tape or disk, or to another location on the local machine. Each of the three flags –i (copy in),-o(copy out) or –p (copy files in anther directory) #find fromdir –depth –print| cpio –padm todir But, do not allow multiple tape volumes

dd dd: copies its input files to as put files If a user bring you a tape that was written on some non-UNIX system dd may be the ony way to read it Newfs the destination filesystem between partition exactly the same size Make a copy of a copy of a magnetic tape --with two tape drives, /dev/rmt8 /dev/rmt9 With one drive /dev/rmt8 %dd if = /dev/rtm8 of = rtm9 cbs = 166 %dd if = /dev/rtm8 of = tfile cbs=166 %dd if = tfile of = dev/rtm9 cbs= 166 %rm tfile

Dump Sequence Dump levels have meaning when they are associated with each other. Dump can be performed on various schedules. The schedule depends on The activity of your file systems The capacity of your dump Dump sequences can minimize the number of tapes consumed by each day’s backup. Given those constrains, you can design a schedule a an appropriate level A simple schedule A moderate schedule

Dump sequence—cont. A simple schedule If your disk capacity is smaller than dump device, then you can use a trivial dump scheule Do level 0 dumps to every filesystem every day. Reuse a group of tapes, but every n days in a tape. It costs you (365/n * price of each tape) per year Motivation: It provides a lot of redundancies and make data recovery very easy. It provides safety and convenience (limited operating time), but spending a lot of money.

Dump sequence—cont. A moderate schedule Assign a type of each day of a week, each week of the month, each month of the year. Every day, do a level 9 dump to the daily tape Every week, do a level 5 dump to the weekly tape’ Every month, do a level 3 dump to the monthly tape Every year, do a level 0 dump to the yearly tape. It provides little redundancies and not too many tapes.

Using Multiple Files on A Single Tape When dump or some other commands writes a stream of bypes out to a tape device and then closes the device file, an “end of file” marker is automatically placed on the tape. Using mt command position a tape at a particular stream or “file set,” as mt calls them. “mt”is especially useful if you put multiple files. #mt –f tapename command --tapename is the device name of the tape -- -f is forest -rew rewinds the tape to the beginning -offl put the tape offline. Some dump tape scripts use this to eject the tape. -status prints informaiton abou the current status of tape drive -fsf [count]fast-forwards the tape. [count] is default to 1. -bsf [count] backspace count files. If you are too far forward, your best bet is to rew it and start again from beginning

AMANDA The Advanced Maryland Automatic Network disk archiver, AMANDA, is a sophisticated network backup system that can replace the home-grown scripts used by many sites. It can backup up all the machines on a LAN to a single server’s tape drive. It supports most flavors of UNIX and many different kinds of backup media. Amanda was originally written by James da Silva of the University of Maryland in It is now supported by a team of sysadmins form around the world.The latest information is available in