Using backups for complete recovery

Assignment Help Basic Computer Science
Reference no: EM13919719

iLab 4: Using Backups for Complete Recovery

Scenario and Summary

Successful database recovery relies on the database being backed. This is what enables the database to recover data that were lost due to a media failure, loss of power, or any other type of disaster. Each time the online line redoes logs filled up in a log group, the DBMS issues a log switch that will move the log writer process from the current redo log group to the next one in line. The archive background process begins archiving the data in the full online log group files to the archive log files. This is done simultaneously for each log file in the group. If media recovery is needed at the time that the database needs recovery, then the DBMS will search through the archived log files to find the ones that need to be used.

In Part 1, you will use mysqldump command to dump database, expand tables, and restore database.

In Part 2, you will use MySQL Workbench to back up, expand tables, and restore the database.

Note: Be sure that you are making screenshots and save in Lab4 Report.

Part 1: Take Dump/Backup and restore database using command line

Step 1
Taking a backup of the database

Step 2
Expand table

Step 3
Restore and recover the database

Part 2: Backup and Recovery using MySQL Workbench

Step 1
Taking a backup of the database using Export to Dump Project Folder

Step 2
Taking a backup of the database using Export to self-contained file

Step 3
Expand table

Step 4
Restore database using Import from Dump Project Folder

Step 5
Expand table

Step 6
Restore database using Import from self-contained file

iLAB STEPS

Part 1: Take Dump/Backup and Restore Database Using Command Line

Step 1: Taking a Backup of the Database

1. Go to MySQL Command line - Unicode and enter password.

2. There are several databases here now. To list them, type:
Mysql>show databases;

3. Identify required database;
You have to make database backup to be used later to restore.

4. Confirm the location of mysqldump utility on your local machine.
Usually, it is:
C:\Program Files\MySQL\MySQL Server5.6\bin

5. Go to Start - Accessories - Point to Command Prompt and right-click on Run as administrator (to be able to have all types of access on PC).

6. Set up location using cd command: type in Command prompt:
C:\user username>cd C:\ and press Enter
C:\>cd Program Files and press Enter
C:\\Program Files> cd MySQL and press Enter.
C:\Program Files\MySQL>cd MySQL Server5.6\ and press Enter.
C:\Program Files\MySQL\MySQL Server5.6>cd and press Enter.

7. Use mysqldump utility.
a) In Command prompt, type:
Mysqldump -uroot -p databasename > c:\backup file name with extension .sql
For example: "c:\mis561.sql"
Where sign > means to take output (from the left part) and put into the input (right part). All SQL instructions will be written to back-up file.
Note: The location of back-up file has to be enclosed into the double quotes.

Example:
C:\Program Files\MySQL\MySQL Server5.6\bin>Mysqldump -uroot -p databasename >c:\ backup file name with extension .sql
b) Enter password; press Enter;
c) In case of error Could not execute SELECT @@GTID_Mode, re-type with GTID options:
Mysqldump -uroot -p -set-gtid-purged=OFF databasename > "c:\backup file name with extension .sql"
d) Enter password;
Please note that c) and d) are needed only in case of error.
Save screenshot
e) To verify back-up file:
Start -All programs-Computer-Local Disk (C)-backup file.sql
Save screenshot

8. Go to MySQL Command line - Unicode Using DESCRIBE statement show the columns in the table
Mysql>describe databasename.tablename;
Save screenshot
Step 2 Expand table

1. Using ALTER command add 2 columns to the table
Mysql>ALTER table databasename.tablename
ADD col1 varchar(10);
Save screenshot

2. Using DESCRIBE statement show the columns in the table
Mysql>describe databasename.tablename;
Save screenshot

Step 3 Restore and recover the database
1. Go to Start- Accessories - Point to Command Prompt and right click on Run as administrator (to be able to have all types of access on PC)
2. Set up the location: type in Command prompt:
C:\user username>cd C:\ and press Enter
C:\>cd Program Files and press Enter
C:\\Program Files> cd MySQL and press Enter
C:\Program Files\MySQL>cd MySQL Server5.6\ and press Enter
C:\Program Files\MySQL\MySQL Server5.6>cd bin and press Enter

3. Type:
C:\Program Files\MySQL\MySQL Server5.6\bin>Mysql -uroot -p databasename < "c:\backup file name with extension .sql"
Where sign < means to take output (from the right part) and put into the output (left part). Database will be restored.

Note: The location of backup file has to be enclosed into the double quotes.
Save screenshot

4. Go to MySQL Command line - Unicode Using DESCRIBE statement show the columns in the table
Mysql>describe databasename.tablename;
Save screenshot

Part 2 Backup and Recovery using MySQL Workbench
To Backup database
1. Start MySQL Workbench
2. Connect to database and Test connection
3. Double click on Connections to connect the database; Enter Password
4. On Navigator panel under the Management click ‘Data Export', enter password
5. On Data Export screen highlight the database name and check it;
6. Click Select tables button if you want to back up the entire database;
7. There are 2 options to save backup file.

Option 1
· Export to Dump Project Folder. Choose this option and back up all tables. Click Start Export, enter password, and review created .sql files (separated for each table in database). It allows you to restore the selected tables in a future. Save screenshots.
· Close Administration - Data Export tab.
· Go to the Windows Employer, review folder dumps content. Save screenshots.

Option 2
Repeat steps 5 and 6.
· Export to Self-contained file. All tables in database will be stored in one file. Choose this option and give the unique name to the backup file to help you to identify file in a future. Click Start Export, enter password.
· Save screenshots
· When export is finished, close Administration - Data Export tab.
· Go to the Windows Employer, review folder dumps content. Save screenshots.

8. Expand table Employee by adding 2 columns. Please use Query 1 screen.
Hint: Add columns using ALTER command. Highlight query, choose Query in toolbar and click Execute current statement
- Save screenshots

9. Show new table
- Click icon Create new SQL tab for executing queries (located under the File) to display expanded table.
Hint: Use DESCRIBE statement. Highlight query, choose Query in toolbar and click Execute current statement
- Save screenshots
To Restore database

10. Click on Data Import/Restore, enter password

Option 1
a. Choose Import from Dump Project Folder and insure that the file location is correct
b. Select Schema on Select Database object to Import (only available for project folders)
c. You have an option to select which table to restore and click Start Import; enter Password
d. Save screenshot with successful completion
e. Close Administration - Data Import/Restore tab
f. Click icon Create new SQL tab for executing queries (located under the File) to display restored table.
g. Save screenshot

Option 2

11. Repeat Step 8, Step 9 and Step 10. Enter password

12. Now, restore from Import from Self-contained file
a. Choose Import from Self-contained file
b. Select file you want to restore
c. Click on Start Import; enter password;
d. Save screenshot with successful completion
e. Close Administration - Data Import/Restore tab
f. Click icon Create new SQL tab for executing queries (located under the File) to display restored table.
g. Save screenshot
This concludes the Lab for Week 4

Reference no: EM13919719

Questions Cloud

One-year zero-coupon bond with face value : A one-year zero-coupon bond with face value $100 is trading at $91.4077; a two-year bond with 10% annual coupons and face value $100 is trading at $102.2373; Calculate the 1, 2, 3, 4−year spot interest rates corresponding to these bond prices.
Calculate the return for investing in boeing stock : Using the data in the following table, calculate the return for investing in Boeing stock fro January 2, 2008, to January 2, 2009, January 3,2011, to January 3, 2012, assuing all dividends are reinvested in the stock immediately.
Modern psychology that applies principles from darwin theory : A movement with modern psychology that applies principles from Darwin's theories is called
Common stock valuation and constant growth : (Common stock valuation, constant growth) You’ve discovered a company that is expected to pay $2.25 dividend at the end of this year. The dividend is expected to grow forever at a constant rate of 4% a year. The required rate of return for this stock..
Using backups for complete recovery : Successful database recovery relies on the database being backed. This is what enables the database to recover data that were lost due to a media failure, loss of power, or any other type of disaster. Each time the online line redoes logs filled u..
What is involved in just-in-time inventory management : What is involved in just-in-time inventory management, what factors are necessary to make just-in-time inventory management successful, and how does just-in-time inventory management affect a firm's suppliers?
Value chain and the competitive forces model : Identify and briefly describe the firm that you have selected. Include the core business and the core competencies. Analyze the firm and its business strategy using the value chain and the competitive forces model.
What are two criteria needed to use constant growth model : Last Year's Dividend (Do) $9.00 Constant Dividend growth rate 3% Required Rate of Return 11%. What are the two criteria needed to use the Constant Growth Model?
Considering leasing arrangement to finance : NetFive Inc. is considering a leasing arrangement to finance some manufacturing equipment’s that is need for the next 3 years. The equipment’s will be obsolete and worthless after3 years. The firm will depreciate the cost of the equipment’s on the st..

Reviews

Write a Review

Basic Computer Science Questions & Answers

  What will be the acknowledgement number

Suppose host A send two TCP segments back to back to host B over a TCP connection. The first segment has sequence number 90; the second has sequence number 110. a) How much data is in the first segment? b) Suppose that the first segment is lost but t..

  Compare the different types of interactive environments

Compare and contrast the different types of interactive environments

  Create a program called sum of numbers

Create a program called Sum of Numbers

  Research a specific lapse in professional ethics

Research a specific lapse in professional ethics by an IT professional in the last five (5) years. Summarize the ethical dilemma, and develop a plan in which you would mitigate the vulnerability

  Current desktop processors available from both amd and intel

Research from the CSU Online Library and the other sources for the current desktop processors available from both AMD and Intel. Next, provide the requirements for several PC builds (a low cost computer, a mid-range, and a high- performance computer)..

  Multimedia can be difficult to view on a mobile device

Some multimedia can be difficult to view on a mobile device due to screen size or bandwidth limitations. Find two articles that discuss considerations and new developments that will enable multimedia on a site to be viewed effectively on a mobile dev..

  Develop the new project plan using microsoft project

Develop the new project plan using Microsoft Project for two-day training session in which people are brought in from different parts of country.

  Program the control unit for an electronic safe

Program the control unit for an electronic safe. The 8-Segment display and LEDs will show status of the safe

  Choose one area of rapid technological change in it

4. Choose one area of rapid technological change in IT or Computer Science, research and report on recent developments and the outlook for the future in the area that you have chosen. You will need to provide both in text citations and bibliography e..

  Explain discrete logarithm problem relative to g

Prove that the hardness of the CDH problem relative to G implies the hardness of the discrete logarithm problem relative to G.

  Assignment- quantifying risk and its impact

Assignment: Quantifying Risk and Its Impact, Assignment Instructions: Review the risk events identified in the Gauchito Project Plan in Doc Sharing. Using the Gauchito risk events as an example, make a list of at least ten risk events to your proje..

  The multiplexer and expected simulation report

Write a Verilog testbench for the multiplexer and expected Simulation Report.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd