{"id":12602,"date":"2015-04-28T21:46:59","date_gmt":"2015-04-29T04:46:59","guid":{"rendered":"http:\/\/www.technosolutions.com\/kb\/?p=12602"},"modified":"2017-03-09T01:38:06","modified_gmt":"2017-03-09T09:38:06","slug":"restore-your-firebird-database-from-backup","status":"publish","type":"post","link":"http:\/\/www.technosolutions.com\/kb\/12602\/restore-your-firebird-database-from-backup\/","title":{"rendered":"Restore your Firebird Database from backup"},"content":{"rendered":"<p><span style=\"color: #074791; font-family: Trebuchet MS; font-size: 16pt;\"><strong>Overview<br \/>\n<\/strong><\/span><\/p>\n<p>The <em>Firebird Database<\/em> can be backed up in multiple ways. This document describes how you can restore the database file from a cold or hot backup using GBAK.<\/p>\n<p><span style=\"color: #074791; font-family: Trebuchet MS; font-size: 16pt;\"><strong>Prerequisites<br \/>\n<\/strong><\/span><\/p>\n<p>Before executing the procedure ensure the following:<\/p>\n<ul>\n<li>\n<div style=\"text-align: justify;\">You have write access on the disk on which you want to restore backup.<\/div>\n<\/li>\n<li>\n<div style=\"text-align: justify;\">You have direct access to the database file.<\/div>\n<\/li>\n<li>\n<div style=\"text-align: justify;\">You have adequate free disk space equal to 3-4 times the size of the database being restored.<\/div>\n<\/li>\n<\/ul>\n<p style=\"text-align: justify;\">\n<p><span style=\"color: #074791; font-family: Trebuchet MS; font-size: 16pt;\"><strong>Restore from Hot Backup<br \/>\n<\/strong><\/span><\/p>\n<ol>\n<li>\n<div style=\"text-align: justify;\">Through the Windows Control Panel, verify that Firebird Service is up and running.<\/div>\n<\/li>\n<li>\n<div style=\"text-align: justify;\">Stop <em>TopTeam Application Server<\/em> so that the TopTeam.gdb file can be restored. It must be stopped by this time because, while restoring from the backup file, it is not expected to be in use.<\/div>\n<\/li>\n<li>\n<div style=\"text-align: justify;\">Rename the existing TopTeam.gdb (or TopTeam.fdb) file to TopTeam-in-use-till-&lt;&lt;dateandtime&gt;&gt;.gdb or similar.<\/div>\n<\/li>\n<li>\n<div style=\"text-align: justify;\">Open the Command prompt and change the directory to the folder where Firebird Server is installed. You can locate the Firebird Service in the Windows Service Panel.<\/div>\n<p>The default folder where firebird is installed is:<\/p>\n<p>C:\\Program Files\\TechnoSolutions TopTeam\\Firebird\\bin<\/li>\n<li>\n<div style=\"text-align: justify;\">Enter the following command in the Command prompt:<\/div>\n<\/li>\n<\/ol>\n<p style=\"text-align: justify;\"><span style=\"color: blue;\">gbak \u2013r \u2013v \u2013p &lt;page size of database&gt; \u2013user &lt;username&gt; \u2013pas &lt;password&gt; &#8220;&lt;backed up file name with path&gt;&#8221; &#8220;&lt;computer name&gt;:&lt;database file name with path&gt;&#8221;<br \/>\n<\/span><\/p>\n<p style=\"text-align: justify;\">\n<div>\n<table style=\"border-collapse: collapse;\" border=\"0\">\n<colgroup>\n<col style=\"width: 312px;\"><\/col>\n<col style=\"width: 312px;\"><\/col>\n<\/colgroup>\n<tbody>\n<tr>\n<td style=\"padding-left: 7px; padding-right: 7px; border: solid 0.5pt;\"><span style=\"color: blue;\"><strong>&lt;page size of database&gt;<\/strong><\/span><\/td>\n<td style=\"padding-left: 7px; padding-right: 7px; border-top: solid 0.5pt; border-left: none; border-bottom: solid 0.5pt; border-right: solid 0.5pt;\">This is the database page size. Default is 4096 or 8192 for TopTeam Database. You can change it in multiples of 1024.<\/td>\n<\/tr>\n<tr>\n<td style=\"padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid 0.5pt; border-bottom: solid 0.5pt; border-right: solid 0.5pt;\"><span style=\"color: blue;\"><strong>&lt;username&gt;<\/strong><\/span><\/td>\n<td style=\"padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid 0.5pt; border-right: solid 0.5pt;\">This is a valid Firebird Database user login. Default Username is &#8220;Sysdba&#8221;.<\/td>\n<\/tr>\n<tr>\n<td style=\"padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid 0.5pt; border-bottom: solid 0.5pt; border-right: solid 0.5pt;\"><span style=\"color: blue;\"><strong>&lt;password&gt;<\/strong><\/span><\/td>\n<td style=\"padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid 0.5pt; border-right: solid 0.5pt;\">This is a password of a login user. Default Password for SYSDBA user is &#8220;masterkey&#8221;.<\/td>\n<\/tr>\n<tr>\n<td style=\"padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid 0.5pt; border-bottom: solid 0.5pt; border-right: solid 0.5pt;\"><span style=\"color: blue;\"><strong>&lt;backed up file name with path&gt;<\/strong><\/span><\/td>\n<td style=\"padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid 0.5pt; border-right: solid 0.5pt;\">This is the name of the file that is created when the backup is completed.<\/td>\n<\/tr>\n<tr>\n<td style=\"padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid 0.5pt; border-bottom: solid 0.5pt; border-right: solid 0.5pt;\"><span style=\"color: blue;\"><strong>&lt;computer name&gt;<\/strong><\/span><\/td>\n<td style=\"padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid 0.5pt; border-right: solid 0.5pt;\">This is the name of the machine on which Firebird is installed. If Firebird Server is running on the same computer from where you are restoring the database, then you can use &#8220;localhost&#8221;.<\/td>\n<\/tr>\n<tr>\n<td style=\"padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid 0.5pt; border-bottom: solid 0.5pt; border-right: solid 0.5pt;\"><span style=\"color: blue;\"><strong>&lt;database file name with path&gt;<\/strong><\/span><\/td>\n<td style=\"padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid 0.5pt; border-right: solid 0.5pt;\">This is the database file name and path where the backed up file will be restored. The default location of this file is &#8220;C:\\Program Files\\TechnoSolutions TopTeam\\TopTeam Database Files\\TopTeam.gdb&#8221;. You can confirm this from the <em>TopTeam Application Server<\/em> &#8220;Database Settings&#8221; tab.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p><span style=\"color: blue;\">gbak \u2013pas masterkey &#8220;C:\\Program Files\\TechnoSolutions TopTeam\\TopTeam Database Files\\TopTeam.bkp&#8221; &#8220;localhost:C:\\Program files\\Technosolutions TopTeam\\TopTeam Database Files\\RestoredTopTeam.gdb&#8221;<br \/>\n<\/span><\/p>\n<p><img decoding=\"async\" src=\"data:image\/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==\" data-layzr=\"http:\/\/www.technosolutions.com\/kb\/wp-content\/uploads\/2015\/08\/082015_0520_Restoreyour1.png\" alt=\"\" \/><span style=\"color: blue;\"><br \/>\n<\/span><\/p>\n<p><strong>NOTE<\/strong>:<\/p>\n<ul>\n<li>\n<div style=\"text-align: justify;\">Check the restore folder to ensure that there isn&#8217;t already a file by that name.<\/div>\n<\/li>\n<li>\n<div style=\"text-align: justify;\">On some computers, if you copy and paste the above command in the Command prompt, it does not work. In that instance, you need to type the entire command manually.<\/div>\n<\/li>\n<li>\n<div style=\"text-align: justify;\">If you face any difficulties in restoring the database and if there are any errors while running the above command, use the switch &#8220;-y &lt;&lt;Log File Path&gt;&gt;&#8221; with the command. This switch will log all the internal workings of GBAK into the supplied file.<\/div>\n<\/li>\n<\/ul>\n<p>Syntax:<\/p>\n<p><span style=\"color: blue;\">gbak \u2013r \u2013v \u2013p 4096 \u2013user sysdba \u2013pas masterkey &#8220;C:\\Program Files\\Technosolutions TopTeam\\TopTeam Database Files\\TopTeam.bkp&#8221; &#8220;localhost:C:\\Program files\\Technosolutions TopTeam\\TopTeam Database Files\\RestoredTopTeam.gdb&#8221; -y &#8220;C:\\Program files\\Technosolutions TopTeam\\TopTeam Database   Files\\GBAK_Log.txt&#8221;<\/span><\/p>\n<p>The log file &#8220;GBAK_Log.txt&#8221; that is generated by the above command, sends this file to TechnoSolutions Support.<\/p>\n<ol>\n<li>\n<div style=\"text-align: justify;\">When the command is completed successfully, a database file is created with the name &#8220;RestoredTopTeam.gdb&#8221;.<\/div>\n<\/li>\n<\/ol>\n<ul style=\"margin-left: 54pt;\">\n<li>Rename the existing database file (unless already done before).<\/li>\n<li>Rename &#8220;RestoredTopTeam.gdb&#8221; to &#8220;TopTeam.gdb&#8221; OR &#8220;TopTeam.fdb&#8221;.<\/li>\n<li>Make sure that this file name is the same as in the &#8220;Database Settings&#8221; tab in <em>TopTeam Application Server<\/em>.<\/li>\n<\/ul>\n<h2><span style=\"color: #074791; font-family: Trebuchet MS; font-size: 16pt;\"><em>Restore from Cold Backup<br \/>\n<\/em><\/span><\/h2>\n<ol>\n<li>\n<div style=\"text-align: justify;\">Stop <em>TopTeam Application Server<\/em> and ensure that no application is connected to the TopTeam.gdb file. The database must NOT be in use during this procedure.<\/div>\n<p>Default location of the database file is:<br \/>\n&#8220;C:\\Program Files\\TechnoSolutions TopTeam\\TopTeam Database Files\\TopTeam.gdb&#8221; (or TopTeam.fdb), you can verify this from the TopTeam Application Server&#8217;s &#8220;Database Settings&#8221; tab.<\/li>\n<li>\n<div style=\"text-align: justify;\">Rename the existing database file TopTeam.gdb (or TopTeam.fdb) file to TopTeam-in-use-till-&lt;&lt;dateandtime&gt;&gt;.gdb or similar.<\/div>\n<\/li>\n<li>\n<div style=\"text-align: justify;\">Copy the backed up file into this folder and rename it to the original file name. i.e. &#8220;TopTeam.gdb&#8221;\/ OR &#8220;TopTeam.fdb&#8221;.<\/div>\n<\/li>\n<li>\n<div style=\"text-align: justify;\">Start Firebird Service and <em>TopTeam Application Server<\/em>.<\/div>\n<\/li>\n<\/ol>\n<h3>See Also<\/h3>\n<p><a href=\"http:\/\/www.technosolutions.com\/kb\/11650\/backup-your-firebird-database-file\/\" target=\"_blank\">Backup your Firebird Database file<\/a><\/p>\n<ol><\/ol>\n<p style=\"text-align: justify;\">\n<p style=\"text-align: justify;\">Revised: August 20<sup>th<\/sup>, 2016<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Overview The Firebird Database can be backed up in multiple ways. This document describes how you can restore the database file from a cold or hot backup using GBAK. Prerequisites Before executing the procedure ensure the following: You have write access on the disk on which you want to restore backup. You have direct access to the database file. You have adequate free disk space equal to 3-4 times the size of the database being restored. Restore from Hot Backup Through the Windows Control Panel, verify that Firebird Service is up and running. Stop TopTeam Application Server so that the <\/p>\n","protected":false},"author":6,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[281,8,78],"class_list":["post-12602","post","type-post","status-publish","format-standard","hentry","category-database","tag-database","tag-firebird","tag-restore"],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/paoaNA-3hg","_links":{"self":[{"href":"http:\/\/www.technosolutions.com\/kb\/wp-json\/wp\/v2\/posts\/12602","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.technosolutions.com\/kb\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.technosolutions.com\/kb\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.technosolutions.com\/kb\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"http:\/\/www.technosolutions.com\/kb\/wp-json\/wp\/v2\/comments?post=12602"}],"version-history":[{"count":25,"href":"http:\/\/www.technosolutions.com\/kb\/wp-json\/wp\/v2\/posts\/12602\/revisions"}],"predecessor-version":[{"id":12619,"href":"http:\/\/www.technosolutions.com\/kb\/wp-json\/wp\/v2\/posts\/12602\/revisions\/12619"}],"wp:attachment":[{"href":"http:\/\/www.technosolutions.com\/kb\/wp-json\/wp\/v2\/media?parent=12602"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.technosolutions.com\/kb\/wp-json\/wp\/v2\/categories?post=12602"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.technosolutions.com\/kb\/wp-json\/wp\/v2\/tags?post=12602"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}