Advanced SUSE Linux Enterprise Server Administration (Course 3038) Chapter 5 Manage Backup and Recovery



Similar documents
Managing Data Protection

RH033 Red Hat Linux Essentials or equivalent experience with Red Hat Linux..

Acronis True Image 9.1 Pro/Light for Linux

Restoring a Suse Linux Enterprise Server 9 64 Bit on Dissimilar Hardware with CBMR for Linux 1.02

How to Restore a Linux Server Using Bare Metal Restore

Protecting SQL Server Databases Software Pursuits, Inc.

Red Hat Linux Administration II Installation, Configuration, Software and Troubleshooting

GLS250 "Enterprise Linux Systems Administration"

How To Manage Your Volume On Linux (Evms) On A Windows Box (Amd64) On A Raspberry Powerbook (Amd32) On An Ubuntu Box (Aes) On Linux

Symantec System Recovery 2013 User's Guide. Linux Edition

System Administration. Backups

ENTERPRISE LINUX SYSTEM ADMINISTRATION

Planning for an Amanda Disaster Recovery System

The Linux System. o Updating without touching the user's files and configurations.

HARFORD COMMUNITY COLLEGE 401 Thomas Run Road Bel Air, MD Course Outline CIS INTRODUCTION TO UNIX

Oracle VM Server Recovery Guide. Version 8.2

GL-250: Red Hat Linux Systems Administration. Course Outline. Course Length: 5 days

USTM16 Linux System Administration

Table of Contents. Online backup Manager User s Guide

Linux System Administration on Red Hat

Linux Embedded devices with PicoDebian Martin Noha

A candidate following a programme of learning leading to this unit will be able to:

BACKUP YOUR SENSITIVE DATA WITH BACKUP- MANAGER

Updates Click to check for a newer version of the CD Press next and confirm the disc burner selection before pressing finish.

Installing a Second Operating System

Abstract. Microsoft Corporation Published: August 2009

Novell Identity Manager Resource Kit

Quick Start Guide. Version R91. English

PARALLELS SERVER 4 BARE METAL README

Acronis True Image 9.1 Pro/Light for Windows

WES 9.2 DRIVE CONFIGURATION WORKSHEET

Amanda The Open Source Backup & Archiving Software. Ian Turner ian@zmanda.com 11 April Copyright 2006 Zmanda, Inc. All rights reserved.

Introduction to AIX 6L System Administration Course Summary

Cristie Bare Machine Recovery. User Guide. For Linux. April Version Cristie Data Products GmbH Nordring 53-55

Chapter Contents. Operating System Activities. Operating System Basics. Operating System Activities. Operating System Activities 25/03/2014

Intelligent disaster recovery. Dell DL backup to Disk Appliance powered by Symantec

BACKUP SECURITY GUIDELINE

NetVanta Unified Communications Server Backup and Restore Procedures

UltraBac Documentation. UBDR Gold. Administrator Guide UBDR Gold v8.0

USB Bare Metal Restore: Getting Started

Vess A2000 Series. NVR Storage Appliance. Windows Recovery Instructions. Version PROMISE Technology, Inc. All Rights Reserved.

RHCSA 7RHCE Red Haf Linux Certification Practice

Backing Up TestTrack Native Project Databases

Linux Disaster Recovery best practices with rear

MapGuide Open Source Repository Management Back up, restore, and recover your resource repository.

: HP HP Version : R6.1

NovaBACKUP. User Manual. NovaStor / November 2011

Dell NetVault Bare Metal Recovery User s Guide

Linux Backups. Russell Adams Linux Backups p. 1

Data storage, backup and restore

PARALLELS SERVER BARE METAL 5.0 README

Rev C. DBDS Backup and Restore Procedures For System Release 2.2 Through 4.3

User Guide. Laplink Software, Inc. Laplink DiskImage 7 Professional. User Guide. UG-DiskImagePro-EN-7 (REV. 5/2013)

Training on Linux System Administration, LPI Certification Level 1

Backing up the Embedded Oracle database of a Red Hat Network Satellite

IBM Rapid Restore PC powered by Xpoint - v2.02 (build 6015a)

Redundant Array of Inexpensive/Independent Disks. RAID 0 Disk striping (best I/O performance, no redundancy!)

SUSE LINUX Enterprise Server for SGI Altix Systems

Version: Page 1 of 5

When Bad Things Happen to Good Amanda Backup Servers

This appendix describes the following procedures: Cisco ANA Registry Backup and Restore Oracle Database Backup and Restore

Online Backup Client User Manual Linux

Using Symantec NetBackup with Symantec Security Information Manager 4.5

Support Notes for SUSE LINUX Enterprise Server 9 Service Pack 3 for the Intel Itanium 2 Processor Family

Hyper-V backup implementation guide

StarWind iscsi SAN Software: Implementation of Enhanced Data Protection Using StarWind Continuous Data Protection

HP One-Button Disaster Recovery (OBDR) Solution for ProLiant Servers

Red Hat System Administration 1(RH124) is Designed for IT Professionals who are new to Linux.

Oracle Linux 7: System Administration Ed 1 NEW

Cisco Networking Academy Program Curriculum Scope & Sequence. Fundamentals of UNIX version 2.0 (July, 2002)

How to backup and restore the Virtual I/O Server

NSave Table of Contents

Linux Disaster Recovery best practices with rear

A+ Guide to Software: Managing, Maintaining, and Troubleshooting, 5e. Chapter 3 Installing Windows

TimeIPS Server. IPS256T Virtual Machine. Installation Guide

Symantec NetBackup Backup, Archive, and Restore Getting Started Guide. Release 7.5

Actualtests.com - The Power of Knowing

Red Hat Certifications: Red Hat Certified System Administrator (RHCSA)

Yiwo Tech Development Co., Ltd. EaseUS Todo Backup. Reliable Backup & Recovery Solution. EaseUS Todo Backup Solution Guide. All Rights Reserved Page 1

Symantec NetBackup for Lotus Notes Administrator's Guide

4 Backing Up and Restoring System Software

Moving the Web Security Log Database

Symantec Backup Exec 2014 Icon List

Sophos Anti-Virus for Linux configuration guide. Product version: 9

Library Recovery Center

Managing and Maintaining a Windows Server 2003 Network Environment

Moving the TRITON Reporting Databases

HP-UX System and Network Administration for Experienced UNIX System Administrators Course Summary

NovaBACKUP. User Manual. NovaStor / May 2014

Linux System Administration. System Administration Tasks

DigiVault Online Backup Manager. Microsoft SQL Server Backup/Restore Guide

Using iscsi with BackupAssist. User Guide

Program Update IPedge Feature Description IPedge Feature Desc. 8/2/13

Backup of ESXi Virtual Machines using Affa

Deploying IBM Lotus Domino on Red Hat Enterprise Linux 5. Version 1.0

Acronis True Image 2015 REVIEWERS GUIDE

Sophos Anti-Virus for Linux user manual

1. Product Information

Transcription:

Advanced SUSE Linux Enterprise Server Administration (Course 3038) Chapter 5 Manage Backup and Recovery

Objectives Develop a Backup Strategy Create Backup Files with tar Work with Magnetic Tapes Copy Data with the dd Command Advanced SUSE Linux Enterprise Server Administration (Course 3038) 2

Objectives (continued) Mirror Directories with the rsync Command Automate Data Backups with the cron Service Troubleshoot the Boot Process of a SLES 9 System Configure and Install the GRUB Boot Loader Advanced SUSE Linux Enterprise Server Administration (Course 3038) 3

Develop a Backup Strategy Objectives Choose a Backup Method Choose the Right Backup Media Advanced SUSE Linux Enterprise Server Administration (Course 3038) 4

Choose a Backup Method Full backup Best possible method of data backup All system data is copied to a backup media once a day To restore data Most current backup media is copied back to the system s hard disk Disadvantage Time frame available to perform backups (Backup window) Perform backups when the system is not used Advanced SUSE Linux Enterprise Server Administration (Course 3038) 5

Choose a Backup Method (continued) Perform an incremental backup Perform a full backup once a week Then you perform a backup every day That copies only files that have changed since the backup the day before Advantage Backup window can be much smaller Disadvantage Recovery time is longer Advanced SUSE Linux Enterprise Server Administration (Course 3038) 6

Choose a Backup Method (continued) Perform a differential backup Perform a full backup once a week Then you perform backups every day To record files that have changed since the last full backup Advantage To restore data from a differential backup, you need just two backup media Disadvantage Amount of data to be backed up grows every day Advanced SUSE Linux Enterprise Server Administration (Course 3038) 7

Choose a Backup Method (continued) Advanced SUSE Linux Enterprise Server Administration (Course 3038) 8

Choose the Right Backup Media Tape drives are used most often They still have the best price-to-capacity ratio Normally these are SCSI drives Other media for data backup include Writable CDs or DVDs, removable hard drives, and magnetic-optical (MO) drives Storage Area Networks (SANs) are also used SAN often uses magnetic tapes to store the data Store backup media separately from backed up systems Store sensitive backup media offsite Advanced SUSE Linux Enterprise Server Administration (Course 3038) 9

Create Backup Files with tar Objectives Create tar Archives Unpack tar Archives Exclude Files from Backup Perform Incremental and Differential Backup Use tar Command-Line Options Advanced SUSE Linux Enterprise Server Administration (Course 3038) 10

Create tar Archives tar format Container format for files and directory structures Extension of the archive files end in.tar Normally data in the archive files is not compressed You can use additional compression commands Directories are typically backed up with tar -cvf /backup/etc.tar /etc tar -cvf /dev/st0 /home View the contents of an archive by entering tar -tvf /backup/etc.tar Advanced SUSE Linux Enterprise Server Administration (Course 3038) 11

Unpack tar Archives Unpack files from an archive tar -xvf /dev/st0 Extract just one file tar -xvf /test1/backup.tar -C /home/user1/.bashrc Advanced SUSE Linux Enterprise Server Administration (Course 3038) 12

Exclude Files from Backup List of these files must be written in an exclude file Line by line List is then passed to tar with the option -X tar -cvf /dev/st0 /home -X exclude.files Advanced SUSE Linux Enterprise Server Administration (Course 3038) 13

Perform Incremental and Differential Backups Use a snapshot for incremental backups Make a full backup with a tar command tar -cz -g /backup/snapshot_file -f /backup/backup_full.tar.gz /home Perform an incremental backup tar -cz -g /backup/snapshot_file -f /backup/backup_mon.tar.gz /home Use the find command to search for files to back up Make a full backup tar -czf /backup/backup_full.tar.gz /home Back up all files that are newer than the full backup find /home -type f -newer /backup/backup_full.tar.gz -print0 tar -- null -cvf /backup/backup_mon.tar.gz -T - Advanced SUSE Linux Enterprise Server Administration (Course 3038) 14

Use tar Command-Line Options Advanced SUSE Linux Enterprise Server Administration (Course 3038) 15

Exercise 5-1 Create Backup Files with tar In this exercise, you will do the following: Part I: Create a Full Backup Part II: Create an Incremental Backup Advanced SUSE Linux Enterprise Server Administration (Course 3038) 16

Work with Magnetic Tapes Command mt Positions tapes Switches compression on or off Queries the tape status Magnetic tape drives are always SCSI devices /dev/st0 /dev/nst0 Query status of the tape mt -f /dev/st0 status Advanced SUSE Linux Enterprise Server Administration (Course 3038) 17

Work with Magnetic Tapes (continued) Position the tape at the beginning of the next file mt -f /dev/nst0 fsf 1 Spool the tape back to the beginning mt -f /dev/nst0 rewind Eject the tape from the drive mt -f /dev/nst0 offline Check whether data compression is switched on or off mt -f /dev/st0 datcompression Advanced SUSE Linux Enterprise Server Administration (Course 3038) 18

Copy Data with the dd Command Command dd Converts and copies files byte-wise Can copy all kinds of data Including entire hard disk partitions Copy a file dd if=/etc/protocols of=protocols.org Copy a complete partition dd if=/dev/sda1 of=boot.partition Create a backup copy of the MBR dd if=/dev/sda of=/tmp/mbr_copy bs=512 count=1 Advanced SUSE Linux Enterprise Server Administration (Course 3038) 19

Exercise 5-2 Create Drive Images with dd In this exercise, you use dd to create a drive image Advanced SUSE Linux Enterprise Server Administration (Course 3038) 20

Mirror Directories with the rsync Command Objectives Perform Local Copying with rsync Perform Remote Copying with rsync Advanced SUSE Linux Enterprise Server Administration (Course 3038) 21

Perform Local Copying with rsync Mirror all home directories rsync -a /home /shadow Mirror the content of a directory and not the directory itself rsync -a /home/. /shadow Exclude files from backup rsync -a --exclude-from=/home/exclude /home/. /shadow/home Advanced SUSE Linux Enterprise Server Administration (Course 3038) 22

Perform Local Copying with rsync (continued) Advanced SUSE Linux Enterprise Server Administration (Course 3038) 23

Perform Remote Copying with rsync With rsync and SSH Log in to other systems Perform data synchronization remotely over the network Copy home directory of the user tux to a backup server rsync -ave ssh root@da1:/home/tux /backup/home/ Backup of the home directory is copied back to the DA1 system rsync -ave ssh /backup/home/tux root@da1:/home/ Advanced SUSE Linux Enterprise Server Administration (Course 3038) 24

Exercise 5-3 Create a Backup of a Home Directory with rsync In this exercise, you will do the following Part I: Perform a Local Backup with rsync Part II: Perform a Remote Backup with rsync Advanced SUSE Linux Enterprise Server Administration (Course 3038) 25

Automate Data Backups with the cron Service Automate backups in Linux with the cron service System jobs are controlled with the file /etc/crontab And the files in the directory /etc/cron.d System jobs are defined using scripts in directories /etc/cron.(hourly, daily, weekly, and monthly) Specify which users can create cron jobs with /var/spool/cron/allow and /var/spool/cron/deny Jobs of individual users Stored in files in the directory /var/spool/cron/tabs Processed with the command crontab Advanced SUSE Linux Enterprise Server Administration (Course 3038) 26

Exercise 5-4 Configure a cron Job for Data Backup In this exercise, you use cron for data backup Advanced SUSE Linux Enterprise Server Administration (Course 3038) 27

Troubleshoot the Boot Process of a SLES 9 System Objectives System Boot Process Issues How to Boot a Corrupted System Directly into a Shell How to Boot a Corrupted System with the Installation Media How to Start and Use the SLES9 Rescue System Advanced SUSE Linux Enterprise Server Administration (Course 3038) 28

System Boot Process Issues Most common problems: The system cannot boot due to a misconfigured boot loader The system cannot boot because of file system corruption An init script has malfunctioned and is blocking the boot process The system does not start correctly because of hardware changes Access the file system of the corrupted system To detect and fix the problem Advanced SUSE Linux Enterprise Server Administration (Course 3038) 29

How to Boot a Corrupted System Directly into a Shell Boot screen of the GRUB boot loader Lets you pass parameters that modify the Linux kernel Before the kernel is actually loaded Use the Boot Options field At the bottom of the GRUB boot screen Boot parameter init=new_init_program Changes the first program loaded by the kernel To boot to a shell use init=/bin/bash Advanced SUSE Linux Enterprise Server Administration (Course 3038) 30

How to Boot a Corrupted System with the Installation Media Steps Insert the SLES 9 DVD and reboot the system Select Installation; then press Enter When YaST displays the language selection dialog box, select Accept Select Boot installed system; then select OK Select the root partition of the system you would like to boot; then select Boot Advanced SUSE Linux Enterprise Server Administration (Course 3038) 31

How to Start and Use the SLES 9 Rescue System Steps Insert the SLES 9 DVD and reboot the system From the boot menu, select Rescue System; then press Enter From the language selection dialog box, select your language; then press Enter At the prompt Rescue login, enter root Press the Enter key You are now logged into the Rescue System as root Mount the corresponding partition mount -t reiserfs /dev/hda6 /mnt Advanced SUSE Linux Enterprise Server Administration (Course 3038) 32

Configure and Install the GRUB Boot Loader Objectives The Basic Functionality of a Boot Loader The Basics of GRUB How to Configure the GRUB Boot Loader Advanced SUSE Linux Enterprise Server Administration (Course 3038) 33

The Basic Functionality of a Boot Loader Basic tasks of a boot loader: Boot various operating systems Pass boot parameters to the Linux kernel Stages Stage 1 Program code for stage 1 is installed in the master boot record (MBR) of the hard disk Stage 2 Usually contains the actual boot loader Files of boot loader are located in the directory /boot Advanced SUSE Linux Enterprise Server Administration (Course 3038) 34

The Basics of GRUB GRUB is the standard boot loader of SLES 9 Features Stage 2 File System Drivers Includes file system drivers for ReiserFS, ext2, ext3, Minix, JFS, XFS, FAT, and FFS (BSD) GRUB Shell Enables interactive control of the boot manager Advanced SUSE Linux Enterprise Server Administration (Course 3038) 35

How to Configure the GRUB Boot Loader Edit the file /boot/grub/menu.lst Structure of the file General options are listed Options for the various operating systems Example That can be booted with the boot manager Advanced SUSE Linux Enterprise Server Administration (Course 3038) 36

Exercise 5-5 Boot to a Shell and Configure the GRUB Boot Loader In this exercise, you will do the following: Part I: Boot the Rescue System Part II: Edit and Test the GRUB Configuration File Advanced SUSE Linux Enterprise Server Administration (Course 3038) 37

Summary You should carefully develop a backup strategy Full backups take a great deal of time to perform They are typically combined with incremental and differential backups Use the tar command to create full, incremental, and differential backups Manage tape media with the mt command Use the cron service To schedule tasks to occur repetitively in the future Advanced SUSE Linux Enterprise Server Administration (Course 3038) 38

Summary (continued) You may temporarily boot your Linux system using a GRUB boot parameter Or by booting from your SLES DVD and choosing the appropriate options GRUB is the default boot loader in SLES It is configured using the /boot/grub/menu.lst file Advanced SUSE Linux Enterprise Server Administration (Course 3038) 39