I just overwrote my folder while mounting a hard disk drive. How do I undo/recover it? I was trying to mount a Linux filesystem on a Mac and accidentally mounted it to my ~/Documents folder using a utility ext4fuse.

Below command is the issued command:

sudo ext4fuse /dev/disk2s7 ~/Documents


And after that, I can't access my ~/Documents folder. Is it there or gone forever?
All the files are still there, you just can't get at them since the mount point has changed the system's ability to resolve files in /Users/whatever (a.k.a.~)

Going forward, try mounting the drive under /Volumes (as in sudo ext4fuse /dev/disk2s7 /Volumes/myDrive)

You should probably reboot the Mac since many programs will have issues saving work to the home folder. If you are working on some important documents, maybe save them to /Users/Shared if you wish, but hopefully you have a good backup system in case this messed things up more than expected.