Firebird database recovery: tools and techniques



Similar documents
Firebird databases recovery and protection for enterprises and ISVs. Alexey Kovyazin, IBSurgeon

From Firebird 1.5 to 2.5

Medtech32 InterBase XE Back Up and Restore Guide

Firebird Backup & Restore Utility

Rajan Arora (Deloitte) SAP Business Objects Backup and Recovery Scenarios and Best Practices Session # 3233

Agenda. Overview Configuring the database for basic Backup and Recovery Backing up your database Restore and Recovery Operations Managing your backups

Backup and Disaster Recovery Restoration Guide

HP Quality Center. Upgrade Preparation Guide

OroTimesheet 7 Installation Guide

Zen Internet. Online Data Backup. Zen Vault Professional Plug-ins. Issue:

Firebird's nbackup tool

126 SW 148 th Street Suite C-100, #105 Seattle, WA Tel: Fax:

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

How To Fix A Powerline From Disaster To Powerline

D12CBR Oracle Database 12c: Backup and Recovery Workshop NEW

Firebird. A really free database used in free and commercial projects

Lotus Domino 8 Monitoring and Maintenance

InterBase SMP: Safeguarding Your Data from Disaster

Maximum Availability Architecture. Oracle Best Practices For High Availability

Citrix XenServer-6.2 Administration Training

Information. Product update Recovery. Asset manager. Set console address Create recovery point. Client properties

Explain how to prepare the hardware and other resources necessary to install SQL Server. Install SQL Server. Manage and configure SQL Server.

Tk20 Backup Procedure

Whitepaper - Disaster Recovery with StepWise

McAfee Web Gateway 7.4.1

Sitecore Health. Christopher Wojciech. netzkern AG. Sitecore User Group Conference 2015

Comparison of the High Availability and Grid Options

Maintaining a Microsoft SQL Server 2008 Database

Course Syllabus. Maintaining a Microsoft SQL Server 2005 Database. At Course Completion

Oracle Database 10g: Backup and Recovery 1-2

How To Backup A Database In Navision

50238: Introduction to SQL Server 2008 Administration

Choosing the Right Way of Migrating MySQL Databases

How to protect, restore and recover SQL 2005 and SQL 2008 Databases

Embarcadero InterBase XE3. Operations Guide

TheFinancialEdge. Administration Guide

Microsoft SQL Database Administrator Certification

Restore and Recovery Tasks. Copyright 2009, Oracle. All rights reserved.

Course Syllabus. Microsoft Dynamics GP Installation & Configuration. Key Data. Introduction. Audience. At Course Completion

IBRIX Fusion 3.1 Release Notes

D78850GC10. Oracle Database 12c Backup and Recovery Workshop. Summary. Introduction. Prerequisites

Considerations when Choosing a Backup System for AFS

Oracle Database 10g: Administration Workshop II Release 2

Herve Roggero 3/3/2015

Bidirectional replication for InterBase and Firebird

Exchange Granular Restore. User Guide

Exchange Granular Restore User Guide

Best Practices for Implementing Autodesk Vault

Impact+OCR 1.1 Readme

Certificate Management in Environments with Multiple HP Software Products

MySQL Backup IEDR

Directory Backup and Restore

Business Continuity and Disaster Survival Strategies for the Small and Mid Size Business.

SAP Note FAQ: SAP HANA Database Backup & Recovery

Hyperoo 2 User Guide. Hyperoo 2 User Guide

Intronis RMM Deployment Kit

Database Recovery For Newbies

Backup and Recovery by using SANWatch - Snapshot

Table of Contents. Cisco How to Download a Software Image to a Cisco 2600 through TFTP Using the tftpdnld ROMmon Command

Oracle 11g Database Administration

User Guide Online Backup

Course Syllabus. At Course Completion

Migrating from SharePoint 2007 to SharePoint

Understand Backup and Recovery Methods

INSIDE. Preventing Data Loss. > Disaster Recovery Types and Categories. > Disaster Recovery Site Types. > Disaster Recovery Procedure Lists

Oracle Database 11g: Administration Workshop II DBA Release 2

DB2 backup and recovery

Why SaaS (Software as a Service) and not COTS (Commercial Off The Shelf software)?

Configuring Backup Settings Configuring and Managing Persistent Settings for RMAN Configuring Autobackup of Control File Backup optimization

Connectivity. Alliance Access 7.0. Database Recovery. Information Paper

1. Overview... 2 Documentation... 2 Licensing... 2 Operating system considerations... 2

Module: Sharepoint Administrator

How to restore a Microsoft SQL Server Master Database with Backup Exec for Windows Servers (Automate Master Database Restore)

MarkLogic Server. Database Replication Guide. MarkLogic 8 February, Copyright 2015 MarkLogic Corporation. All rights reserved.

Installation. Populate the data. 2 User Interface. Database Connection. Database Security. Check for updates Ask a question.

Massive Data Storage

Percona Server features for OpenStack and Trove Ops

TheFinancialEdge. Administration Guide

IBM DB Backup and Recovery Hands-On Lab. Information Management Cloud Computing Center of Competence. IBM Canada Lab

Course. Overview. Length: 5 Day(s) Published: English. IT Professionals. Level: Type: Method: Delivery. Enroll now (CAL)

Distributed File Systems

Connectivity. Alliance Access 7.0. Database Recovery. Information Paper

Software User Manual. Table of Contents

SOLIDWORKS FILE MANAGEMENT

SQL Databases Course. by Applied Technology Research Center. This course provides training for MySQL, Oracle, SQL Server and PostgreSQL databases.

LVM2 data recovery. Milan Brož LinuxAlt 2009, Brno

Oracle Backup & Recovery

itanalyzer Data Protection Module

SteelEye Protection Suite for Windows Microsoft SQL Server Recovery Kit. Administration Guide

Stellar Phoenix. SQL Database Repair 6.0. Installation Guide

Managing your Domino Clusters

Backup & Restore Instructions

Amicus Attorney Link Guide: PCLaw

Administering Microsoft SQL Server 2012 Databases

The Google File System

Transcription:

Firebird database recovery: tools and techniques Alexey Kovyazin IBSurgeon www.ib-aid.com www.ibsurgeon.com www.ibase.ru Firebird Conference 2014 (c) IBSurgeon, 2014 1

Thanks to sponsors! Firebird Conference 2014 (c) IBSurgeon, 2014 2

About IBSurgeon Firebird and InterBase recovery and optimization: tools and services Platinum sponsor of Firebird Foundation Since 2002 Moscow, Russia Firebird Conference 2014 (c) IBSurgeon, 2014 3

Typical corruption «environment» No backups No administrator Unreliable hardware or wrong configuration of hardware Big database and 24/7 workmode can t do backup/restore Corruption never happened before or no responsible persons Firebird Conference 2014 (c) IBSurgeon, 2014 4

Behind the corruption Hardware failure Administrators/developers failures Server bugs Mr. Murhy and his laws:) Firebird Conference 2014 (c) IBSurgeon, 2014 5

Corruption from user's point of view Unavailable database i.e., cannot connect there, with various errors Errors while trying SELECT/UPDATE/INSERT/DELETE Low performance «Something is wrong» Firebird Conference 2014 (c) IBSurgeon, 2014 6

Corruption from the server point of view Cannot build internal database image System data lost? Transactions pages lost? Cannot read some records Record is corrupted? Indices corruption Firebird Conference 2014 (c) IBSurgeon, 2014 7

Symptoms of corruptions Corruptions appear at: 1.Users screen ( internal Firebird software consistency check error message) 2.In firebird.log Firebird Conference 2014 (c) IBSurgeon, 2014 8

Heavy and Easy corruptions Easy corruptions Users data are corrupted (partially) User s indices corrupted Heavy corruptions System data are damaged (We can t read users data!) Firebird Conference 2014 (c) IBSurgeon, 2014 9

Examples Cannot find TIP page Lost TIP pages Wrong transaction number in record header What we can do Recreate TIP Delete records Firebird Conference 2014 (c) IBSurgeon, 2014 10

Wrong record length Record length does not correspond to declared size Must be deleted Firebird Conference 2014 (c) IBSurgeon, 2014 11

Attempted to read more segments.. BLOB corruption loss of BLOB parts What we can do? Export as is Delete corrupted BLOB Firebird Conference 2014 (c) IBSurgeon, 2014 12

Cannot find record fragment Fragment of record disappeared Usually on another data page We can only delete remained part Firebird Conference 2014 (c) IBSurgeon, 2014 13

Nbackup delta won't merge Database delta won't merge What we can do Delete delta (it hurts!) Manual merge with special tools Export data Firebird Conference 2014 (c) IBSurgeon, 2014 14

Fixing Firebird Conference 2014 (c) IBSurgeon, 2014 15

Standard means Stop Firebird server. Make a copy of Firebird database. Start Firebird server and run the following commands: gfix.exe -v -full gfix.exe -mend ig gbak -b g -v If backup completed successfully, restore database: gbak -c -v -user SYSDBA -pass masterkey path_to_backup path_to_database Firebird Conference 2014 (c) IBSurgeon, 2014 16

Not very well known, but still standard means 1.Run them all, even if gfix shows errors. 2.Always use switch ig for gbak to ignore checksum errors 3.Always use switch g for gbak to suppress garbage collection (and to workaround index errors) 4.Use v switch to have detailed output 5. Set database to read_only with gfix -mode read_only Firebird Conference 2014 (c) IBSurgeon, 2014 17

Restore errors After fixing corruptions it's a often to see "Cannot commit index" error at restore step. In Firebird 2.0 and later this comes as a warning and database will be not brought on-line How to workaround IBDataPump Bug with circular links FirstAID Extractor Firebird Conference 2014 (c) IBSurgeon, 2014 18

Effectiveness Gbak+Gfix can recover almost all easy corruptions What they cannot fix: Heavy corruptions with a lot of losses System data corruptions Firebird Conference 2014 (c) IBSurgeon, 2014 19

IBSurgeon Tools Firebird Conference 2014 (c) IBSurgeon, 2014 20

IBSurgeon Tools for Recovery and data protection FirstAID Direct Extractor FBDataGuard Protection Backups Firebird Conference 2014 (c) IBSurgeon, 2014 21

IBSurgeon FirstAID: Direct Scan internal structure and finds inconsistencies Replace/restore lost system pages where it is possible Delete wrong pages and dead records Fast! Effective for user's data corruptions Firebird Conference 2014 (c) IBSurgeon, 2014 22

IBSurgeon FirstAID: Extractor Reads metadata from database and read records bypassing server Free preview of records is available Export all good records to the new database Resolve dependencies Foreign Keys, Triggers, UDFs Speed is 1Gb/hour Very effective Firebird Conference 2014 (c) IBSurgeon, 2014 23

External metadata Extractor can borrow metadata from good healthy database with the same structure and export data from corrupted one, even if all system data lost Firebird Conference 2014 (c) IBSurgeon, 2014 24

Metadata repository Firebird Conference 2014 (c) IBSurgeon, 2014 25

Increased recovery rate Metadata repository increase recovery rate up to 99% FBDataGuard is a tool to create metadata repository Firebird Conference 2014 (c) IBSurgeon, 2014 26

Better prevent when fix! FBDataGuard vs FirstAID? Easy licensing options Special offer for attendees of Firebird Conference 2014 Firebird Conference 2014 (c) IBSurgeon, 2014 27

Thank you! Www.ib-aid.com Www.ibsurgeon.com support@ib-aid.com Firebird Conference 2014 (c) IBSurgeon, 2014 28