1

I ran a mount command that mounted the rootfs into my home directory I've hence lost all my data in the home directory. Is there a way to get the data back?

Kusalananda
  • 320,670
  • 36
  • 633
  • 936
brian
  • 11
  • 1
  • 3
    Almost certainly you haven't lost your data, and it's just temporarily inaccessible. What exact command did you run? – roaima Apr 22 '23 at 07:40
  • 1
    Mounting a filesystem on a directory hides the original content of that directory until you unmount the filesystem. – Kusalananda Apr 22 '23 at 10:24
  • Possible duplicate of [Access to original contents of mount point](https://unix.stackexchange.com/q/4426) – Kusalananda Apr 22 '23 at 10:25

1 Answers1

0

With umount -R /home you will unmount the rootfs from your home folder. Your data isn't lost, it is just temporary unavailable, because you mounted another drive/file system to where /home is.

Grigorios
  • 151
  • 10