Recovery

Hi all! I’ve been using dietpi on a rp3 since march and it’s been flawless. However due to some unforeseen power outages my sd card is corrupted and I need to reinstall… prior I had:

-raspberry pi 3
-4port powered USB hub
-500gb travel hdd 2.5inch (not powers)
-Samsung evo 16gb sd card
-wired with wifi disabled

What would be the best way for me to restore my setup? I wanted to install dietpi on my hdd like before and not have to reformat my hdd. I don’t want to have to move 300gb of data back and forth? Or will it be easier to just run if my sad card and mount the hdd as extra?

Lastly anyway for me to prevent this? Thus us my 3rd time cuz the prior two times was not using official charger and no powered hub.

TIA

endlesszeal

When you run DietPi for the 1st time, it will ask you if you want to setup a dedicated drive. Say yes. It will then ask if you want to format the drive, say N. Your existing data will then be untouched.

Lastly anyway for me to prevent this? Thus us my 3rd time cuz the prior two times was not using official charger and no powered hub.

UPS or battery backup. https://www.amazon.co.uk/gp/product/B000GL19BW/ref=s9_zwish_hd_bw_bT85dP_g147_i1?pf_rd_m=A3P5ROKL5A1OLE&pf_rd_s=merchandised-search-4&pf_rd_r=P1G8MAWEQAYJEZ2DS6K2&pf_rd_t=101&pf_rd_p=23347536-f70a-527d-a1d6-210ee4387e28&pf_rd_i=430442031

Another option is read only filesystem, but you’d have to Google how to achieve that, I’ve not played around with it yet.