I'm trying to figure out why my disk image is so much larger. Here is the source server's disks:
root # df -h
Filesystem Size Used Avail Use% Mounted on
udev 1.9G 0 1.9G 0% /dev
tmpfs 395M 7.1M 388M 2% /run
/dev/sda 79G 43G 32G 58% /
tmpfs 2.0G 0 2.0G 0% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 2.0G 0 2.0G 0% /sys/fs/cgroup
tmpfs 395M 0 395M 0% /run/user/0
and I'm creating it with:
ssh root@109.74.201.x "dd if=/dev/sda " | dd of=/backup/server-images/west.img
It's still running and the image is 72gb so far - so almost double the actual size of the disk its backing up. What am I missing? If I have a 200gb disk, is it going to be 400gb+ ?
Yet the image is
/dev/sda
is 80 GB in size, what do you expect? You are cloning the whole drive, including "empty" regions - not just your files. – Panki Dec 10 '20 at 09:18dd
never knows what files it's actually writing to the image. Also, this way of creating a backup is not guaranteed to work. – Panki Dec 10 '20 at 09:20