Using the switch -PR(EALLOCATE) argument
Go Up to Creating incremental backups
-PR(EALLOCATE)uses an integer argument, which consists of the number of preallocation pages. This switch is legal for both backup and restore command-line options. For backup, the preallocation switch stores its argument in the backup file instead of the value specified in the database that is being backed up. For restore, the preallocation switch argument is used at the preallocation value in the restore database, instead of the value stored in the backup file.
A GBAK preallocate switch value of 0 (zero) effectively disables database preallocation in the backup file or restored database. In GBAK verbose mode, database preallocation is logged to the console. The example below shows a sample database backup in verbose mode. A similar message is logged for database restore.
gbak -v foo.gdb foo.gbk -pr 5000 ... gbak: readied database foo.gdb for backup gbak: creating file foo.gbk gbak: starting transaction gbak: database foo.gdb has a page size of 4096 bytes. gbak: database preallocation 5000 pages
If a database restore reduces the page size, the number of pages for database preallocation is automatically scaled upward to maintain a constant database preallocation size in bytes. If the restored page size is increased, database preallocation is reduced accordingly with a similar “Reducing” message written to the console. If the
GBAK -PREALLOCATEswitch was given, then the automatic scaling of the database preallocation does not occur with changing page size. In other words, the
-PREALLOCATE switch takes precedence.
gbak -v foo.gdb foo.gbk -page_size 2048 ... Reducing the database page size from 4096 bytes to 2048 bytes Increasing database preallocation from 5000 pages to 10000 pages created database foo1.gdb, page_size 2048 bytes database preallocation 10000 pages