The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My work

  • My badges

  • Twitter Updates

  • My Flickr Stream

    20140508-Delphi-2007--Project-Options--Cannot-Edit-Application-Title-HelpFile-Icon-Theming

    20140430-Fiddler-Filter-Actions-Button-Run-Filterset-now

    20140424-Windows-7-free-disk-space

    More Photos
  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,692 other followers

Archive for August 20th, 2013

Firebird gbak: Special Use of ‘stdin’ or ‘stdout’ File Names to facilitate backup transfers and database cloning

Posted by jpluimers on 2013/08/20

Just found out that the Firebird gbak tool for backup/restore, has some interesting parameters.

This is what pointed me to id: Firebird News » Firebird SQL’s backup/restore uses magic words for stdin and stdout – Check the gbak manual update.

Just read the below quotes from the documentation.

Gbak Caveats:

Use of ‘stdin’ or ‘stdout’ File Names

Gbak recognizes the literal strings ‘stdin’ and ‘stdout’ as source or destination filenames. In POSIX systems, when the standard input and/or standard output channels are used, it is not permitted to execute seek operations on these channels. Using ‘stdin’ or ‘stdout’ as file names with gbak will force gbak to use processing that will not seek on the input or output channels, making them suitable for use in pipes

Backup & Restore Recipes:

Create a Database Clone Without a Dump File.

You may use gbak to create a clone of a database, on the same server, without needing to create a potentially large dump file. To do this, you pipe the output of a gbak backup directly to the input of a gbak restore, as follows.

tux> # Clone a test database to the same server, without requiring a dump file.
tux> gbak -backup emptest stdout | gbak -replace stdin emptest_2

–jeroen

via: Firebird News » Firebird SQL’s backup/restore uses magic words for stdin and stdout – Check the gbak manual update.

Posted in Database Development, Development, Firebird | Leave a Comment »

 
%d bloggers like this: