best way to backup to keep VM downtime minimal

proxwolfe

Member
Jun 20, 2020
243
11
23
47
Hi,

I am struggling with a backup job that takes "forever" (the disk that is being backed up is large - but mostly empty).

Unfortunately, not only does the backup take forever, while it is going on, the VM is "frozen" (backup is configured as snapshot but I read that, since the guest agent is installed, PVE sends a freeze command to the VM) and unresponsive.

So, other than speeding up the backup process as such (see my other post), what is the best way to reduce downtime during backup (I would rather keep doing backups during the day as well and not just during the night when nobody is affected)?

Thanks!
 

dcsapak

Proxmox Staff Member
Staff member
Feb 1, 2016
8,237
1,046
164
34
Vienna
normally the 'freeze' is only for the start of the backup, after that it will be immediatly thawed. the way we do qemu backups it's still consistent

(the disk that is being backed up is large - but mostly empty).
is it really empty or are there just deleted files? if the disk is on a storage with can be thinly provisioned (qcow2/raw files/lvmthin/etc.) a 'real' zero may be faster than reading the block device
maybe there is just a 'trim' necesary to tell the storage which parts are really deleted, those should not take long to read (since they should return zero anyway)
 

proxwolfe

Member
Jun 20, 2020
243
11
23
47
normally the 'freeze' is only for the start of the backup, after that it will be immediatly thawed.
So how long are we talking here?

My browser times out while waiting for the VM to deliver a web page. I don't know how long itwas after the start of the backup, but it certainly was not immediately after.

But to your point, after a while, with the backup still going on (it is actually still going on now), the web site was online again.

is it really empty or are there just deleted files?
Freshly formatted, but no zeros.
if the disk is on a storage with can be thinly provisioned
It's a physical disk passed to the VM. And I'd rather keep it that way - so if anything happens, I can more easily get to the contents. But for other disks, should I need that size, I'll keep that in mind.

maybe there is just a 'trim' necesary to tell the storage which parts are really deleted
I have only come across 'trimming' in the SSD context. Can that be done on HDDs as well?

Thanks!
 

dcsapak

Proxmox Staff Member
Staff member
Feb 1, 2016
8,237
1,046
164
34
Vienna
So how long are we talking here?
this depends. if you have the guest-agent installed it can call a fsfreeze hook in the guest which may do additional things (shadow copy snapshot on windows can take a while for example)
 

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 your own in 60 seconds.

Buy now!