PeterDB Posted January 16, 2021 Share Posted January 16, 2021 So I need to know - rather confirm - how badly I messed up, and what I think I need to do, is what I really need to do. Background: I was messing with CA User Scripts to backup a Emby's library.db and delete backup's older than five days using the command find . -type f -mtime +10 -exec rm {} ; .... but as you can see, I forgot to put the path appdata path in. I had webterminal open, no commands worked, not even ls... Unraid webadmin didn't even load anymore.... my heart starting racing, did I just rm -r everything!!! I panicked and did a hard power off on the powersupply. Checked the USB... almost all the files are gone :((( there are a bunch of files in /config... I grabbed a cuppa... read the community posts and wiki and I know I messed up badly... I followed the recommendations to copy off everything, flash the USB again and copy back the /config folder... Unraid boots, but webinterface isn't loading.... and no I didn't make a backup of the USB / flash backup, since I was still in the process of getting my 100TB server set up.... so... how bad is this? bad bad bad... or baaad... I'm thinking of just going to bed and crying... Right now I flashed the USB again and started booting up. I guess, I'm starting fresh... arg... Or give me some hope ppl... Although, I crushed that myself... Quote Link to comment
trurl Posted January 16, 2021 Share Posted January 16, 2021 The config folder on flash contains everything you need to get going again on a new install. If you didn't have a backup you would have to set things up again but probably most data on your disks should be there. Unclear what your current situation is, does it boot? Quote Link to comment
trurl Posted January 16, 2021 Share Posted January 16, 2021 Do you know your disk assignments? Quote Link to comment
PeterDB Posted January 16, 2021 Author Share Posted January 16, 2021 (edited) What I tried: > Copied the config folder to a backup location > Flashed the USB again and copied the config folder over > Booted up. I get a prompt, but the webinterface does not load, nor does the array start (was set to autostart) and /mnt/ is empty except for /disks/ and /remotes/ > Flashed the USB again, didn't copy over the config folder, webinterface now loads No I don't remember the disk assignments order. I have a partial screenshot of the drives, but none of the names are visible. Nor can I deduce from the screenshot which drive is what as the drives have been filled even more since then. What happens if I start the array again, but with a different drive order? EDIT: Is there a file in config that should have had the order? super.dat seems to have something, but it's not humanly readable. Edited January 16, 2021 by PeterDB Quote Link to comment
PeterDB Posted January 16, 2021 Author Share Posted January 16, 2021 Looks like only the plugins, shares and super.dat are intact. Reading a lot more instructions, it looks like that you can read out the disk assignments order from super.dat using strings. However, you can also copy super.dat to your new USB config folder (reboot) and then it should load the assignments. Gonna cry myself to sleep and wake up and try this.... Quote Link to comment
trurl Posted January 16, 2021 Share Posted January 16, 2021 If you have super.dat in the config folder then Unraid will know the disk assignments. The plugins folder contains your docker templates so those will probably work just as they are assuming they are all still there. Sounds like maybe the go file was missing from config. That is how the webUI gets started. Quote Link to comment
PeterDB Posted January 16, 2021 Author Share Posted January 16, 2021 (edited) Just to give an update here: I'm back online! YaY Flashed the USB drive again Copied over super.dat and the drive assignments were found Copied over the Shares folder and got my shares back. Still had to do some configuration, as the shares weren't set up to use cache. Copied over the Plugins folder and got my dockers back. Some of them had broken templates as the xml file in flash\config\plugins\dockerMan\templates-user was lost. Turns out that if you uninstall a docker and leave the image and the reinstall and keep the same paths and ports, it fixes the missing template. I wish I had known this before I delete some of my dockers. Fortunately, the most critical ones were recovered Had to reinstall lots of plugins Had to set up all my settings again I only a few files that where in the process of being copied when I did the hard shutdown, and of course spent my Saturday fixing my mistake Lessons Learned: Don't write scripts after a bottle of wine Test and QA your scripts before using them Backup Backup Backup Unraid works a lot better than I expected!! Thanks for the help here and on Discord! Edited January 16, 2021 by PeterDB Quote Link to comment
trurl Posted January 16, 2021 Share Posted January 16, 2021 32 minutes ago, PeterDB said: Copied over the Shares folder and got my shares back. Your shares would have been back anyway. The user shares are simply the aggregate of the top level folders on cache and array. Any folder at the top level is automatically a user share whether you have created it in the webUI or not. Any share you haven't configured will have default settings. 38 minutes ago, PeterDB said: if you uninstall a docker and leave the image and the reinstall and keep the same paths and ports, it fixes the missing template Not really any need to keep the images since reinstalling them downloads them again. You can always reinstall them exactly as they were using the Previous Apps feature on the Apps page, provided you still have the templates from flash. If you are missing the templates, the containers will still exist because they are in docker.img, but without the templates you can't manage them from the webUI. 37 minutes ago, PeterDB said: Backup You must always have a current backup of flash. You can download a zipped copy of flash at Main - Boot Device - Flash - Flash Backup. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.