From owner-freebsd-questions@FreeBSD.ORG Mon Jan 28 22:38:24 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B552D16A4FD for ; Mon, 28 Jan 2008 22:38:24 +0000 (UTC) (envelope-from derek@computinginnovations.com) Received: from betty.computinginnovations.com (mail.computinginnovations.com [64.81.227.250]) by mx1.freebsd.org (Postfix) with ESMTP id 3EFCB13C46E for ; Mon, 28 Jan 2008 22:38:24 +0000 (UTC) (envelope-from derek@computinginnovations.com) MailScanner-NULL-Check: 1202164686.0541@iMdg/2/FdhI3aPpH90PpGg Received: from p28.computinginnovations.com (dhcp-10-20-30-100.computinginnovations.com [10.20.30.100]) (authenticated bits=0) by betty.computinginnovations.com (8.14.2/8.13.8) with ESMTP id m0SMc52i063562; Mon, 28 Jan 2008 16:38:05 -0600 (CST) (envelope-from derek@computinginnovations.com) Message-Id: <6.0.0.22.2.20080128162852.024f5890@mail.computinginnovations.com> X-Sender: derek@mail.computinginnovations.com X-Mailer: QUALCOMM Windows Eudora Version 6.0.0.22 Date: Mon, 28 Jan 2008 16:37:53 -0600 To: "Josh Tremor" , freebsd-questions@freebsd.org From: Derek Ragona In-Reply-To: References: Mime-Version: 1.0 X-ComputingInnovations-MailScanner-Information: Please contact the ISP for more information X-ComputingInnovations-MailScanner: Found to be clean X-ComputingInnovations-MailScanner-From: derek@computinginnovations.com X-Spam-Status: No Content-Type: text/plain; charset="us-ascii"; format=flowed X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Subject: Re: machine migration from 5.3 to 6.3 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jan 2008 22:38:25 -0000 At 03:51 PM 1/28/2008, Josh Tremor wrote: >Okay, I had a freshly installed 6.3 on a machine (thanks Derek >Ragona), and my intention is to use this new installation as a direct >replacement of an older 5.3 box. This means using the same host name, >IP address, and services. I want to make sure I've crossed all the >t's. > >I installed ilohamail and since I'm using mysql for the database, I >need to bring over the tables. So I use mysqladmin to copy all >databases and their tables from the old box and restore them on my new >box. > >Copy over my users' home directories, and copy the /etc/master.passwd >and /etc/passwd files. > >I need to bring over the old httpd.conf file so my virtual hosts are >preserved. Also bring over the related directories with content. > >Run #hostname to change the hostname, and edit the >/etc/rc.conf file to make the change permanent. Edit the /etc/hosts >file also, or copy over the old one. > >To change the address, vi the /etc/rc.conf file to edit the if_config >lines (disconnect the old box from the network, first) and run >#/etc/netstart > >Now I'm really unsure of this step: since this box is an important >dns host, couldn't I copy the entre /var/named structure over? Or is >is best to create fresh ones? It was well over two years ago when I >set bind/rndc up, and I remember not enjoying that. I was hoping to >use the same zone records. > > >I'm the only one who ssh's in, so I don't care about those keys, but >my main concern is to have the mail/dns flowing the way it was before. > The mail is handled by a third party's (Sophos) own postfix >implementation, and they have their own postgres database. > >Is there anything I've missed, or am way off on? Thanks. Usually I tar up and move and untar /etc /usr/local /home and possibly /var depending on what you have there. You don't need to disconnect the old box, you can just swap the ip's if you want between the boxes so both are still on your netowrk. Swapping ip's requires a different /etc/rc.conf file and a hosts file that reflects the current ip and hostname. This is easily done creating a second /etc/rc.conf file say /etc/rc.conf.new edit this file. Do the same with /etc/hosts to /etc/hosts.new To swap the ip's create a shell script such as: ===================================== #!/bin/sh /bin/mv /etc/rc.conf /etc/rc.conf.old /bin/mv /etc/rc.conf.new /etc/rc.conf /bin/mv /etc/hosts /etc/hosts.old /bin/mv /etc/hosts.new /etc/hosts /sbin/reboot ===================================== Assuming you run this on both machines with the correctly edited files, each will reboot to the other's old IP. That way if you need to copy things, you still can do so easily. If you move filesystems between servers run mergemaster once you are done to see if you have any out of date or missing files as you are moving from 5.x to 6.x. -Derek -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. MailScanner thanks transtec Computers for their support.