4 ms·
If you are not as lucky and need to attack the underlying files to recover as much as you can in CSV form, try my small tool: https://github.com/csdvrx/pg_csdvr
by csdvrx 5y ago
If you are not as lucky and need to attack the underlying files to recover as much as you can in CSV form, try my small tool: https://github.com/csdvrx/pg_csdvrx https://github.com/csdvrx/pg_csdvrx
Or just watch the demo on https://raw.githubusercontent.com/csdvrx/pg_csdvrx/master/pg_csdvrx.gif https://raw.githubusercontent.com/csdvrx/pg_csdvrx/master/pg... where I corrupt a table to show how it works
- brightball 5y agoThanks for putting this together. I could have seriously used it a few years ago.
- csdvrx 5y agoWell, I made it for a reason ;) It is super simple and generic and could certainly be improved with a few days of work. For ex: saving the schemas to a text file or a sqlite with PAR records for redundancy right when the db is created or the schemas changed, then more automated (say, given a set of schemas, chose the one the most likely given the data on hand and its possible interpretations, including say the range of values, even with a basic minimization of variance approach) But then I may want to charge for the time and effort of coding that while I'm not in the business of data recovery... so feel free to improve on that when you start needing it, like the next time a disaster strikes :)
- smbv 5y agoWorking today to create a backup script and bind it to a systemd timer. Hope it all goes well.
- csdvrx 5y agoAdd to your script the binary schema in case you ever need to use my tool it will make your life MUNCH simpler that reconstructing them by hand while fighting on multiple front to get your database back online...
- T3OU-736 5y ago(from bitter experience): Also consider periodically taking the backup and spinning it up on a separate host/VM. And then codifying those steps into a script, so that if the time ever comes, restoring from backups is less of a fire drill.