Unit Two Database Back Up
Unit Two Database Back Up
Methods
Course Outline
Lesson 4. • RAID
2
Methods
for back-up
and recovery
We will cover these skills:
1. Types of Backup
3
Introduction to Backup
4
The most common type of database
backups
Logical Backup_ Physical Backup
Definition: Captures data at the logical Definition: Captures the entire database
level, such as tables, rows, and columns. at the storage level, including data files,
Format: Typically stored in formats like log files, and configuration settings.
SQL scripts or CSV files. Format: Stored as binary files or
Content: Includes data and schema snapshots of the storage used by the
definitions (e.g., table structures, database.
constraints). Content: Includes everything needed to
Use Case: Ideal for migrating data restore the database to a specific state,
between different systems, performing including all data and metadata.
upgrades, or selectively restoring parts of Use Case: Suitable for full system
the database. recovery, disaster recovery, or when a
Restoration: Data is restored by executing quick restoration is needed.
the logical scripts, which can be slower Restoration: Typically faster since it
and may require re-creation of indexes involves copying files directly back to
and constraints. their original locations.
5
Full Backup
6
Incremental Backup
Description: Backs up only the data that has changed since the last
backup (either full or incremental).
Advantages: Faster and requires less storage compared to full
backups.
Disadvantages: Restoration can be complex, as it requires the last full
backup and all subsequent incremental backups.
7
Differential Backup
Description: Backs up all data that has changed since the last full
backup.
Advantages: Easier to restore than incremental backups, as it only
requires the last full backup and the latest differential backup.
Disadvantages: Takes longer and uses more storage than incremental
backups as time progresses.
8
Mirror Backup
9
Continuous Data Protection (CDP)
11
Off-line back-ups
12
On-line file back-ups
It is also called a hot backup or dynamic backup.
A hot backup is a backup performed while the database is open and
available for use (read and write activity). It is performed in near
real-time when the systems are up and running, and new data is
continuously generated or captured.
13
Off-site back-up files
14
Advantages and disadvantages
Offsite Storage
Advantages
Scalability:. The cloud provider or managed service provider is responsible
for offering storage that can be expanded on demand.
Cost & Value: Offsite and cloud storage is extremely affordable; in most
circumstances, you only pay for what you use. There is no initial outlay for
expensive storage platforms and no additional maintenance or support
contracts.
Fast Deployment: With offsite cloud storage, the infrastructure is already
in place, and the platform is already available to use.
There is no waiting for purchasing and installation of hardware and the
client can simply plug into the cloud storage and get started immediately.
15
Managed Storage Service:
Connectivity:
Performance:
16
• Disadvantages
18
Onsite Backup
19
Advantages of onsite storage:
20
Hybrid storage
21
Disk mirroring
22
RAID
23
There are 7 levels of RAID schemes.
RAID level 0 provides data stripping, i.e., a data can place across
multiple disks. It is based on stripping that means if one disk fails then
all data in the array is lost. This level doesn't provide fault tolerance but
increases the system performance.
Pros of RAID 0:
- In this level, throughput is increased because multiple data
requests probably not on the same disk.
- This level full utilizes the disk space and provides high
performance.
- It requires minimum 2 drives.
Cons of RAID 0:
- It doesn't contain any error detection mechanism.
- The RAID 0 is not a true RAID because it is not fault-tolerance.
- In this level, failure of either disk results in complete data loss in
respective array.
25
RAID 1
This level is called mirroring of data as it copies the data from drive 1
to drive 2. It provides 100% redundancy in case of a failure. Only half
space of the drive is used to store the data. The other half of drive is
just a mirror to the already stored data.
Pros of RAID 1:
- The main advantage of RAID 1 is fault tolerance. In this level,
if one disk fails, then the other automatically takes over.
- In this level, the array will function even if any one of the
drives fails.
Cons of RAID 1:
- In this level, one extra drive is required per drive for
mirroring, so the expense is higher.
26
RAID 2
RAID 2 consists of bit-level striping using hamming code parity. In this
level, each data bit in a word is recorded on a separate disk and ECC
code of data words is stored on different set disks. Due to its high
cost and complex structure, this level is not commercially used. The
same performance can be achieved by RAID 3 at a lower cost.
Pros of RAID 2:
- This level uses one designated drive to store parity.
- It uses the hamming code for error detection.
Cons of RAID 2:
- It requires an additional drive for error detection.
27
RAID 3
29
2.7.6. RAID 5
Backup 3 All data All data Selected Changes from backup 2 Changes from backup 1
Backup 4 All data All data Selected Changes from backup 3 Changes from backup 1
33
From these types of backup, it is possible to develop an approach for
comprehensive data protection. An organization often uses one of the
following backup settings:
• Full daily
• Full weekly + differential daily
• Full weekly + incremental daily
34
Self-check 2
Part-I multiple choice
1. Backing up the data to a server which is geographically separated from a production systems.
A. Online B. Offline C. Offsite D. Onsite
2. A mix of offsite and onsite storage approaches for the benefit of completeness.
A. Dynamic B. Hybrid C. Cloud D. Cold
3. One is not the advantages of onsite backup
A. May be destroyed during a catastrophic event C. Control of your own data security
B. Immediate access to data D. Less expensive
4. Which RAID level is called a mirroring of data?
A.RAID 0 B. RAID 1 C. RAID 2 D. RAID 7 E. All level
5. How many disk drives are required to implement disk mirroring?
A. At least two physical drives.
B. At least one disk drive and two logical drives
C. At least two logical drives
D. None
6. Which one of the following statement is incorrect about RAID?
B. It contains a set of physical disk drives.
C. The operating system views these separate disks as a single logical disk.
D. Data is distributed across the physical drives of the array.
E. None
35
Part-II Give short answer
1. List and explain Types of backup?
2. Write the difference between hot and cold backup?
3. List the Advantages and Dis advantages of Full backup
36
The end of chapter Two !!!!!
37