- I had an old iMac which stopped working a while ago
- I take weekly backups of the database I was updating which contains feed items from several rss feeds
- I am still missing the data for the last week
- I currently have the hard drive of the old machine which contains the postgres data directory (it was an Intel based iMac)
- My new machine is an Apple M1 based mac mini and I want to load all those feed items
- I want to recover a particular table called feed_items from a specific database called ch_v3 from the data directory on the hard drive containing old postgres files
- How do I recover the 100k+ feed items which are stored in raw format on my old hard drive into my new postgres installation on the new machine?
PostgreSQL Data Recovery – How to Recover Data from Data Directory
disaster recoverypostgresqlrecoveryrestore
Related Question
- Postgresql – Recovering Postgres database
- Sql-server – Is is possible to recover a database from the ‘raw’ files (.mdf and .ldf) of the old server to a new SQL Server instance on a new server
- Postgresql – Changing data directory for postgres on CentOS
- Postgres – How to Locate Data Directory When Server is Down
- Postgresql – reason I should not set the default data location to google drive when setting up PostgreSQL
- PostgreSQL 12 – Slower Performance Compared to PostgreSQL 9.5
Best Answer
If you need a method to restore the database but do not have an Intel/AMD-based system available, then a virtual machine on Amazon, DigitalOcean, or elsewhere may give you what you need. If you’ve never had an Amazon Web Services account, you can even do all of this for “free”.
The process might work like this:
With the basics in place, it’s now time to do some file management.
All in all, this may be about 30~45 minutes of work. Hope it allows you to recover the missing records.