I'm trying to use a live USB to run DD in order to backup my OS drive before I do a complete reinstallation on that drive. I have a SMB server running Ubuntu Server 20.04 LTS, and I'm able to access the contents of this server from all devices on my network.
The commands I've tried to run (from a root shell) are as follows. I have already created the directory /mnt/backup:
Code:
mount -t cifs -o ip=[server.ip],username=[user],password=[pass] //share/name /mnt/backup
dd if=/dev/nvme0n1 | gzip -c | dd of=/mnt/backup/images/nvme.img.gz
DD throws this error:
Code:
dd: failed to open '/mnt/backup/images/nvme.img.gz': Permission denied
I find it very strange that DD can't get permission when running as the root user, so my suspicion is that it's somehow related to how mount interacts with a network device. Or maybe I'm an idiot and I have a malformed command or missing flag.
Any suggestions are appreciated, even if that suggestion is an entirely different approach. I just want to have this backup and I don't care much how.