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

RE: What is the best way to migrate a server to new hardware?



> On Wed, 1 Sep 2010 11:18:38 -0500 <racerx@makeworld.com> wrote:
>
> > On Wed, Sep 1, 2010 at 9:57 AM, Chris <racerx@makeworld.com> wrote:
> > > I like the dpkg method myself. Of course this won't help if you
> > > have lots of custom conf file in etc.
> > >
> > > In that case, creating a tarball of etc would remedy that.
> > >
> > > Clonezilla is another option I like if you want an exact duplicate
> > > (I have used both methods and its a toss up for me what is the
> > > better solution)
> >
> > Thanks, I can use a 'tar ball copy' in Debian without problems?
> > Here's what I did in Gentoo, will this work in Debian. Is there
> > another recommended way to tar and move an OS?
> >
> > # rm /etc/ssh/ssh_host*
> > # rm -iv /etc/resolv.conf
> > # tar cvjfp /mnt/usb/stage4.tar.bz2 / -X debian.excl
> >
> > # cat debian.excl
> > /etc/ssh/ssh_host_*
> > /home/*
> > /mnt/*
> > /media/*
> > /lost+found
> > /proc/*
> > /sys/*
> > /tmp/*
> > /var/tmp/*
> >
> >
>
> Here's one way that I would do this:
>
> On the new box:
> Install Debian per normal.
>
> Old Box:
> #sudo dpkg --get-selections "*" >> installed_packages.txt
> copy the file, installed_packages.txt to the new box
>
> On Newly install Debian:
> #sudo dpkg --set-selections < installed_packages.txt
> #sudo apt-get -u dselect-upgrade
>
> This will read the file installed_packages.txt
> and will install these into the new Debian system.
>

Does this method mark the previously packages that were auto as such on the new system, or are they all considered installed manually?

> Once that's up to date, take your tarball of /etc from the old box,
> dump it to a temp dir in the new, decompress it, copy the .conf files
> that you modified (and any other dirs/files you yourself have created
> to /etc on the new box.
>
> This method has a little work to be done (and thank you Howtoforge for
> the nifty little trick) but works pretty well for my needs.
>
> This same process will work for a workstation also. Then again,
> Clonezilla (again, one that I use often when I want to archive my
> system and need to restore on the same hardware at any given point)
> should work also.
>
> But as others have pointed out, there are many ways to do this. You
> just need to blaze your own path and see what works best for you.
>

Reply to: