1

I have an OpenVZ container on 1 host and I would like to clone it over to my server.

both run SolusVM. I only have root access to my server and would like to host the container on my server now.

Can I use rsync to clone the drive while the OS is running on both?

Using a command like this:

rsync -uazPx --exclude='/boot' --exclude='/proc' --exclude='/dev' --exclude='/lib' --exclude='/tmp' --exclude='/var/lock' / root@1.2.3.4:/ 

Is there any other areas I should probably not copy over?

Tiffany Walker
  • 6,541
  • 13
  • 53
  • 77

1 Answers1

1

If you have root in your container, yes, just be sure that you don't have any application using data that should be moved consistently (like a mysql server). Is so, you'd be better stopping the application during your last rsync. (you can do multiple rsync to minimize the downtime of such application). You also be better be careful about stopping all your application in your target container

user2299634
  • 147
  • 4