Magento tier price deleted after programmatic product save operation

This is a general headache for developers when they update or save products programmatically the tier prices of the products lost. If you are also stuck after performing programmatic product save operation ($_product->save();)  below solution might help your Magento website.

Here is a solution which ONLY works if you have prior taken database backup.

Create a new database and import the most recent working database of your Magento website.
Look for "catalog_product_entity_tier_price" table.
Export all the data of the table and save the insert query part for future use.
Now navigate to current Magento database and look for the same table "catalog_product_entity_tier_price".
Run Truncate query against it (e.g.  TRUNCATE TABLE catalog_product_entity_tier_price).
Now run the insert statement which we extracted from backup table export.
Now, You are done with fixing Magento tier price delete accidently and your most recent programmatic changes on Magento database are also preserved.