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.

Slides:



Advertisements
Similar presentations
Backup and Restore Procedures. Introduction Performing regular backups should be considered one of a responsible system administrators top priorities.
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.
CMSC 691X, Summer 1999 Honglin Su, CSEE UMBC1 Chapter 11, Backups Honglin Su CSEE, UMBC
Using Commands Introduction to Linux June 16, 2009 Papeete, French Polynesia Hervey Allen.
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.
Lesson 22 – Introduction to Linux Systems Administration.
CIS 240 Introduction to UNIX Instructor: Sue Sampson.
Backups1-1 Backup  Why backup? m The choice of goals.  Where? m The choice of medias.  What? m The choice of contents.  When? m The choice of schedules.
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.
Guide to Linux Installation and Administration, 2e1 Chapter 13 Backing Up System Data.
1 Objectives Discuss the Windows Printer Model and how it is implemented in Windows Server 2008 Install the Print Services components of Windows Server.
Linux Commands LINUX COMMANDS.
SQL Server 2008 Implementation and Maintenance Chapter 7: Performing Backups and Restores.
11 INFO 321 Server Technologies II Backup Applications.
Chapter 11 Compression, System Backup, and Software Installation.
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.
Chapter 9 Part II Linux Command Line Access to Linux Authenticated login using a Linux account is required to access a Linux system. The Linux prompt will.
Offline File Storage. Module 12 Offline File Storage ♦ Introduction Backup is usually done by first collecting all the data in a single archive file,
MARC 10.5 Update John Harvey. MARC 10.5 Changes  Backup Scripts restructured  Added a script to generate scripts outside of MARC  Generate Scripts.
Lesson 11-Locating, Printing, and Archiving User Files.
Backup Track SA-E AfNOG workshop May 15, 2009 Cairo, Egypt (Slides by Phil Regnauld)
Backups Ching-li Peng CMSC691X Date: June 11, 2002.
Unix Basics Chapter 4.
Linux Operations and Administration
Linux+ Guide to Linux Certification Chapter Thirteen Compression, System Back-Up, and Software Installation.
Workbook 5 - Part 2 The Linux Filesystem RH030 Linux Computing Essentials.
Chapter 10: File-System Interface 10.1 Silberschatz, Galvin and Gagne ©2011 Operating System Concepts – 8 th Edition 2014.
Guide To UNIX Using Linux Third Edition Chapter 8: Exploring the UNIX/Linux Utilities.
Backups CSCI N321 – System and Network Administration Copyright © 2000, 2011 by Scott Orr and the Trustees of Indiana University.
CIS 193A – Lesson7 Restoration. CIS 193A – Lesson7 Focus Question Compare the ability of various backup/restore utilities to provide ease of access and.
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.
E X C E E D I N G E X P E C T A T I O N S Basic LINUX Linux System Administration Dr. Hoganson Kennesaw State University Operating Systems Directory structure:
Linux+ Guide to Linux Certification, Third Edition
Linux+ Guide to Linux Certification, Third Edition
Week 9 - Nov 7, Week 9 Agenda I/O redirection I/O redirection pipe pipe tee tee.
Basic of UNIX For fresh members of SPARCS
Manage Directories and Files in Linux Part 2. 2 Identify File Types in the Linux System The file types in Linux referred to as normal files and directories.
1 itec 400 Backups George Vaughan Franklin University.
Filesystem Management and Backups. 2 Section Overview Devices and Files Filesystem Management Network Filesystems Backups.
Importance of Routine File System Backups To prevent loss data due to: Accidental deletion of files Hardware failures Problems with re-installation or.
A Brief Overview of Unix Brandon Bohrer. Topics What is Unix? – Quick introduction Documentation – Where to get it, how to use it Text Editors – Know.
Learning basic Unix command It 325 operating system.
File Management commands cat Cat command cat cal.txt cat command displays the contents of a file here cal.txt on screen (or standard out).
Chapter 19 File System Backup. Copyright © 2005 Pearson Addison-Wesley. All rights reserved. Objectives To describe how files and directories can be archived.
Embedded Software Design Week II Linux Intro Linux Kernel.
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 _______________________.
Linux Filesystem Management
File-System Management
Department of Computer Engineering
Filesystem Management and Backups
Chapter 10 Backups.
Cairo, Egypt (Slides by Phil Regnauld)
Some Linux Commands.
Linux Basic Commands Visit to more Learning Resources.
The Linux Command Line Chapter 2
Introduction to Linux Week 0 - Thursday.
Working with Mac OS and Linux
Backups Chapter 10.
The Linux Command Line Chapter 4
Linux Commands LINUX COMMANDS.
January 26th, 2004 Class Meeting 2
Chapter 10 Archives and Backups.
The Linux Command Line Chapter 4
Presentation transcript:

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 Linux Some other programs also can be used to backup the files. Such as: tar, cpio and dd

Advantage of dump Backups can span multiple tapes Files of any type can be backed up and restored Permissions, ownerships, and modification times are preserved Files with holes are handled correctly Backups can be performed incrementally

Limitation of dump Every filesystem must be dumped individually Only filesystems on the local machine can be dumped

Features (dump) Support “incremental” backup. Backup level will be assigned to implement this. Don’t care about the length of the filenames.

flags to dump -u: causes dump to automatically update /etc/dumpdates when the dump completes. The date, dump level and filesystem name are recorded. -f: indicates where dump sends the output -B: tells dump what is the tape length can be used to dump the files. # dump -5u –B –f /dev/sto /work

Dump Schedule Simple schedule: Do level 0 dumps of every filesystem each day. Reuse a group of tapes, but every N days, keep the tape forever. Moderate schedule: assign a tape to each day of the week, each week of the month, and each month of the year. Every day, do a level 9 dump to the daily tape. Every week, do the level 5 dump. And every month, do a level 3 dump. Do a level 0 dump whenever the incrementals get too big to fit on one tape.

Restore the files using restore Restore individual files Restore entire filesystems

Restoring individual files Restore the file /users/rdeaton/lostfile from a remote tape drive for user Dr. Deaton: # mkdir /var/restore # cd /var/restore # rsh tapehost mt –f /dev/nst0 fsf 3 # rrestore –i –f tapehost:/dev/nst0 restore> ls restore> cd rdeaton restore> add lostfile restore> ls restore> extract

Restoring individual files (cont’) Give the file to rdeaton: # cd /var/restore # ls rdeaton # ls ~rdeaton # cp –p rdeaton/lostfile ~rdeaton/lostfile.restored # chown rdeaton ~rdeaton/lostfile.restored # rm –rf /var/restore # mail rdeaton Your file lostfile has been restored and has been placed in /users/rdeaton/lostfile.restored

Restoring entire filesystems Create and mount the target filesystem cd to the mount point of the new filesystem Put the most recent level 0 dump in the tape drive Type restore –r After the level 0 dump has been restored, mount and restore the incremental dumps.

Determine which dumps to restore

Restore expamle If the most recent dump was the first monthly after the annual level 0 in the “moderate” schedule, the commands to restore /home, residing on the physical device /dev/sda1 # /etc/mke2fs /dev/sda1 QUANTUM_PD1050S # /etc/mount /dev/sda1 /home # cd /home /* mount first tape of level 0 dump of /home */ # restore –r /* mount first tape of level 3 monthly dump */ # restore –r

Other Archiving Programs tar tar: package files tar reads multiple files or directories and packages them into one file, often a tape file. tar is useful way to back up any files whose near-term recovery you anticipate.

Other Archiving Programs cpio cpio: archiving utility from ancient times cpio is similar to tar in functionality. It’s rarely used today. Like tar, cpio can be used to move directory trees.

Other Archiving Programs dd dd: twiddle bits dd is a file copying and conversion program. dd just copies from its input file to its output file. If a user brings you a tape that was written on some non-Linux system, dd may be the only way to read it. dd was to create a copy of an entire system. However, restore and dump is a better option these days.