Copy of proxmox datastore is much larger than original.

David Fisher

Member
Nov 3, 2016
14
0
21
52
I have created a datastore on a 2TB disk, /dev/sdb.

Code:
Filesystem                   Size  Used Avail Use% Mounted on
/dev/sdb1                    1.8T  947G  794G  55% /datastore

As you can see only 947G is used so far.

Now I have a logical volume 1.4TB mounted on /backup and I'm using rsync to copy the entire contents of my datastore to /backup.

The problem is that the backup drive is getting filled up, even though I have more than enough storage to backup everything.

I ran a quick comparison of one of the image directories. Its roughly 50% larger than the original. Why is this? Why can't I backup using rsync?

Code:
du -sh 104 /datastore/images/104
113G    104
82G /datastore/images/104
 
hi,

what command are you running exactly
 
if the vm images are thinprovisioned then you need to pass the -S flag so rsync deals with sparse files properly.

without -S rsync will take the empty space along.
 
Ah okay, thanks. I guess this explains it.

What about restoring? Will I need the sparse flag then?

The source disk is failing and will be replaced soon, so I'll be copying the backup to the new drive.
 
why don't you use the integrated backup function of PVE?

What about restoring? Will I need the sparse flag then?

restoring what? moving back the VM images? i guess if you use rsync you will need the sparse flag again...
 
why don't you use the integrated backup function of PVE?



restoring what? moving back the VM images? i guess if you use rsync you will need the sparse flag again...


I would but I was in a rush and I know rsync better. Plus I don't find proxmox docs very thorough or with clear useful examples.
 
Last edited: