Accidentally ran rm on root and reformatted usb without config


can4d

Recommended Posts

I am in a panic and have been sweating it for 3 hours now. I was cleaning files and accidentally ran the following mv ${pwd}/* -T to-external-location and it moved all files at the root (/). I then proceeded to boot off the usb which it did not. tried to troubleshoot and was prompted with new usb creator update of which I ran and created a new usb drive. Am I completely F**kd? please someone with some kind of head on your shoulders please help. 

 

I have the files that I moved but can't seem to transfer them after booting from new usb. Also I can connect to Unraid running off the usb but it is asking for new password and I am freaked out that I will lose everything. 

 

I do see a metadata.0.config in my trash bin. but not sure if that is useful. 

 

please someone throw me a line. 

Edited by can4d
addition
Link to comment
  • Replies 121
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

I am not sure how to proceed after reading this. Do I need to continue with new usb and create a new root password to continue or do I try to recover my config files off the usb and try to use them before starting over. I am afraid to make changes as described where I make another mistake and lose the data on my drives. I only have 1 drive + 1 parity, and 1 ssd + 1 parity. 

Link to comment
1 minute ago, can4d said:

I only have 1 drive + 1 parity, and 1 ssd + 1 parity

This does not make sense. There is only one parity array. If you have a separate pool with the SSD, cache, for example, it doesn't have parity but it might be a mirror.

 

2 minutes ago, can4d said:

try to recover my config files off the usb

I thought they were lost. All of your configuration is in the config folder on flash, so if you have that you can restore your configuration on a new install.

 

Link to comment
1 minute ago, can4d said:

shares directory is not there

Shares will be if the data is. They are just settings for the shares. User Shares are simply the combined top level folders on array and pools. Any without settings will have default settings.

 

config/super.dat and config/pools have your disk assignments

 

If it doesn't remember your password just create a new one.

 

 

Link to comment

So first don’t panic. No point in that and you’ll just make it worse. So where did you mv the files to? I’m not familiar with the -T option but with ${pwd}\* you definitely moved everything from your root directory “/“ to somewhere. I’d start there and try to find where the files got moved. I would also make a copy of my current flash drive.

Link to comment
4 minutes ago, trurl said:

Shares will be if the data is. They are just settings for the shares. User Shares are simply the combined top level folders on array and pools. Any without settings will have default settings.

 

config/super.dat and config/pools have your disk assignments

 

If it doesn't remember your password just create a new one.

 

 

If they moved everything under / that would have started moving /mnt/user/ as well, right?

Link to comment
Just now, pinion said:

If they moved everything under / that would have started moving /mnt/user/ as well, right?

Yes. Just a question of how long they let it continue. /boot probably went before /mnt

 

1 minute ago, can4d said:

redeem activation code

Your license is the .key file in config. Do you still have that?

 

Link to comment
4 minutes ago, trurl said:

Are you using the same flash drive? The license only works on the flash it was registered to 

yes same flash drive. Shows the same id. I sent email to support. now wait.

 

2 minutes ago, trurl said:

Why were you trying to work with files from the command line anyway?

 

Probably best if you don't try your Linux skills until you understand how unraid does things under the hood 

I needed to move files quickly. wasn't paying attention and was very stupid trying to grab environment var. Yes. You are correct. I am out of my comfort zone but trying. I hope this mistake doesn't become devastatingly painful and hopefully turns out to be a lessons learned. 

Link to comment

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.