it can be done from the console.
Recovery console is always root, so there is no need for sudo.
drop in a usb stick, wait a bit, then check dmseg to be sure it saw it-
then run
mount
without any arguments. See if the USB stick got mounted or not. In recovery mode, it might not. If it did not, here is how to mount it from the console:
first, make a mountpoint to mount it at. Traditionally, manual mounts are done at /mnt.
So, make a folder there to serve as the mount point.
mkdir /mnt/usb
once the mountpoint is made, we can mount the USB device. The info we got from dmesg will tell us what device ID it got when it was attached. For the sake of argument, I will assume it is /dev/sdb. Substitute as appropriate.
We actually want to mount the first partition on the device, which with the example, would be /dev/sdb1
[for FAT flavored partition]
mount -t msdos /dev/sdb1 /mnt/usb
[for ext3 flavor partition]
mount -t ext3 /dev/sdb1 /mnt/usb
[for ext4 flavor partition]
mount -t ext4 /dev/sdb1 /mnt/usb
Verify that the mount completed by calling mount with no options again.
mount
it should show up in the list, usually toward the bottom.
verify that there is sufficient free space on the volume by calling df.
df
Once you have that done, the best way to get all your data, is to just copy *EVERYTHING* in your /home directory there. I prefer to use rsync for this, since it can resume if there is an error, and give a nice progress indication.
rsync -v -r -L -k --progress /home /mnt/usb
wait for it to finish doing its thing, then flush the cache manually with sync
sync
then unmount the USB stick
umount /dev/sdb1
you can then remove the stick safely.
For creating a bootable USB device:
Modern distro ISO files are often "Hybrid ISO" images, that can be directly written to USB devices with dd.
Pull a suitable installer image from the internet with wget. You said you are using ubuntu 18.04?
first, put the iso some place you can store it safely. /home/[your user acct] usually works fine.
cd /home/[your user account]
then get it with wget. (hopefully it is installed...)
[this will get the 64 bit flavor desktop image iso for that release.]
wget
https://releases.ubuntu.com/18.04/ubuntu-18.04.5-desktop-amd64.isoonce you have it, dd the image to a USB stick.
insert the USB stick, then check dmesg to get its device ID. Once you have it, we are ready to proceed. For the sake of argument, I will assume it is /dev/sdb once again.
dd if=ubuntu-18.04.5-desktop-amd64.iso of=/dev/sdb bs=4096 status=progress
Wait for it to finish. then issue sync.
sync
once it returns to console, you can safely remove, because nothing was mounted. attempt to boot on the stick, and see if it works.