1 CSC2405: System Administration Week 5 -- Backup what to do? where to? which way? Tools?

Slides:



Advertisements
Similar presentations
Networking Essentials Lab 3 & 4 Review. If you have configured an event log retention setting to Do Not Overwrite Events (Clear Log Manually), what happens.
Advertisements

Lesson 3: Working with Storage Systems
A new standard in Enterprise File Backup. Contents 1.Comparison with current backup methods 2.Introducing Snapshot EFB 3.Snapshot EFB features 4.Organization.
Basic Unix system administration
Backing Up Your Computer Hard Drive Lou Koch June 27, 2006.
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.
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
Linux+ Guide to Linux Certification Chapter 12 Compression, System Backup, and Software Installation.
*nix and Non-Intel Platform issues CSC 486/586 1.
Front view 3.5-inch floppy disk drive
Introduction to Computers Essential Understanding of Computers and Computer Operations.
Linux+ Guide to Linux Certification, Third Edition Chapter 11 Compression, System Backup, and Software Installation.
®® Microsoft Windows 7 for Power Users Tutorial 10 Backing Up and Restoring Files.
Guide to Linux Installation and Administration, 2e1 Chapter 13 Backing Up System Data.
Storage Devices and 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.
70-290: MCSE Guide to Managing a Microsoft Windows Server 2003 Environment, Enhanced Chapter 12: Managing and Implementing Backups and Disaster Recovery.
Windows Server 2003 資料備份與還原 林寶森
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.
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.
Backup policies Or - how not to get annoyed when you accidentally delete stuff. Warning - this does get a little technical.
Chapter 11 Compression, System Backup, and Software Installation.
Chapter-4 Windows 2000 Professional Win2K Professional provides a very usable interface and was designed for use in the desktop PC. Microsoft server system.
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,
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.
Lesson 11-Locating, Printing, and Archiving User Files.
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.
Unix Basics Chapter 4.
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.
Preventing Common Causes of loss. Common Causes of Loss of Data Accidental Erasure – close a file and don’t save it, – write over the original file when.
IOS110 Introduction to Operating Systems using Windows Session 10 1.
Installation Overview Lab#2 1Hanin Abdulrahman. Installing Ubuntu Linux is the process of copying operating system files from a CD, DVD, or USB flash.
Linux+ Guide to Linux Certification, Third Edition
1 Interface Two most common types of interfaces –SCSI: Small Computer Systems Interface (servers and high-performance desktops) –IDE/ATA: Integrated Drive.
Overview of Physical Storage Media
Chapter 6 Protecting Your Files. 2Practical PC 5 th Edition Chapter 6 Getting Started In this Chapter, you will learn: − What you should know about losing.
11 DISASTER RECOVERY Chapter 13. Chapter 13: DISASTER RECOVERY2 OVERVIEW  Back up server data using the Backup utility and the Ntbackup command  Restore.
XP Practical PC, 3e Chapter 6 1 Protecting Your Files.
1 Periodic Processes and the cron Daemon The cron daemon is where all timed events are initiated. The cron system is serviced by the cron daemon. What.
MCSE Guide to Microsoft Windows Vista Professional Chapter 5 Managing File Systems.
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.
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.
Chapter 8: Installing Linux The Complete Guide To Linux System Administration.
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.
Basic UNIX system administration CS 2204 Class meeting 14 *Notes by Doug Bowman and other members of the CS faculty at Virginia Tech. Copyright
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 _______________________.
Chapter 6 Protecting Your Files
Filesystem Management and Backups
Backing up a Hard Disk Windows XP Tutorial 6.
File Managements.
1.2 Types of information storage media
Periodic Processes Chapter 9.
Chapter 10 Archives and Backups.
Presentation transcript:

1 CSC2405: System Administration Week 5 -- Backup what to do? where to? which way? Tools?

Week 5: backup2 Invaluable information  Information stored on the computer always more valuable than the computer itself. data from an experiment which you can not repeat due to the files accidentally deleted nature disaster, fire, flood  Protecting this information is one of the system administrator’s most important tasks tedious not so creative

Week 5: backup3 Backup Policy  Backup is the best way to protect the valuable data. protection against data lose recovery from filesystem damage  A backup policy is a written statement which contains What to backup? Backup strategies Backup devices and media Backup tools

Week 5: backup4 Backup policy: what do backup?  Installed system files executables in /usr, /usr/bin, /lib /usr/lib, etc They never changes or change slowly. Frequent backup is not really necessary.  Local system files resident in /usr/local, extra packages after the basic install  System configuration files /etc, /usr/local, /usr/local/etc,  Service files /var, services such as Web, Mail, News, DNS, NIS, LDAP, database servers  User files /home, personal files of users on the system

Week 5: backup5 Backup strategies  Backup sometimes is very time-consuming. Full backup and incremental backup need to be used accordingly.  Fully backup is to copy all the files on the system onto a tape or other backup media.  An incremental backup contains only those files that have changed since some previous backup. Incremental backups are used when full backups are large and only a small amount of data changes within a given period of time.

Week 5: backup6 Incremental backup level  An incremental backup level is just a numeric value that is arbitrarily assigned by the system administrator. The values for these levels range from 0 to 9, with 0 always being a full backup. Every level-n incremental backup backs up all files changed since the previous backup at a lower level.  A differential backup is a type of incremental backup which only backs up changed files since the last differential backup. Some backup software interpret repeated level 9 backup as `different’ backups.

Week 5: backup7 Design backup strategies  Although site specific, a few basic decisions How often must I do a full backup? How often must I do an incremental backup? How much can I spend on backup media? How far in the past must I store backups? Do I need to store backup only for a full rebuild? or Do I need to recover accidentally deleted files? How confident I am that my backup media will not fail?

Week 5: backup8 Backup examples  A full backup will be carried out every week or every month around the calendar Sun Mon Tues Wed Thur Fri Sat  A more practical backup schedule Sun Mon Tues Wed Thur Fri Sat

Week 5: backup9 A more realistic backup schedule  A backup schedule that uses a new level everyday.  The advantage of this schedule less time and less media  Disadvantage changed files are backed up once need six volume to restore the system on Friday. Sun Mon Tues Wed Thur Fri Sat

Week 5: backup10 Storing backups  Storing backups needs to be on removable media.  There is not much point in storing backups on a second disk if the controller fails.  Storing backups on a separate computer is not a very effective insurance against natural disaster if the backup computer is in the same room.  Companies concerned with the preservation of their backup data will normally store them with a third party that provides magnetically shielded, temperature controlled, humidity controlled storage facilities.

Week 5: backup11 Backup devices and media  Backup devices and features Floppies: small capacity, slow, better for moving data rather than storing data Super Floppies – Iomega’s Zip drive (250MB), larger capacity, faster, but cost more. Better for moving data, a bit wasteful if storing data. CD-R and CD-RW – 700MB, cheap, last long, good for incremental backup. It is time consuming, difficult and also costly for full backup. DVD – 2GB, a bit too costly Removable hard disks – High capacity, good choice for backups. Also faster transferring. Costly drive and costly media.

Week 5: backup12 Tapes and hard drives  Tapes – preferred backup media. largest capacity long lifetime Many formats and tape drives  Exabyte tape drives takes the standard 8mm videotapes. A standard tape can hold 7GB.  DAT: Digital Audio Tape drives are also helical scan devices that use 4mm cartridges. Currently DAT cartridges can hold upto 20GB and have a transfer of 2.5MB/s.  DLT: Digital Liner Tape drives are reliable and affordable and the tape hold upto 40GB, with 6MB/s transfer speed.  Hard drive – viable alternative backup media Not on the same machine

Week 5: backup13 Comparison of backup media MediumCapacitySpeedRelative cost Floppy disk Zip 250 CD-R Jaz Exabyte DAT DLT 2.8MB 250MB 700MB 2GB 7GB 20GB 40GB <100KB/s 900KB/s 2.4MB/s 7.4MB/s 1MB/s 2.5MB/s 6MB/s

Week 5: backup14 Who does Backup  Manual backup used to be the mainstream. Robots were used in some lab. at command is used to do something once for ever.  Backups are periodic process. Periodic execution is normally handled by the cron daemon.  cron starts when the system boots and remaining as long as the system is up. it reads one or more configuration files that contains command lines to execute and the time at which they are to be executed.

Week 5: backup15 cron and crontab  A cron configuration file is called a “crontab” or “cron table” file. stored in /var/spool/cron directory, /etc/cron.d directory, /etc/crontab file A user’s crontab file is stored in the directory /var/spool/cron. A user has at most one crontab file crontab files are named with the login names of the user they belong to.  When cron starts, it reads all of its config files, stores them in memory, and then goes to sleep. Once a minute, cron wakes up, checks the modification times on all the crontab files, reloads any new or changed files, and then executes any tasks scheduled for that minute before returning to sleep.

Week 5: backup16 crontab files  All crontab files share a similar format. Blank lines are ignored all lines who’s first non-blank character is # syntax minute hour monthday month weekday [username] command username field is found only in the /etc/crontab file and the files found in /etc/cron.d directory

Week 5: backup17 Fields in crontab file FieldRangeDescription Minute Hour Monthday Month weekday Minute of the hour Hour of the day Day of the month Month of the year Day of the week  A star, which matches all values for that field  A single integer which matches exactly  A range of values, two integers separated by a bash  A comma-separated list

Week 5: backup18 Examples  The following are valid time specifications for cron * * 1-510:45Am, Monday to Friday 0,30 * * * 5Every half hour on Friday * 0-21/3 1 * *Every third hour on the first day of the month 17 2 * 25 * 12:17AM every 25 th of the month and every Monday

Week 5: backup19 crontab command  As all crontab files are owned by the superuser normal users use a setuid program to edit their own crontab file in the directory /var/spool/cron. crontab allows the user to create or edit their own crontab file.  The option –u to crontab allows “root” to view or edit another user’s crontab file. all users can create crontab files.  Two conf files allow the sysadmin override this policy: /etc/cron.allow and /etc/cron.denu

Week 5: backup20 An important command to backup - find  The find program searches the specified parts of the filesystem for files that match a given criterion.  Backup is to copy all files/filesystems which matches some criterion onto portable media.  The form of command find [path…] [criterion] where path… specifies a list of files to be tested against the criterion

Week 5: backup21 Backup tools  Linux comes with a number of basic backup and restore utilities  dd: very low level command copying bits of information  cpio: high-level, packing data on your backup medium, correcting errors  tar: high-level, packing data and compressing data  dump/restore: incremental backup

Week 5: backup22 dd command  It does not have knowledge of the structure of the data it is coping. dd can copy a single file, a part of file, a raw partition, or a part of a raw partition dd can copy data from stdin to stdout while modifying it en route syntax: dd if=device of=device bs=blocksize. The data is written directly onto the device, not via a filesystem.

Week 5: backup23 dd if=device of=device bs=blocksize  if: specify the input file from which dd is going to copy the data. It can be disk parition, a full disk, a CDROM or a tape device. If not specified, dd reads from stdin.  of: output file to where dd is going to write the data. any devices like if. If not specified, then dd writes to stdout.  bs: specifies the block size, ot the amount of data is to be transferred in one I/O operation.

Week 5: backup24 dd example  Copy all the bytes on a floppy disk to a file on system hard disk called diskette.img dd if=/dev/fd0 of=diskette.img

Week 5: backup25 cpio archiving program  cpio performs three primary functions copying files to an archive extracting files from an archive passing files to another directory tree.  When creating an archive, cpio takes the list of files to be processed from the standard input, then sends the archive to the standard output (or a file or device specified by a cpio option). Usually find is used to provide this list to the standard input of cpio.

Week 5: backup26 cpio syntax and example  syntax copying: cpio –ov > achive extracting: cpio –iv < archive  examples cpio –ov > /dev/st0 < /tmp/list_of_files copying all files whose name in /tmp/list_of_files file to SCSI tape find. –depth print | cpio –ov > dir.cpio find a list of files and then copy them to a file

Week 5: backup27 cpio syntax and example  examples cpio –idv < dir.cpio extract the files from the dir.cpio archive to the current directory. The –d option tells cpio to create directories as they are needed. cpio –ivt < /dev/st0 go back and check the backup by reading the tape and checking the table of contents.

Week 5: backup28 tar - tape archiving  tar was used to store file conveniently on magnetic tape. tar archives are extremely portable between Unix platforms and are readable on other operating systems. syntax create: tar –cvf device pattern extract: tar –xvf device [filename…] you may restore some files from the archive by specifying their filename.

Week 5: backup29 tar examples  If the floppy is really too small for that amount of data but you still want to use diskettes tar –cvMf /dev/fd0 /mydata  To compress data tar –czvf /dev/st0 /mydata  -p option may well be the most important tar option of them all. This tells tar to preserve permissions and ownership information in both backups and restore.  The latest versions of tar will allow the user to specify a file containing a list of file to archieve. find /home –user $USER –depth > file.list tar –zcvf ${SER}.tag –T file.list

Week 5: backup30 a duo of backup  dump/restore are relatively sophisticated backup commands. at most sites, dump/restore are the underlying commands used by automated backup software  dump builds a list of files that have been modified since a previous dump, then packs those files into a single large file to archive on an external device. backups can span multiple tapes files of any type (even devices) can be backed up and restored Permissions, ownership and modification times are preserved. Backups are performed incrementally

Week 5: backup31 dump/restore syntax  dump –level –ffilename filesystem  restore –rf device  examples dump -0uf - /dev/hdb1 | cat > /dev/st0 0: full backup u: to update /etc/dumpdates after it has successfully complete -: redirect to standard out, then use pipe to redirect that to a tape drive.

Week 5: backup32 dump/restore syntax examples dump -1uf - /dev/hdb1 | cat > /dev/st0 level 1 incremental backup restore –rf /dev/st0  must use mke2fs to recreate the file system  cd to that directory

Week 5: backup33 Identity backups  To backup every essential files such as its configuration file is called identity backup. it will collect all the files that make you put- together server unique among all other put- together servers.  You can reinstall Linux from the CD-ROM in minutes, but getting everything just right might take a little longer than that and users want their and Internet access yesterday.

Week 5: backup34 identity backup script  On this server of yours, you may be running diald, fetchmail, IP asquerading, and .  using the –p flag on mkdir to save create entire subdirectory in one pass  you could tar the whole thing to a floppy and save yourself a step. Alternatively, you can ftp the file to another server, a Window PC or to your own server.