[Users] File-tree CT backup

Martin Dobrev martin at dobrev.eu
Fri Apr 30 04:32:19 EDT 2010


On 30.4.2010 г. 09:51 ч., Marc Olive wrote:
> El Thursday 29 April 2010 15:08:44 Martin Dobrev va escriure:
>    
>> Hi
>>      
> Many thanks for the complete answer.
>
>
>    
>>> ]$ backup /var/lib/vz/private/$CID (¿vz/root/$CID?)
>>>        
>> There is no need to backup files from the private folder, if you already
>> chkpnt-ed the VE
>>      
> Ok, I only need to backup root folder.
>    
Actually on vzctl create only the /vz/private/$CID folder is being 
created and bind-mounted to /vz/root/$CID on vzctl start... You have to 
backup always the /vz/private/$CID folder on a not-runnig VE, or if 
you're using LVM for example, you can create a snapshot of the VE, and 
then backup it.
Backing up directly /vz/root/$CID on a running VE can lead to different 
problems. Have in mind, that the kernel mounts /proc (/dev dep. on the 
VE configuration) inside the VE. On heavy loaded VEs it's almost sure 
that you won't be able to backup everything.
>
>    
>>> In case my server was completly lost, will I have enought information to
>>> restore the CT? how should I restore them? Maybe with a process similar
>>> as when I create them from a template?
>>>        
>> If you backup the dumpfiles from the containers, you can vzctl restore
>> the VE in case of a server failure (data loss).
>>      
> Hmm... I will check and test, I do not get cleary how to get back the
> containers.
> Is this correct: supose I have backuped vz/root/$CID and /etc/vz/$CID.conf and
> the CT0 server is stolen. I get a new hardware computer and I have a fresh
> Linux instalation from scratch. To restore a CT I only need to place the
> backup files (vz/root/$CIT and /etc/vz/$CID) to it's directory on the new
> server? Or I should do something else or similar to "vzctl create"?
> There's no need to restore the CT session with the dumpfile, a halt and boot
> it's acceptable.
>
>
>    
I'm backing up always the /vz/private/$CID folder and the corresponding 
configuration. This is sufficient to have a VE running on different host 
system. I only copy the configuration and restore the /vz/private/$CID 
folder on the new host system and start it the regular way after that.
>>> Any other tip or advise besides to test the whole process?
>>>
>>> Thanks,
>>>        
>> Best regards,
>> Martin Dobrev
>>      
> Bests,
>
>
>    
>> Chief System Administrator
>> Amotera BG Ltd.
>>
>> Sofia, Bulgaria
>>      
>
>    



More information about the Users mailing list