Editing
VPS Management
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Moving customer to another jail machine == Systems should only be moved between similarly-versioned jails. If you cannot get a match, you should go to freebsd.org and see what the differences were between the version you're moving from and the new version. Many of the updates will be to drivers and kernels - these don't affect the customer. Perhaps they updated traceroute or a library...you should copy the new/changed files into the VPS/jail on the new host. An alternate method for moving to a different version would be to buildworld to bring their full distribution up to date. Optional steps for this kind of upgrade are included below. 1. <tt>g <customerID></tt> 2. <tt>[[#jailkill|jailkill]] <hostname></tt> 3. create new device on target system<br> 4.x:<br> <pre>vnconfig –T –S 4g –s labels –c /dev/vn1 /mnt/data1/69.55.22x.x-col00XXX disklabel –r –w vn1 auto newfs /dev/vn1c</pre> 6.x:<br> <pre>bsdlabel -r -w /dev/gvinum/v1 newfs /dev/gvinum/v1a or gconcat label v1-v3 /dev/gvinum/v1 /dev/gvinum/v2 /dev/gvinum/v3 bsdlabel -r -w /dev/concat/v1-v3 newfs /dev/concat/v1-v3a</pre> 7.x+:<br> Run jailmakeempty then skip step 4 & 7 below 4. make and mount the dir on new system. <br> Ex: <pre>mkdir /mnt/data2/69.55.230.3-col00123-DIR chmod 755 /mnt/data2/69.55.230.3-col00123-DIR mount [device] /mnt/data2/69.55.230.3-col00123-DIR</pre> 5. [[#stopjail|stopjail]] <hostname> 1 6. dump fs to new system. ex: <tt>[[#dumpremoterestore|dumpremoterestore]] /dev/vn51 10.1.4.118 /mnt/data2/69.55.239.45-col00688-DIR</tt> (make sure you can ssh as root on remote machine) 6a. OPTIONAL BUILDWORLD:<br> cd /usr/src make world DESTDIR=/mnt/data2/69.55.xxx.xx-col0xxxx-DIR cd etc make distribution DESTDIR=/mnt/data2/69.55.xxx.xx-col0xxxx-DIR (you may have to rm an openssh file and re-make dist) rm -rf /mnt/data2/69.55.xxx.xx-col0xxxx-DIR/etc/periodic/daily/400.status-disks vi /etc/periodic/security/100.chksetuid replace: <tt>MP=`mount -t ufs | grep -v " nosuid" | awk '{ print $3 }' | sort`</tt><br> with: <tt>MP='/' (use single quotes)</tt> Ask user if they want ports overwritten with current, if yes: cp -r /usr/ports /mnt/data2/69.55.xxx.xx-col0xxxx-DIR/usr on source: cd /mnt/data2/69.55.xxx.xx-col0xxxx-DIR/etc; vipw –d . (copy in all info) on target: cd /mnt/data2/69.55.xxx.xx-col0xxxx-DIR/etc; vipw –d . (paste all info) on source: cat /mnt/data2/69.55.xxx.xx-col0xxxx-DIR/etc/group (copy in all info) on target: cat > /mnt/data2/69.55.xxx.xx-col0xxxx-DIR/etc/group (paste all info) 7. edit quad on source system copy over entries for the jail to the target system take care that the vn/gvinum/gconcat/md devices on the target system are’t in use and that the /mnt/dataN path doesn’t need changing 8. run [[#buildsafe|buildsafe]] (if this is <=6.x) on target system (copies changes made to quad into safe file) 9. remove ip from source system. Ex: <tt>ipdel 69.55.230.3</tt> 10. add ip to target system. Ex: <tt>ipadd 69.55.230.3</tt> 11. start new system, with [[#startjail|startjail]] or manually, pasting entries found from running <tt>g <customerID></tt> on the new system 12. run <tt>[[#canceljail|canceljail]] col0xxxx</tt> on source system. This should prompt you to remove backups if any existed. Do not let it do this, rather: 13. if backups existed move them to the new host via the <tt>[[#mvbackups_.28freebsd.29|mvbackups]] script</tt> 14. edit quad on source system, edit comment to reflect a move rather than a cancel, ex: <tt># moved to jail2 col00241</tt> 15. edit mgmt to reflect new host and dir for new system 16. optional add ipfw rules on new system. Ex: <tt>ipfw add 01231 count ip from 69.55.230.2 to any ipfw add 01232 count ip from any to 69.55.230.2</tt>
Summary:
Please note that all contributions to JCWiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
JCWiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
View history
More
Search
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Tools
What links here
Related changes
Special pages
Page information