Backup and Recovery Flashcards

1
Q

What is Backup?

A

A Backup of a database is a representative copy of data containing all necessary
contents of a database such as data files and control files

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

two major types of backup?

A

Physical Backup: A copy of physical database files such as data, control files,
log files, and archived redo logs.
▷ Logical Backup: A copy of logical data that is extracted from a database
consisting of tables, procedures, views, functions, etc

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is recovery?

A

Recovery is the process of restoring the database to its latest known consistent state
after a system failure occurs.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is a Database Logs?

A

◦ A Database Log records all transactions in a sequence. Recovery using logs is quite
popular in databases
◦ A typical log file contains information about transactions to execute, transaction
states, and modified values

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What situations warrant Backup?

A

Disaster Recovery
Client Side Changes
Auditing
Downtime

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What are the Types of Backup Data?

A
  1. Business Data
  2. System Data (Environment/ configuration)
  3. Media
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What are the types of Backup Strategies

A
  1. Full Backup
  2. Incremental Backup
  3. Differential Backup
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is Full Backup?

A
  • Full Backup backs up everything. This is a complete copy, which stores all the objects
    of the database: tables, procedures, functions, views, indexes etc. Full backup can
    restore all components of the database system as it was at the time of crash.
  • A full backup must be done at least once before any of the other type of backup
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is Incremental Backup?

A

Incremental backup targets only those files or items that have changed since the last
backup. This often results in smaller backups and needs shorter duration to complete
the backup process.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is Differential Backup?

A

Differential backup backs up all the changes that have occurred since the most recent
full backup regardless of what backups have occurred in between

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is Hot Backup?

A

Hot backup refers to keeping a database up and running while the backup is
performed concurrently

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is transaction logging?

A
  • Transactional Logging is used in circumstances where a possibly inconsistent backup is taken, but another file generated and backed up (after the database file has been
    fully backed up) can be used to restore consistency.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What are hot backup maiinly used for?

A

In regular database systems, hot backup is mainly used for Transaction Log Backup.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What are cold backup strategies and when are they preferred?

A

Cold backup strategies like Differential, Incremental are preferred for Data backup.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What are the various failure classifications?

A
  1. Transactional Failure (a. Logical Errors, b. System Errors)
  2. System Crash (Fail-Stop Assumption)
  3. Disk Failure
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What are recovery algorithms and what does it consist of?

A

Recovery algorithms have two parts
a. Actions taken during normal transaction processing to ensure enough info exists to recover from failures.
b. Actions taken after a failure to recover the database contents to a state that ensures atomicity, consistency and durability.

17
Q

Types of Storage Structure?

A
  1. Volatile Storage
  2. Non-volatile storage
  3. Stable Storage(mythical, maintain multiple copies,basically a RAID system)
18
Q

What are some of the recovery mechanism?

A
  1. Log based recovery system.
  2. Shadow paging method.
19
Q

What is a log record?

A

The log is a sequence of log records, which maintains information about updateactivities on the database.
When transaction Ti starts, it registers itself by writing a record < Ti start > to the log
* Before Ti executes write(X), a log record < Ti
, X, V1, V2 > is written, where V1 is the
value of X before the write (old value), and V2 is the value to be written to X (new
value)
* When Ti finishes its last statement, the log record < Ti commit > is written

20
Q

What are the types of database modification schemes?

A

The immediate-modification scheme allows updates of an uncommitted transaction to be made to the buffer, or the disk itself, before the transaction commits.

The deferred-modification scheme performs updates to buffer/disk only at the time of transaction commit

21
Q

When are the undo and redo operations used?

A

The undo and redo operations are used in several different circumstances:
◦ The undo is used for transaction rollback during normal operation
▷ in case a transaction cannot complete its execution due to some logical error
◦ The undo and redo operations are used during recovery from failure

22
Q

How are log based transaction roll backs done normally?

A

Let Ti be the transaction to be rolled back
* Scan log backwards from the end, and for each log record of Ti of the form < Ti, Xj, V1, V2 >
◦ Perform the undo by writing V1 to Xj,
◦ Write a log record < Ti , Xj, V1 >
▷ such log records are called Compensation Log Records
* Once the record < Ti start> is found stop the scan and write the log record < Ti abort>

23
Q

What is repeating history?

A

such a redo redoes all the original actions including the steps that restored old value – Known as Repeating History

24
Q

What is checkpointing?

A

Streamline recovery procedure by periodically performing checkpointing
* All updates are stopped while doing checkpointing
a) Output all log records currently residing in main memory onto stable storage
b) Output all modified buffer blocks to the disk
c) Write a log record < checkpoint L > onto stable storage where L is a list of all transactions active at the time of checkpoint

25
Q
A