In your case, you have the files, but if you havenβt done this, itβs possible that only you can do something with the database logs, you can try to look at the statement log in the database, usually in / var / log / postgresql / postgresql.log, if it is or is close to it, and if log_statements = 'mod' or 'all' is configured earlier, you can restore some of your data.
Table by table, by searching by inserting into these tables in the entire or recent history of the database. You can cut text with some Unix tools to get only instructions and put ";" at the end of each statement and other important requests, such as deletion, etc.
But you have to do it according to the table, and the data should be there, and the database did not work too much time without backups.
In some cases, you need a final operation or something like this to save the day.
This, however, is just for the time of the Apolo 13 disaster and can never replace a good backup.
source share