<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>I found why registering my backup CT failed, in the
/vz/private/MyUUID/* there were some missing files (dot/hidden
files) not beeing saved .<br>
</p>
<p>now that my backup script does takes all /vz/private/MyUUID/* and
.* file recursivly, moving MyUUID backup folder to a different
host, allows me to register that manually moved CT :<br>
</p>
<p><i># prlctl register /vz/private/MyUUID --preserve-uuid </i><i><br>
</i></p>
<p><i>Register the virtual environment...</i><i><br>
</i><i>The virtual environment has been successfully registered.</i><i><br>
</i><i># prlctl start idm</i><i><br>
</i><i>Starting the CT...</i><i><br>
</i><i>The CT has been successfully started.</i><br>
</p>
<p>However in the backup process it persist a confusion , the
snaphot hdd is preserved as a reference in
root.hdd/DiskDescriptor.xml</p>
<p>indeed , in step2 (rsync) of my backup script : <br>
</p>
<div class="moz-cite-prefix"><i>#VARs </i><i><br>
</i></div>
<div class="moz-cite-prefix"><i>ID=$(uuidgen)</i><i><br>
</i><i>VE_PRIVATE=$(vzlist -H -o private $CTUUID)</i><i><br>
</i></div>
<div class="moz-cite-prefix"><i>#step1 do a snaphost </i><i><br>
</i></div>
<div class="moz-cite-prefix"><i>vzctl snapshot $CTUUID --id $ID
--skip_dump</i></div>
<div class="moz-cite-prefix"><i>#step2 backups /vz/private/CTUUID</i><i><br>
</i></div>
<div class="moz-cite-prefix"><i>cd $VE_PRIVATE/ ; rsync -avpH .
$BACKUPPATH/</i></div>
<div class="moz-cite-prefix"><i>#step 3 remove snapshot merging
snapshot to root.hdd</i><i>/root.hds<br>
</i></div>
<div class="moz-cite-prefix"><i>vzctl snapshot-delete $CTUUID --id
$ID</i><i><br>
</i></div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix">in step2, the snapshot is still there,
referenced in DiskDescriptor.xml , root.hdd directory containing
<br>
</div>
<div class="moz-cite-prefix">root.hdd/DiskDescriptor.xml<br>
root.hdd/root.hds<br>
root.hdd/root.hds.{7fb5448c-afd9-4b87-a4d8-4e5089c43ad4}<br>
</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix">then what's the need to do a snapshot
if finally I am going to live copy (rsync) an active snapshot
file , here root.hds.{7fb...}</div>
<div class="moz-cite-prefix">isn't it breaking all the consistency
of the CT to be restored later from that live backup ? <br>
</div>
<div class="moz-cite-prefix">for me it seems as if saving (rsync)
live root.hdd/root.hds in the first place whitout doing a snapshot
is the same consitency pb as with live backup of root.hds.{7fb...}</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix">I am missunderstanding snapshots
advantage for backups ? <br>
</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix">Regards . <br>
</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix">Le 03/12/2018 à 18:48, Jehan Procaccia
a écrit :<br>
</div>
<blockquote type="cite"
cite="mid:c51e01ba-fc4c-8ef3-4a8c-f240a5e52ab7@tem-tsp.eu">Hello,
<br>
<br>
I did a backup of my CT by following advices from
<a class="moz-txt-link-freetext" href="https://forum.openvz.org/index.php?t=msg&th=13160&start=0">https://forum.openvz.org/index.php?t=msg&th=13160&start=0</a>
=> take a snaphot, copy hdd files, delete snapshot .
<br>
<br>
Now I moved the backup hdd and all file under /vz/private/MyUUID/*
to a different host .
<br>
<br>
How can I restore/register that CT to the new host ?
<br>
<br>
I tried
<br>
<br>
# prlctl register /vz/private/MyUUID --preserve-uuid
<br>
<br>
Failed to register the virtual environment:
PRL_ERR_VZCTL_OPERATION_FAILED (Details: Invalid ctid is
specified:
<br>
)
<br>
<br>
but it fails with the error message above .
<br>
<br>
did I missed a step ?
<br>
<br>
I also create from the /etc/vz/conf/ a link to ve.conf
<br>
<br>
# ln -s /vz/private/4439d07e-4d30-496a-b141-8dfa4df77c4d/ve.conf
4439d07e-4d30-496a-b141-8dfa4df77c4d.conf
<br>
<br>
but it still fails to register the CT .
<br>
<br>
thanks for your help .
<br>
<br>
<br>
</blockquote>
</body>
</html>