Keep your website or blog always in a state of improvement and updating and make sure that your website is one that is a quality website that people would want to link to and/or stay linked to.
As for losing the backlinks, you can try to reach out the the website owners or administrators where the links were coming from and ask them why they removed the link to your site. Many times it's because the content of the page where the link was at has changed or the owner of the website has changed.