Unable to image although disk is only 1.7Gb
I'm trying to take an image of my disk. It has nothing but Nginx and Certbot installed on ubuntu 18.
Linode Image fails and says the drive is 2.6GB which is larger than the allowed 2GB .
Command below shows total size of 1.7G. Any ideas where it's getting 2.6GB from and how I can reduce the size somehow?
sudo du -h --max-depth=1 / | sort -h
1.7G / <--- Am I missing something?
Because a disk image is a bit-for-bit copy of the drive, the entire filesystem is included in the image, resulting in a file that is the size of the entire partition/drive being copied, rather than just the size of the data living on it. Based on this, my guess is that you likely just need to resize your disk below 2GB prior to creating the image. If you follow the instructions in our guide on Resizing Your Disk, I'm confident you'll be able to create that image.
As an alternative, or if you still have issues but want to get a copy of your setup made in the meantime, you can follow our guide on Copying a Disk Over SSH, which will guide you through the process of using SSH and the 'dd' command to make an image to your local computer.
Linode Support Team
First, check to see if the output of
df -h yields a different result. The commands
du report disk usage in different ways, so
du may not be giving you a complete picture. You can review their
man pages for more info or check out these links:
df -h still reports under 2GB used, at that point I'd recommend reaching out to Linode's Support Team to try to resolve the issue.