# Moving jails to another system



## jailed (Aug 25, 2013)

Hello,

I want to move the jails safely to another system. The hosts are same. Both servers are using FreeBSD 9.1-p6 (amd64). I'm not using any tool for creating or using jails. I've followed this tutorial on the FreeBSD Handbook. Should I just copy the files with `cp -R`?

Thanks in advance.


----------



## ta0kira (Aug 25, 2013)

You should use -a rather than -R so that timestamps are preserved, otherwise you could have serious problems later on. You should also mtree the jail before and after, then make sure they match. And, of course, copy the appropriate parts of /etc/jail.conf and /etc/rc.conf, taking into account mount-point changes.

Kevin Barry


----------



## kpa (Aug 26, 2013)

cp(1) does not preserve hard links AFAIK. I would use net/rsync with the options that preserve hard links and file flags.


----------

