Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


In this Discussion

Openvz vzctl snapshot and restore on ploop help
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

Openvz vzctl snapshot and restore on ploop help

SaahibSaahib Host Rep, Veteran

In short:
I want to know how to restore backup taken using "vzctl snapshot" ?

In detail :
In an openvz server, which now I look after, backups are taken of VMs using :

vzdump --compress --dumpdir /mnt/backup --suspend -all

However, it puts down each container for around 10 mins .

I can't take vzdump snapshot using LVM (thus avoiding downtime) as this machine has no free LVM space.

But now with ploop, vzctl allows to take snapshot without using LVM , so if I follow this guide ..
Which has following script:

#Known snapshot ID
CTID=$1
ID=$(uuidgen)
VE_PRIVATE=$(vzlist -H -o private $CTID)
DESTINATION=$2

 # Take a snapshot without suspending a CT and saving its config
 vzctl snapshot $CTID --id $ID --skip-suspend --skip-config

# Perform a backup using your favorite backup tool
# (cp is just an example)
cp $VE_PRIVATE/root.hdd/* $DESTINATION

# Delete (merge) the snapshot
vzctl snapshot-delete $CTID --id $ID

So its taking ploop snapshop, copying file to backup location and then remove snapshot (merge).

Ok.. thats the backup..but how do I restore this kind of backup ?.....

Because I see following files in backup folder :

DiskDescriptor.xml
DiskDescriptor.xml.lck
root.hdd
root.hdd.{bc277312-585e-4b68-bb1f-7c91d1d7737e}

Comments

  • jarjar Patron Provider, Top Host, Veteran

    The logic of dump/restore with ploop threw me for a loop as well. I've yet to take the time to put it all together in my head, but I've bridged the gap by using these scripts below and I think you'll find them to be very helpful.

    https://github.com/andreasfaerber/vzpbackup

    I carry projects in OVZ containers for fast packaging and isolation, and I've moved containers (with ploop) multiple times with minimal effort using this.

  • SaahibSaahib Host Rep, Veteran

    @Jar said:
    The logic of dump/restore with ploop threw me for a loop as well. I've yet to take the time to put it all together in my head, but I've bridged the gap by using these scripts below and I think you'll find them to be very helpful.

    https://github.com/andreasfaerber/vzpbackup

    I carry projects in OVZ containers for fast packaging and isolation, and I've moved containers (with ploop) multiple times with minimal effort using this.

    That was relief to know that you I am not the only one.. but the script you link gave is exactly I am looking for though I had encountered while I was googling for answer but hanks for making me to looking into it deeply , its rather a polished one..

Sign In or Register to comment.