More self-inflicted problems that having backups would have completely avoided. testdisk and/or photorec are problems best avoided. Learn from this.
14.04 standard, free, supported ended earlier this year. Upgrading to a new release would have been easier if done BEFORE support ended. Lots of people trying after support ended are having issues. Moving to 18.04 is the best choice at this point. Servers should only run LTS releases, except under extraordinary reasons.
Boot from a USB live-boot install, use a desktop version of Ubuntu (the DE doesn't matter, whatever you like).
Mount all the partitions on the directly connected disks. I'd mount them under /mnt/ for this temporary purpose.
Run df -h and df -i to see which partitions are 100% used.
To find big files, use find.
Code:
sudo find /path/to/each/mount -type f -size +1G -print
If that doesn't find any large files, change the size to +500M, then +250M ....
You can also search by file name ... -iname \*mov or create date -ctime and you can use AND and/or OR connectors for some binary logic in how find works.
Copy off the files you want to keep. Don't forget to get everything in /etc/ and /usr/local/. There could be files under /var/lib/ that you need too. The server admin should know where these files are located.
After you get /var and / to have a little free space, 1-2G should be enough, boot back into the normal OS and make a list of installed packages using apt-mark.
Code:
apt-mark showauto | tee $local_backup/apt-mark.auto
apt-mark showmanual | tee $local_backup/apt-mark.manual
######[ to restore pkgs ]#######
### sudo apt-mark auto $(cat apt-mark.auto )
### sudo apt-mark manual $(cat apt-mark.manual)
### sudo apt-get -u dselect-upgrade
Copy those files with the list of packages off. The plan is to do a fresh 18.04 install, then use the "manually" installed list to have the fresh install load those into the new OS install. Some won't exist in 18.04, but most will. The automatic list shouldn't be needed, since dependencies will be a little different for the different packages.
When you copy off the files, be certain that the permissions are retained - owner, group, and all the rwx stuff plus any ACLs. None Linux file systems will drop that information. Probably cannot copy/back up the files without using sudo, or the ownership+group will be lost.
Bookmarks