[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ezjail] Moving jails between hosts




On Feb 27, 2009, at 10:08 AM, Doug Poland wrote:

Michael Scheidell wrote:
Doug Poland wrote:
I've got two nearly identical servers and I need to move jails from one host to the other. I thought that the archive/restore command would be the ticket for me, but have many problems with the archive functionality.

If I cannot use archive/restore, could someone outline the steps I would need to take to move a jail from one host to another? Many thanks!

I needed to make sure that the basejail directories were the same, so I did (a couple of)
rsync -avu source target
then reversed them.
So, simply create the jail on both hosts, verify base directories are the same, then simply rsync the entire jail from one host to the other? Too easy :)

That's how I've done it, a number of times. For the sake of completeness:

1. configure your jail template(s) on the new jail host identically to the templates on the old host
   2. create the target jails on the new host
   3. pre-sync the jail contents from the old server to the new
rsync --av oldserver:/home/jails/<jailname>/ /home/jails/ <jailname>/
   4. shut down the target jail on both servers
5. rsync --av --delete oldserver:/home/jails/<jailname>/ /home/ jails/<jailname>/ 6. move the jail IP from the old machine to the new one (if required)
   7. start up the jail on the new server

Matt