Checkpoint/Backup of a container [message #34479] |
Fri, 09 January 2009 13:56 |
gurtaj
Messages: 12 Registered: September 2008 Location: London, Ontario, Canada
|
Junior Member |
|
|
Hello, all. I've been reading and playing with OpenVZ, and have spent some time thinking about how to backup a container.
To backup a container I need to do a dump of it and also to make a copy of the filesystem at the time of the dump, right? If the filesystem is modified between the moment of the dump and the moment when the container is restored, errors might occur, so I need to keep a copy of the filesystem at the moment. Am I right?
Now, from what I understood from Andrey Mirkin ( http://forum.openvz.org/index.php?t=msg&goto=13558&& amp;srch=checkpoint#msg_13558), the best way to backup a container is to execute:
vzctl chkpnt VEID --suspend
vzctl chkpnt VEID --dump
vzctl chkpnt VEID --resume
There's no way to backup a container without suspending it, right?
|
|
|
Re: Checkpoint/Backup of a container [message #34485 is a reply to message #34479] |
Sun, 11 January 2009 17:08 |
Martin Maurer
Messages: 13 Registered: January 2008
|
Junior Member |
|
|
gurtaj wrote on Fri, 09 January 2009 08:56 | Hello, all. I've been reading and playing with OpenVZ, and have spent some time thinking about how to backup a container.
To backup a container I need to do a dump of it and also to make a copy of the filesystem at the time of the dump, right? If the filesystem is modified between the moment of the dump and the moment when the container is restored, errors might occur, so I need to keep a copy of the filesystem at the moment. Am I right?
Now, from what I understood from Andrey Mirkin ( http://forum.openvz.org/index.php?t=msg&goto=13558&& amp; amp;srch=checkpoint#msg_13558), the best way to backup a container is to execute:
vzctl chkpnt VEID --suspend
vzctl chkpnt VEID --dump
vzctl chkpnt VEID --resume
There's no way to backup a container without suspending it, right?
|
see vzdump
http://wiki.openvz.org/Vzdump
or just use Proxmox VE - including a GUI for vzdump.
|
|
|
|
Re: Checkpoint/Backup of a container [message #34489 is a reply to message #34487] |
Mon, 12 January 2009 07:09 |
Martin Maurer
Messages: 13 Registered: January 2008
|
Junior Member |
|
|
januszzz wrote on Sun, 11 January 2009 17:32 | Hmm, vzdump is cool, but what it reaqlly does? AFAIK it does rsync, then freezez VE, rsyncs again, then resume.
|
vzdump has different modes. if you work with LVM snapshots you have no freeze and no downtime.
1. Stop the VE during backup (very long downtime)
2. Use rsync and suspend/resume (minimal downtime)
3. Use LVM2 (no downtime, online)
januszzz wrote on Sun, 11 January 2009 17:32 | So what if a database is running inside VE and it writes to the disk almost continously during the backup operation ? can I be sure I'll launch the databse in consistent state after restore of VE?
I guess I cannot. Still the database should be stopped or archived using its own tool. And this is difference to VMware snapshot, Virtualbox or KVM snapshot.
Am I right?
|
if you cannot life with a snapshot you need a backup software which is aware of the applications running. E.g. if you backup a microsoft active directory the backup software has to tell the microsoft server that there is a backup otherwise you can never restore.
most backup software vendors sells separate backup agents for this.
On Linux, doing backups with snapshots is working 99,9 % - thats my experience.
br, martin
|
|
|
|
|
|
Re: Checkpoint/Backup of a container [message #34560 is a reply to message #34489] |
Sat, 17 January 2009 23:21 |
gurtaj
Messages: 12 Registered: September 2008 Location: London, Ontario, Canada
|
Junior Member |
|
|
Martin Maurer wrote on Mon, 12 January 2009 02:09 |
januszzz wrote on Sun, 11 January 2009 17:32 | Hmm, vzdump is cool, but what it reaqlly does? AFAIK it does rsync, then freezez VE, rsyncs again, then resume.
|
vzdump has different modes. if you work with LVM snapshots you have no freeze and no downtime.
1. Stop the VE during backup (very long downtime)
2. Use rsync and suspend/resume (minimal downtime)
3. Use LVM2 (no downtime, online)
|
The third option seems interesting, but requires a different setup than the one I'm using right now. However, I'll take note of it for the future.
Thanks.
|
|
|
|