11 INFO 321 Server Technologies II Backup Applications.

Slides:



Advertisements
Similar presentations
Chapter 20 Oracle Secure Backup.
Advertisements

Basic Unix system administration
Backup Strategy. An Exam question will ask you to describe a backup strategy. Be able to explain: Safe, secure place in different location. Why? – For.
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.
Chapter 12 - Backup and Disaster Recovery1 Ch. 12 – Backups and Disaster Recovery MIS 431 – Created Spring 2006.
MIS Chapter 51 Chapter 5 – Managing File Access MIS 431 Created Spring 2006.
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.
*nix and Non-Intel Platform issues CSC 486/586 1.
1 of 5 This document is for informational purposes only. MICROSOFT MAKES NO WARRANTIES, EXPRESS OR IMPLIED, IN THIS DOCUMENT. © 2006 Microsoft Corporation.
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.
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.
NovaBACKUP 10 xSP Technical Training By: Nathan Fouarge
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.
1 Chapter Overview Backing Up Your Network Backing Up and Restoring Active Directory.
1 Introducing Windows Backup There are different methods for starting Windows 2000 Backup. Requirements for running Windows 2000 Backup All users can back.
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.
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.
Yi Shen Mar 18 th, Backup workshop Stanford Exploration Project.
CIS 90 - Lesson 15 Lesson Module Status Slides – draft Properties - done Flash cards – 1 st Minute quiz – NA Web calendar summary – done Web book pages.
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.
Chapter 7 Making Backups with RMAN. Objectives Explain backup sets and image copies RMAN Backup modes’ Types of files backed up Backup destinations Specifying.
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 8 Implementing Disaster Recovery and High Availability Hands-On Virtual Computing.
Backups Ching-li Peng CMSC691X Date: June 11, 2002.
Linux Operations and Administration
Module 12: Managing Disaster Recovery. Overview Preparing for Disaster Recovery Backing Up Data Scheduling Backup Jobs Restoring Data Configuring Shadow.
Maintaining File Services. Shadow Copies of Shared Folders Automatically retains copies of files on a server from specific points in time Prevents administrators.
11 MANAGING AND DISTRIBUTING SOFTWARE BY USING GROUP POLICY Chapter 5.
Day 8 Exporting Displays Cronjobs Mount. Chapter 5 Chapter 5 talks about X windows. –You should read the chapter. –However, you do not need to pay particular.
Chapter Nine NetWare-Based Networking. Introduction to NetWare In 1983, Novell introduced its NetWare network operating system Versions 3.1 and 3.1—collectively.
TELE 301 Lecture 10: Scheduled … 1 Overview Last Lecture –Post installation This Lecture –Scheduled tasks and log management Next Lecture –DNS –Readings:
Linux+ Guide to Linux Certification Chapter Thirteen Compression, System Back-Up, and Software Installation.
11 DISASTER RECOVERY Chapter 13. Chapter 13: DISASTER RECOVERY2 OVERVIEW  Back up server data using the Backup utility and the Ntbackup command  Restore.
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.
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.
CN1260 Client Operating System Kemtis Kunanuraksapong MSIS with Distinction MCT, MCITP, MCTS, MCDST, MCP, A+
1 itec 400 Backups George Vaughan Franklin University.
Running the Operational Codes for the Brahmaputra Tom Hopson.
Filesystem Management and Backups. 2 Section Overview Devices and Files Filesystem Management Network Filesystems Backups.
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.
Introduction to AFS IMSA Intersession 2003 Managing AFS Services Brian Sebby, IMSA ‘96 Copyright 2003 by Brian Sebby, Copies of these slides.
Basic UNIX system administration CS 2204 Class meeting 14 *Notes by Doug Bowman and other members of the CS faculty at Virginia Tech. Copyright
Chapter 19 File System Backup. Copyright © 2005 Pearson Addison-Wesley. All rights reserved. Objectives To describe how files and directories can be archived.
C Copyright © 2006, Oracle. All rights reserved. Oracle Secure Backup Additional Installation Topics.
tar: The tape archive program _______________________ Amber Jain IC-2K7-05 _______________________.
Back it up – Don't be a fool!
Filesystem Management and Backups
Maintaining Windows Server 2008 File Services
Introduction to Operating Systems
Chapter 7 Installing Program &Backup Tool
System Administration
Linux Network Configuration
Periodic Processes Chapter 9.
Chapter 10 Archives and Backups.
Presentation transcript:

11 INFO 321 Server Technologies II Backup Applications

2 System Backup ◊A key responsibility of IT professionals is to back up and restore the servers and/or network ◊We’ve examined the hardware and processes used to do so; now we’ll focus on the application or software side

3 System Backup ◊In Unix/Linux systems, the ‘tar’ command is a commonly used archiving mechanism ‘dump’ and ‘restore’ are also used frequently ◊‘cron’ and variations on it are used to schedule backups cron is named for Cronus, the Greek god of timeGreek god of time

4 Some guidance on backups ◊DO THEM! Hardware fails, often when least convenient ◊Backup from one machine to one device This centralizes scripting management ◊Label your media No, you won’t remember which one is which ◊Pick a reasonable backup time interval It’s a tradeoff between effort and risk Mostly from (Nemeth, 2007)

5 Some guidance on backups ◊Choose file system structure carefully Make data that changes often easier to backup If a few stray files need frequent backup, copy them to a directory that needed backup ◊Daily backups should fit on one medium Makes life easier ◊Make file systems smaller than one medium

6 Some guidance on backups ◊Keep media off-site Disasters are more common than you think ◊Protect your backups Remember, they span file permissions Consider encryption, and physical security ◊Limit activities during backups Or yes, you can mess up the archive ◊Verify your media

7 Some guidance on backups ◊Develop a media life cycle And destroy media when dead ◊Design data for backups Consider what kinds of data you have, how quickly it changes, how often you’ll back it up, who owns the data ◊Prepare for the worst Disaster planning isn’t just for FEMA

8 Tar ◊The ‘tar’ command is short for ‘tape archive’ Its use is analogous to WinZip, in that it also can provide compressionWinZip ◊In addition to backups, tar is also used for distributing applications A file ending in ‘.tar’ is sometimes called a tarball, but ‘archive’ is more polite Most of this section is from (Sarwar, 2002)

9 Tar Archives ◊A collection of files and/or directories is considered an ‘archive’ ◊Like most Unix/Linux commands, how tar works depends on the options selected The c or r options are used to create a tarball ‘c’ creates a new archive ‘r’ appends files onto an existing archive

10 Tar options ◊Two other commonly used options are ‘v’ is verbose mode, to tell what it’s doing ‘f’ file sets the name of the archive to file; without it, the default is the tape device /dev/rmt0 (if you have such a device!) ◊So to create a new archive called mine.tar from the current directory down would be tar cvf mine.tar.

11 Tar ◊The ‘.tar’ suffix is optional – it just helps Windows figure out what the file is ◊The options can have a dash before the first option; that’s more Unix-like ◊So the same command could also be tar -cvf mine.tar.

12 Tape devices ◊If you’re actually using a tape device, it needs to be mounted before use mount /dev/rmt0 ◊After using the device, release it with umount /dev/rmt0

13 Restoring archives ◊To restore an archive, use the ‘x’ option Copy (cp) the tar file to the directory in which you wish to unpack it Change directory (cd) to that directory tar xvf filename.tar ◊This is also the option used to unpack software which is distributed in tar form

14 Selective restoration ◊Sometimes you want to restore only specific files ◊Use the ‘t’ option to get an ls –l format listing of archive contents tar tvf filename.tar ◊If the listing is long, pipe it into more tar tvf filename.tar | more

15 Selective restoration ◊Then you can use the tar xvf command, and add the path to the file you want tar xvf filename.tar./directory/onefile.doc ◊Notice you need to specify the absolute or relative directory where the file will go

16 Adding compression ◊Some versions of tar can also do compression, using the ‘z’ option Use the ‘z’ option before the other options, for both creating and unpacking the archive Compressed archives typically end in ‘.gz’  tar –zcvf mybackup.gz to create archive  tar –zxvf mybackup.gz to unpack it

17 Appending onto an archive ◊For reasons not grammatically clear, the option to append onto an existing archive is ‘r’ ◊Need more tar? The full GNU version of tar is described herehere

18 Time to dump ◊Most forms of Linux can use dump and restore commands to create and restore backups ◊ dump creates a list of files modified since the last dump, and combines them into one large file This is perfect for incremental backups! File permissions and ownership are preserved Mostly from (Nemeth, 2007)

19 Why dump? ◊Dump is handled more consistently across Unix and Linux distributions Many flavors of Unix don’t support the full GNU tar features ◊Dump requires a ‘backup level’ from 0 to 9 Level 0 forces a full backup Level n forces backup of files changed since the last dump of a level less than n

20 More dump options ◊The ‘f’ option in dump identifies the target device for the dump The parameter after the ‘f’ option and its device is the name of the filesystem to be dumped dump -5u –f /dev/nst0 /work ◊Note that dump can only archive one filesystem; in the example, it’s /work

21 More dump options ◊The ‘u’ after the backup level (as in ‘-5u’ on the previous slide) forces dump to update a file /etc/dumpdates with the date, dump level, and filesystem name This provides data for future dumps to know the last dump of that filesystem

22 Remote dump ◊Dump only works on the local machine ◊You can use rdump to dump a local filesystem onto a remote device, such as a tape drive rdump -0u –f anchor:/dev/nst0 /spare

23 Dump scheduling ◊The levels in dump are strictly relative, but you can assign them to different types of backups ◊A simple schedule could use level 0 full backups every day, and keep every Nth tape permanently

24 Dump scheduling ◊A more complex GFS-like schedule may be A level 9 dump daily A level 5 dump weekly A level 3 dump monthly A level 0 dump at least quarterly ◊The numbers 9, 5, 3 are arbitrary for flexibility; you could use 3, 2, 1 instead

25 Restore command ◊The restore command does just that ◊Determine the media from which you are restoring ◊Use a temporary directory like /var/restore ◊The most common restore options are –i, -f, -r, and -x

26 Restore command ◊The restore –i option allows interactive marking of individual files to be restored Navigate through the archive using ls, cd, and pwd commands Mark files to be extracted with an add command When done, use extract to restore those files

27 Restore command ◊Like most backup commands, the –f option allows selection of the device to be restored ◊So we might open an archive with restore –i –f /dev/nst0 ◊Then add a file with add iamlost ◊And restore with extract

28 Remote restore ◊Matching rdump, there is an rrestore command to restore off a remote tape device ◊The –x option allows specification of a file location to be restored ◊In a remote example we might have rrestore –x –f tapehost:/dev/nst0./janet/iamlost

29 Restore a filesystem ◊The ‘-r’ option restores an entire file system ◊Make sure the target filesystem is properly created and mounted, and cd to the root of the filesystem ◊Load the most recent level 0 tape and use restore -r

30 Restore a filesystem ◊Then restore, in order, the incremental restores since that level 0 ◊In any backup level, you only need to restore the most recent one So if you have four level 5 dumps, only restore the last one

31 Many filesystems on one tape ◊It’s possible to dump many filesystems on one medium, space permitting Just use the dump command several times, and don’t rewind the tape in between them ◊The mt command should be used to skip forward to the correct dump on that tape, when it’s time to restore

32 Other backup applications ◊There are lots of other open source and proprietary backup applications Bacula Tivoli Storage Manager Veritas (now owned by Symantec)Veritas

33 Timed scripting ◊Ok great, we have a couple ways to create archives via command line ◊Now automate the process with timed scripts, often known as ‘cron jobs’ ◊The cron system in Linux and Unix allows apps or scripts to be run at specified times ◊It is managed via the crontab file From (Hill, 2007) and (Nemeth, 2007)

34 Crontab ◊Each user has a crontab file, typically under /var/spool/cron, plus a sys admin one under /etc/crontab ◊If you don’t have one yet, create one with crontab –e ◊Each line in the crontab file has five numbers, followed by the command it’s to run

35 Crontab ◊The numbers are, in order: Minutes (00 to 59) Hours (00 to 23, 00=midnight) Day of the month (1-31) Month of the year (1-12, 1=January) Weekday (0-6, 0=Sunday) ◊So runs at 04:01 am on January 3 rd OR if it’s a Tuesday

36 Crontab ◊Ok, so that’s a little restrictive ◊You can enter a * to indicate any value * * * means 04:01 am on every day of every month ◊And you can use ranges (1-15) or comma separated specific values (01,31) 01, means run at 04:01 and 04:31 on the 1 st through 15 th days of June

37 Crontab ◊So if you create a backupscript to run at 3:19 am every Saturday, the full crontab line would look like * * 6 /usr/bin/backupscript ◊What happens if the first field is a *?

38 Crontab ◊You can execute multiple commands by putting them in parentheses, separated by semicolons 30 2 * * 1 (cd /users/joe/project; make) This will run /users/joe/project/make at 2:30 am every Monday

39 Crontab uses ◊So in addition to performing backups, crontab entries are handy for many purposes Cleaning up file systems Distributing configuration files across the network Rotating full log files ◊A newer app called anacron does interval- based scheduling, but is run from cron

40 Sources ◊Sarwar, Koretsky, Sarwar. Linux: The Textbook. (2002) Addison Wesley, ISBN ◊Nemeth, Snyder, Hein. Linux Administration Handbook. (2007) Prentice Hall, ISBN ◊Hill, et al. The Official Ubuntu Book. (2007) Prentice Hall, ISBN