I'm using the following query to get the actual size of my DB:
select t1.datname AS db_name, pg_size_pretty(pg_database_size(t1.datname)) as db_size from pg_database t1 order by pg_database_size(t1.datname) desc;
However I need to know how big is the database over the last month...
Need to know how much has the DB grown up by month...
I did had a Munin and MRTG graphs but the server went down and we don't have access to it anymore...
Is there any way to me get those data?
Take a measurement now, wait a month, take another measurement, the extrapolate backwards...
There is no way to execute a query within a running PostgreSQL cluster/database and obtain its size at any other time besides that exact moment.
Without access to some past measurement knowing the present size does you little good when it comes to estimating change - you need at least two data points. If you happen to have a pg_dump from the past and one from now you could use that for extrapolation purposes.