Comprehensive data protection for all workloads
Post Reply
MCH_helferlein
Expert
Posts: 108
Liked: 9 times
Joined: Nov 21, 2017 7:18 am
Full Name: Peter Helfer
Contact:

Postgresql log files

Post by MCH_helferlein »

Dear all.

We are running VBR V12.1 with PostgreSQL.
Just noted today that there are around 70GB of logs in the folder C:\Program Files\PostgreSQL\15\data\log

How to reduce that amount?
Is this a setting, or can I safely remove those logs?

Regards
Peter
Mildur
Product Manager
Posts: 8735
Liked: 2294 times
Joined: May 13, 2017 4:51 pm
Full Name: Fabian K.
Location: Switzerland
Contact:

Re: Postgresql log files

Post by Mildur »

Hello Peter

You can delete those logs safely. This are just "application debug logs". Maybe keep the last 2-3 days for now.

With v12.1 we have introduced new postgresql.conf parameter for our Set-VBRPSQLDatabaseServerLimit cmdlet. The new postgresql.conf settings will help to clean up those log files. Unfortunately, upgrading to v12.1 will not update those settings automatically.

You have two options:

Option 1:
You can manually change the postgresql.conf file. Manual update may be required if you already use a customized PostgreSQL configuration:

Code: Select all

log_truncate_on_rotation = 'on';
log_filename = 'postgresql-%d-%H%M.log';
log_rotation_size = 0;

change log_rotation_age = '10d'; to
log_rotation_age = '4h';
Option 2 - Set-VBRPSQLDatabaseServerLimit
You can rerun Set-VBRPSQLDatabaseServerLimit to implement the updated logging settings. This command will configure your PostgreSQL server with the from us recommended settings. It will overwrite any by you customized setting in the postgresql.conf file.

Best,
Fabian
Product Management Analyst @ Veeam Software
MCH_helferlein
Expert
Posts: 108
Liked: 9 times
Joined: Nov 21, 2017 7:18 am
Full Name: Peter Helfer
Contact:

Re: Postgresql log files

Post by MCH_helferlein »

Thank you Fabian for your response.
I was able to safely remove those logs and to set the settings with the powershell command mentioned.
The postgres service was needed to restart.

I will monitor the situation in the next weeks to check if the log rotation works as expected.
Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 122 guests