community.borland.com

Article #25689: An alternative to using gsplit on UNIX systems - For InterBase v4.x and previous

Problem:
gbak restricts the size of a single created backup file to 2GB.  Prior to InterBase 5.X, InterBase had no
utility program available which would allow a backup to be split into several files.

This effectively limits the maximum size of a pre InterBase 5.X database.

Solution:
On many UNIX systems, the devices   /dev/stdin   and   /dev/stdout exist and act as pipes between
programs and standard in  and standard out respectively.   A utility program  of the name  "split"
typically also exists on these systems.  If the UNIX system you are using has these devices and
the split utility,  a work-arround for the 2GB  gbak limit exists.

For this example, the database name I am using is  "test.gdb" and the file size I am using for
the splitting of files is 800 MB.  (NOTE: they target filesystem must have enough room for all
of the files created).  In the example, I will restore to a file named   "test2.gdb"

The general form of the backup command is :

     gbak -b   /dev/stdout | split -b  m

In the example I use :

     gbak -b test.gdb /dev/stdout | split -b 800m

This will create the files named  xaa, xab,xac,  . . .  (some versions of split allow you to name the target
files).

The general form of the restore command is :

      cat      .  .  . | gbak -c /dev/stdin  

In the example I use :

     cat xaa xab xac xad | gbak -c   /dev/stdin   test2.gdb

NOTE:  While this solution is expected to work, it is not supported.  Prior to InterBase 5.X, 2GB is the
              maximum limit for a database backup file.

Last Modified: 23-OCT-00