When you connect the phone or iPad to your computer, it should ask you if you'd like to transfer things purchased on your phone onto your computer. You can also click Account on the menu bar, select Family Purchases, and download your purchases from there. Yesterday, I was talking to Apple regarding a similar problem and he had me go to Account, View Account Settings, Downloads and Purchases, Hidden Purchases. I don't know how they get hidden, but they are there. The only things I can't get back are the things they don't sell any more.