Oh man I feel sorry for you, however all is not lost. the best thing you can do is STOP using the computer switch it off. Lookup a local data recovery specialist tell them everything you did, With a bit of luck they can recover a lot of the data you had.
The only data you will lost is what has been overwritten, I don’t know how much a freshly installed Ubuntu takes up but as long as you didn’t choose to Encrypt the Ubuntu install and overwrite unused space then there will be good data still sat on the disk.
If you cannot afford data recovery as it usually is quite expensive I would do the following.
STEP 1 (Optional but recommended)
Take a byte for byte image of the drive using a live CD such as TRK
you can use dd
to do this
I'm asuming you have one hardrive and its /dev/sda
The next command is going to take an exact copy of your hard drive so you will need somewhere with enough space to fit this copy. If your hard drive is 500GB you need 500GB of space
dd if=/dev/sda of=/mnt/myexternaldrive/drive.img
Step 2
run photorec
to recover files.
Note that this will scan your hdd or image for common file types it does not recover file names.
photorec /mnt/myexternaldrive/drive.img
follow the onscreen instructions it will ask you for a location to restore files to make sure it has plenty of room to do this. You can also fine tune it to just recover say your pictures or your documents.
Like I say professional data recovery is the best route but I have recovered a lot of data using the above method.