Accidental database migration rollback partially reverted
2023-12-21 01:47 WIB - Hendrik Lie
Just recently we rolled back our website table migrations. Inevitably, we incur significant data loss of all contents of our website. Fortunately, we already did a database dump at around November 29th, 2023.
The database dump can be done easily in PostgreSQL with the following command:1
pg_dump DBNAME > DUMPFILE
Restoring it is just as simple as:
psql DBNAME < DUMPFILE
However, posts after November 29th, 2023 are gone. Fortunately, most of our posted materials can be restored in this manner. all of our posted materials are exported from our markdown notes. Therefore getting those contents back to the site is trivial.
However, we fail to record the date of creation of posts exported from our markdown notes. Fortunately we still have a tab open on our landing page, with all of the post’s creation date preserved, but not the time. Therefore if you see posts made exactly on 09:00 WIB at a particular date, you’d know that those posts are simply manually recreated from markdown exports.
To prevent database loss in the future, we plan to prepare regular database dump to a local storage. The system should be ready soon.
See this documentation page.↩︎