I use em.createQuery("objectdb backup", Thread.class); to backup hourly. And the backup file is always getting bigger even if the db file is not getting bigger. Why is that?
Backup file always bigger than live db file
Does the database file itself remain the same size?
Is the backup size different (either smaller or larger) from the database file size, or just the compressed (e.g. zip) versions become larger over time?
It seems it is only the compressed file size that is getting bigger. The DB file and the backup file are the same size. Any idea why?
$ gzip -l backup/file.odb.20210311_060101.gz
compressed uncompressed ratio uncompressed_name
4605648234 717488128 -541.9% backup/file.odb.20210311_060101
$ gzip -l backup/file.odb.20210311_070101.gz
compressed uncompressed ratio uncompressed_name
4607608563 717488128 -542.2% backup/file.odb.20210311_070101
This makes sense. The database file may have unused space, and if that space contains a long sequence of 0 values then it can be compressed better than real data that is added later.