clearing postgres logs in VCSA

So I noticed that disk space on my VCSAs were getting full or were already full. I’ve used the following command to find all files older than 45 days, and then to remove them

find /storage/archive/vpostgres/*.gz -type f -mtime +45 -exec rm {} \;

the first part of the command locates the files i’m look for and where,
+mtime sets how far back you want to go, in my case 45 days or older
the final part of the command -exec runs rm to delete the files, and at the find \; is required to end the command.

Leave a Comment

%d bloggers like this:
Bitnami