[SOLVED] deleted appdata - any chance for recovery from drive?


Recommended Posts

I screwed up majorly. ironically while setting up CommunityBacupData; previous appdata backup is sadly years old.

in /mnt/user/CommunityApplicationsAppdataBackup i created another appdata dir to move contents of CommunityApplicationsAppdataBackup/ to.

But the move operation rewrote the appdata:

mv appdata/ ..

So empty directory /mnt/user/CommunityApplicationsAppdataBackup was moved to /mnt/user/

After this (note realizing what I had done) I moved the contents of appdataBackup previous backups into the new directory:

┌─[Tower]─[/mnt/user/CommunityApplicationsAppdataBackup]
└──╼ mv * ../appdata
mv: failed to access '../appdata': Transport endpoint is not connected

Unsure if this process completed or not. What i do know is listing the contents of CommunityApplicationsAppdataBackup/ definitely still worked prior this last move.

Array was stopped afterwards. Any chance of saving anything from the drive from this state? appdata was set to cache Only (or maybe Prefer) sadly.

 

Also listing all shared fails:

ls -lt /mnt/user
ls: cannot access '/mnt/user': Transport endpoint is not connected

Filesystem on cache drive is xfs.


Edit: full recap of the commands performed:
 

┌─[Tower]─[~]
└──╼  cd /mnt/user/CommunityApplicationsAppdataBackup


┌─[Tower]─[/mnt/user/CommunityApplicationsAppdataBackup]
└──╼  mkdir appdata


┌─[Tower]─[/mnt/user/CommunityApplicationsAppdataBackup]
└──╼  ls
[email protected]  [email protected]  [email protected]  [email protected]  [email protected]  [email protected]  [email protected]  [email protected]  appdata


┌─[Tower]─[/mnt/user/CommunityApplicationsAppdataBackup]
└──╼  mv appdata/ ..


┌─[Tower]─[/mnt/user/CommunityApplicationsAppdataBackup]
└──╼  mv * ../appdata
mv: failed to access '../appdata': Transport endpoint is not connected

^ exit code of this was non-zero

 

Edited by tuxbass
Link to comment
  • 2 weeks later...

Finally mounted the cache partition after long recovery process, and... appdata contents are all there!
How on earth is that possible? Looking back at the entered commands above I can't see how it wasn't overwritten.

Don't get me wrong, I'm over the moon about it, but can't make any sense about what actually happened.

 

Is it because the mv operation targeted /mnt/user, not /mnt/cache?

Edited by tuxbass
Link to comment

Did you ever reboot? Are user shares accessible now?

 

I'm not sure writing files to /mnt/user will actually do anything that will survive reboot. Writing a folder to /mnt/user will result in creating a user share named for the folder and any contents would probably wind up on disk1 or whichever disk was in line for highwater.

 

Not sure what would happen if you deleted a folder from /mnt/user or overwrote /mnt/user with nothing. Maybe it would just break user shares rather than going through all the disks and deleting everything. Not going to try it😉

Link to comment

>Did you ever reboot?
Yes, before reboot absolutely no shares (not only appdata) were accessible.
Delayed rebooting to make sure all the data-recovery is done prior, this was to ensure no writes to cache drive were performed beforehand.

 

Can't believe how lucky I am unraid saved me from myself. At least gained some experience recovering data from xfs 🤷‍♂️

Edited by tuxbass
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.