Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Linux System BackUp and Recovery Notes, Study notes of Network and System Administration

At the conclusion of this module, the student will be able to: • describe the necessity for creating a backup regimen • describe the advantages and disadvantages of the most commonly used backup devices • describe the basic syntax and usage of the dump and restore commands

Typology: Study notes

2016/2017

Uploaded on 12/12/2017

prateek-jain-1
prateek-jain-1 🇮🇳

5

(3)

2 documents

1 / 11

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Backup Linux System Administration
1
Linux System Administration
System Backup Strategies
Backup Linux System Administration 2
Objective
At the conclusion of this module, the student will be able to:
describe the necessity for creating a backup regimen
describe the advantages and disadvantages of the most
commonly used backup devices
describe the basic syntax and usage of the dump and restore
commands
•use the dump command to archive a filesystem
explain the limitations of the dump command and precautions
for its use
describe the advantages of different backup sequences
restore an individual file from a filesystem archive
restore an entire filesystem from an archive
describe various archiving options available on UNIX systems
pf3
pf4
pf5
pf8
pf9
pfa

Partial preview of the text

Download Linux System BackUp and Recovery Notes and more Study notes Network and System Administration in PDF only on Docsity!

Linux System Administration

System Backup Strategies

Backup Linux System Administration 2

Objective

At the conclusion of this module, the student will be able to:

  • describe the necessity for creating a backup regimen
  • describe the advantages and disadvantages of the most

commonly used backup devices

  • describe the basic syntax and usage of the dump and restore

commands

  • use the dump command to archive a filesystem
  • explain the limitations of the dump command and precautions

for its use

  • describe the advantages of different backup sequences
  • restore an individual file from a filesystem archive
  • restore an entire filesystem from an archive
  • describe various archiving options available on UNIX systems

Backup Linux System Administration 3

Designing a Backup Strategy

  • In designing a backup strategy, we should ask:
    1. What happens if I loose my data?
      • For a bank consider what happens if they lose an atm withdrawal?
    2. How long can we afford to be down if we have to recover data from archive?
    3. Could our organization function if we were down for a day or more while data is restored?
  • If you must have guaranteed access to data you might

consider using some form of RAID disk storage

  • RAID storage, coupled with optical or tape backup can

deliver almost continuous uptime

Backup Linux System Administration 4

Backup Responsibility

  • It is necessary to develop a thorough, and easily maintained backup procedure
  • The first step in designing a backup strategy is to create a written policy that specifies: - who is responsible for ensuring that backups occur - what file systems and files need regular archiving - Anything that is mission critical for the organization should be backed up regularly - when backups be performed - Backups should be conducted during slow hours because most backup programs will not properly archive a file if it is in use - The policy should specify a backup time and all users should know the schedule - where the backup tapes and media should be stored - This should be a secure, cool, and dry place - Some critical backups should be stored off campus - which systems need backing up - Decide which systems require a regular backup and the frequency - what type of media should be used for backing up - how to backup

Backup Linux System Administration 7

Backup Strategy

  • Incremental
    • This is more a complex method
    • uses several sets of tapes to archive only those files with newer created or modified dates since the last backup
    • A new tape is used for each backup
    • Each new tape contains only files created or changed on the day of the backup
    • When restoring, we must use the archival tape, then restore each tape for each day
    • This option allows us to spend the least time backing up, but requires the most time when restoring
    • Incremental backups pose the threat of operator error
  • Network backup
    • backing up filesystems from one machine onto a backup device connected to another machine
    • referred to as a remote or network backup

Backup Linux System Administration 8

Disk Mirroring

  • Disk Mirroring
    • duplicates everything on one drive to another drive
    • It is usually common for a system of this type to update the duplicate drive continuously with the most current information - With RAID 1, the duplicate drive is written at the same time as the original - This reduces or eliminates the recovery time in case of a disaster
    • Many popular repositories of shareware and free software, like Tucows, uses disk mirroring
    • It also reduces incoming traffic since users can visit a local mirror (in New Jersey, one of the Tucows mirrors is at Rutgers) to download software

Backup Linux System Administration 9

Comparison of Backup Media

Backup Linux System Administration 10

Types of Backup Devices and Media

  • Tapes
    • Tapes remain the most common archiving media
    • Earlier, 9-mm tapes were the most common tape media, but 4- and 8-millimeter Digital Audio Tape (DAT) cartridges, about the size of an audiocassette, are now standard
    • tape carts can hold from 20GB to 400GB
  • CD-ROMs
    • Re-writable CD-ROMs have become popular
    • Highly secure or frequently hacked sites use read-only CD ROMS to store log files
    • A CD jukebox contains multiple read-write drives and disks, which can then store up to five stacks of 100 CDs
    • can back up multiple machines across a network
  • DVD-ROMs
    • Similar to CD’s except each disk stores much more data
    • some DVD Jukebox systems can hold up to 200 disks, and can write either CDs or DVDs
  • Other Archiving Media
    • SyQuest drives, Iomega ZIP, and JAZ drives can also be used
    • Optical disks are similar to CDs, but they store from 100 MB to 1 GB per disk
    • Firewire and USB or removable hard drives are also a possibility.

Backup Linux System Administration 13

Common dump Options

Option/Meaning /Type f Name of device to write to supply a filename d specifies tape density

Recent versions of dump can autodetect tape lengths and density Depends on density. For 8-mm, 42500, or 1000 when used with the c option. 0-9 specifies the dump level

The 0 option creates a full backup, while a 9 creates an incremental backup dump uses a zero-based count, which means that it begins counting at 0, not at 1 If we do not specify a level, dump defaults to 9 u Updates /etc/dumpdates n Send a message when finished

Backup Linux System Administration 14

Common restore Options

-I Launches restore in interactive mode

-f Specifies the device to use

If not specified, the default setting applies

-r Restores the entire archive

-x Restores only specified files

-R Reads from a particular tape in a multivolume sequence

-s Selects the specific backup tape (for use on jukeboxes) used

with R option

-t Lists the contents of the archive tape

-v Verbose method

Backup Linux System Administration 15

Archiving the filesystem

  • When we dump the filesystem, we must specify
    • the dump level
      • specify epochal, differential, or incremental backup
    • the device where we wish to put the archive
    • the file system to back up
  • The table shows the special file name corresponding to a tape

drive for various Linux/UNIX systems

  • System File name
  • AIX /dev/rfd
  • IRIX /dev/tape
  • HP-UX /dev/rmt/
  • Linux /dev/tape
  • Solaris /dev/rmt
  • BSD ../devices/pseudo/dump@0:dump

Backup Linux System Administration 16

Red Hat dump Example

  • dump 0uf /dev/rft0 /dev/hda
    • 1 5 3 4 2

1. Specifies the entire filesystem (level 0 )

2. on /dev/hda

3. should be backed up to mag tape ( f option combined with

destination device)

4. at /dev/rft

5. and that the dumpdate ( u option) should be written to

/etc/dumpdates

Backup Linux System Administration 19

Backups with tar

  • tar is a versatile and popular tape archive command
  • It may be used to produce archived backups on floppies or

tapes, restores backups, and can be used by non-root users

with read and write permissions

  • The tar syntax is simpler that cpio , but it does not copy

special files or empty directories

  • Restoring individual files is much easier than with cpio
    • you can start restoring from the volume that contains your wanted file
  • We can define the name and characteristics of your default

backup device in a file called /etc/default/tar

  • This file can hold several such devices, which may be selected

via the command line

Backup Linux System Administration 20

Backup Options with tar

assign /dev/tape

tar cvfk /dev/tape 1440 chap*

The example here lists the c, v, f, k options

  • c - creates a new archive file and starts writing at the

beginning

  • v verbose option causes tar to display filenames as they are

archived

  • f takes the /dev/tape argument as the target archive name
    • Without this option, tar takes the default from a device name stored in /etc/default/tar
    • also stores defaults such as blocking factor and volume size tar can also read and write from standard input and output which is useful for piping

Backup Linux System Administration 21

tar Option Syntax

  • The first option letter must be either r, x, t, u, or c with no

hyphens

  • This first letter can be followed by one or more function

modifiers with no intervening spaces or hyphens

c vf (no hyphen before the c, vf are function modifiers

  • Function modifiers need their arguments listed after the group

of option letters in the correct sequence

  • In the following example, the option letter c is followed by

two modifiers f and k

f takes the argument /dev/tape

k takes the argument 1440

tar cvfk /dev/tape 1440 chap*

Backup Linux System Administration 22

AMANDA

  • AMANDA - Advanced Maryland Automatic Network Disk

Archiver - from the University of Maryland is a popular

backup and restore solution

  • The AMANDA server manages a pool of backup media and

rotates usage through the pool

  • This ensures that all backups are retained for the administrator

specified retention period

  • All media is preformatted with data that allows AMANDA to

detect whether or not the proper media is available

  • AMANDA can be interfaced with robotic media changing

units, making it possible to completely automate backups

  • See http://www.backupcentral.com/amanda.html