Bug 28325

GemStone/S

6.5, 6.3.1, 6.3, 6.2.2, 6.2.1, 6.2, 6.0.2, 6.0.1, 6.0

All

6.5.1; not in 6.1.x

Compressed backups fail at 2 GB

When generating a compressed backup file using fullBackupCompressed:, if the size of the backup file reaches 2 GB, the backup will fail with a gzwrite failure.  The reported error looks like this:

-----------------------------------------------------
GemStone: Error         Nonfatal
An attempt to write to file '/mydisk/backup.dbf.gz' failed because 'gzwrite() of !TCP@myhost#dbf!/mydisk/backup.dbf.gz wrote too few bytes;... .This error terminates the backup and the backup file is not usable. Error Category: [GemStone] Number: 2305 Arg Count: 2
Arg 1: /mydisk/backup.dbf.gz
Arg 2: gzwrite() of !TCP@myhost#dbf!/mydisk/backup.dbf.gz wrote too few bytes;
got 32768 but expected 131072.
-----------------------------------------------------

Workaround

When generating a compressed backup that will exceed 2 GB in size, use the "MBytes:" versions of the backup commands to create a multiple-file backup with a size limit for each part.  The commands would be:

    System fullBackupCompressedTo: <file/device> MBytes: <size>
    System continueFullBackupCompressedTo: <file/device> MBytes: <size>

Note that the MBytes: argument specifies the number of UNCOMPRESSED bytes in the repository to write to the file - the resulting file will be correspondingly smaller depending upon the compression ratio.  Some experimentation will be necessary to find an optimal value for the MBytes argument that approaches but does not exceed the 2 GB limit.


Last updated: 6/11/09