amuck-landowner

[ovz] large VPS, how you backup with low/no suspension time?

ICPH

Member
Hello,

 

i have one VM which vzdump-X.tgz file is around 100GB large, when creating dump file using "vzdump", the second sync (while VPS is suspended (i use --snapshot, but it fall back to suspend)) takes more than 20 minutes which is becoming not acceptable. VM do not contains large files, but rather more small files.

 

Im having 7000rpm HDDs, CentOS release 6.6 (Final), openvz kernel: 2.6.32-042stab093.5

 

please can You share ideas on how to backup that VM while minimizing its downtime signifficantly?

Thank you
 
Last edited by a moderator:

KuJoe

Well-Known Member
Verified Provider
This is all you need to run, don't use the suspend or snapshot options.

Code:
/usr/sbin/vzdump --compress X
 

ICPH

Member
Thank you alot for sharing the command. The above command mentions: "WARN: this can lead to inconsistent data". The thing im afraid is "inconsistent" mysql database files, but im not sure if i should be really afraid of this. The VPS has several like 1Gb mysqls. Maybe to run mysqldump on that VPS before vzdump?
 

KuJoe

Well-Known Member
Verified Provider
I treat vzdumps like OS backups and not data backups. If you ever need to restore your VPS, restore the vzdump and then restore your data (basically restore your OS with your MySQL config, then restore your databases).


I do at least hourly backups of important databases and at most daily backups or static files, personal vzdumps are done either daily or weekly depending on size and my need.
 
Last edited by a moderator:

willie

Active Member
Backing up running databases doesn't really work: the snapshot can end up in an inconsistent state.  You want replication.  The backup is another mysql instance on a separate machine, taking updates synchronized with the primary.  You can also have hot failover that way.
 
Top
amuck-landowner