#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2003
    Posts
    10
    Rep Power
    0

    Backup individual tables in a database?


    Is it possible to make a backup of individual tables in a Firebird 1.5 final database?
    (Example backup only 1 table in a database with 5 tables).

    Regards
    Thomas
  2. #2
  3. Big Endian
    Devshed Beginner (1000 - 1499 posts)

    Join Date
    May 2001
    Location
    Fly-over country
    Posts
    1,172
    Rep Power
    29
    From the Pros & Cons page:

    Firebird will only backup and restore whole databases at a time.

    From the Version 2.0 development page:

    * Incremental backup, native monitoring features, engine plugins.
  4. #3
  5. Bug Hunter
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2003
    Location
    Transylvania (Romania)
    Posts
    309
    Rep Power
    23

    Lightbulb


    Originally Posted by thomasj
    Is it possible to make a backup of individual tables in a Firebird 1.5 final database?
    (Example backup only 1 table in a database with 5 tables).

    Regards
    Thomas
    fbexport it could be used to this job
    What does it do?
    With FBExport, one can easily export/import data from/to Firebird table into a text file (actually it's a binary file). I first tought that XML format would be the way to go, but size of exported file matters, so I used my own format which uses less space.

    FBExport is a command-line tool, so you can easily use it inside batch scripts. Currently, Linux and Windows versions are available, but I hope it can be built with any compiler that can build IBPP library.

    Why use it?
    I was trying to copy data from one Firebird database to another via external tables. The whole import/export process was needed since there was no chance of getting access to both databases at the same time, so any of those data-pump utilities was out of the question. Thus, I came up with the idea to export data into text file, copy that file to other server, and import the data into other database.

    Then I had problem with null values. When exporting data into external tables, database engine turns all null values into zeroes (hex value 0). When importing back, integers become zero, dates become 17.11.1858, etc. I also tried to use CHAR for all exporting, but then, null value for integer becomes " ", or something similar, and one gets error message: Conversion error from string " ".

    Instead of writing some UDFs or a lot of Stored Procedures for each table, I decided to make a tool that will do this job...
    and page where it can be downloaded http://fbexport.sourceforge.net/
    My home page: http://www.firebirdsql.org and work place :http://www.reea.net
  6. #4
  7. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2004
    Posts
    11
    Rep Power
    0
    ibexpert can do all this for you
    extract metadata works also with a commandline version called ibeextract.exe and you can define a template what table data should be extracted in an insert script, it also creates a file for blob data, that can be used with the other commandline tool ibescript.exe to execute this. as far as i know there are different plans for new backup restore features, but most of them for Firebird 2.


    Best Regards
    Holger Klemt

    2.European Firebird Conference May 16th-18th Fulda,Germany
    The most Expert for InterBase and Firebird-www.ibexpert.com
    HK Software - Huntestrasse 15 - 26135 Oldenburg - Germany
  8. #5
  9. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2003
    Posts
    10
    Rep Power
    0
    Holger Klemt:

    Thanks

IMN logo majestic logo threadwatch logo seochat tools logo