OpenVZ Forum


Home » General » Support » moving containers need help
Re: moving containers need help [message #42912 is a reply to message #42851] Thu, 16 June 2011 11:34 Go to previous message
seanfulton is currently offline  seanfulton
Messages: 105
Registered: May 2007
Senior Member
Simplest thing is:

mkdir /newvz

mount /dev/sda2 /vz
mount /dev/sda3 /newvz

/etc/rc.d/init.d/vz stop

cd /vz
find . -print | cpio -pvdum ../newvz

when it's done,
umount /vz
umount /newvz

mount /dev/sda3 /vz
/etc/rc.d/init.d/vz start

THEN MAKE SURE YOU EDIT /etc/fstab

With this approach, you will still have your data on /dev/sda2 if for some reason you messed it up, and you can retrieve it by doing:
mkdir /oldvz
mount /dev/sda2 /oldvz

Good luck!

sean
 
Read Message
Read Message
Previous Topic: Can't Execute Mount on Container to Mount From Different Machine Server
Next Topic: mysql on HM
Goto Forum:
  


Current Time: Sun Sep 07 18:24:06 GMT 2025

Total time taken to generate the page: 0.09767 seconds