Undeleteting a file in Ubuntu

Future me, please note that I'm not claiming that the following solution is recommended, but it worked for me this time:

sudo mount --options=remount,ro /dev/sdb1
sudo apt-get install extundelete
sudo extundelete --restore-file /home/username/datafolder/importantfile.txt /dev/sdb3
sudo extundelete --restore-directory /home/username/datafolder/ /deb/sdb1
sudo extundelete --restore-all /dev/sdb1

This restored my file and surprisingly few other files. I guess when you delete something in Ubuntu, you better act fast.