Question

PostgreSQL implementation Backup size vs real db size

  • 28 February 2024
  • 3 replies
  • 79 views

Badge +5

Hello all!

We are in the middle of Proof of concept Postgre backup implementation process.

No one of our backup team does have any experience regarding this backup type.

 

So far we do have implemented backup that I am able to see those two Backups sets:


I am trying to understand the difference between those two subclients. They were configured automatically.

 

I have found this in documentation:

So in case that we would like to do Full Backup of All DBs i should use Dump Based Backup?

But when creating backup for this subclient (Dump Based Backup)backup size is about 250mb… DB team checked server configuration and it said that DB is more then 3GB:

 

Why there is such a difference in sizes? It was very first backup so i can not blame deduplication or so… 

 

While trying to use other sublient FSBasedBackupSet I am having a error with log directory.

This DB is not set to use any archive mode, so its in some kind of “simple recovery mode” and its not generating logs file.

 

 

So my questions are:

 

Why there is such a size difference?

Which subclient should be used to do Full Backups of All dbs on this server?

Do i need to use both subclients to have consistent full backup of DB?

Do i use one sublient for DBs with archivelog and other for the one with no archivelog configured?


3 replies

Userlevel 3
Badge +7

Hi @Grzegorz ,

 

For small databases, dumpbased backupset is fine. Dump backups are always full backups. 

 

For large databases, fsbased backupset is recommended. It takes a file system level backup of the postgres data, tablespace and archive log directories. This requires configuring log archival. Configuration requirement is here- Configuring the PostgreSQL Archive Log Directory (commvault.com)

 

Difference between dumpbased and fsbased backup is mentioned here-  https://documentation.commvault.com/2024/expert/faq_03.html#how-are-the-backups-and-restores-performed-in-postgresql

 

The logical size of database is returned from the postgres server and the size of application you see in the backup job details is the size of the dump. The job backs up the database dump to media so we show the size of the dump and not the actual size of the database. If you do a pg_dump for the database and check size of the dump, it will be 248 MB..

 

Badge +5

Thanks for Your response! Those are very helpful tips! I will check this documentation and make some further steps with DB team!
Once more, thanks a lot!

Userlevel 3
Badge +7

Hi @Grzegorz ,

Sure, you are welcome. Please check PostgreSQL (commvault.com) also. Here we have a table listing the features supported for this agent.

Reply