VMs Linux smaller

claudiomiguelmuller

Active Member
Oct 8, 2013
30
0
26
Hello, to make VM backups smaller, someone uses this command inside VM / Linux:

dd if = / dev / zero of = zero.small.file bs = 1024 count = 102400
dd if = / dev / zero of = zero.file bs = 1024
sync; sleep 60; sync
rm zero.small.file
rm zero.file

I want to know if there is anything better to do to decrease backups of VMs that are on Linux.
 

Attachments

  • 1605642504435.png
    1605642504435.png
    312 bytes · Views: 1
Hey,

have you considered using PBS? It supports encryption, compression and incremental backups, which will reduce the size of your backups by a lot.
 
I want to know if there is anything better to do to decrease backups of VMs that are on Linux.
Instead of this hacky way to mark sectors with zeros, try to run discard/trim on the file system.

In order for this to work, the disk should be attached as SCSI to the VM with the SCSI-virtio-controller. Then the discard commands can be passed through to the actual storage, unused areas should get zeroed and the backups should get smaller as zeros can be compressed very well :)
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!