3

I have spent a lot of time configuring my computer: shell scripts, path definitions, video settings, as well as lots of programs. The disk is ext3 formatted.

I would like to 1) move everything important to a different computer and and/or 2) transfer it all to a virtual machine that could be run in multiple locations, backed up, snapshotted, etc.

I suspect that I could start by just copying the whole directory, but I'd appreciate it if anyone knows a more optimal solution.

Thanks,

David

3
  • ext3, right? Or maybe ext4? That would be a good thing to add.
    – Nathaniel
    Nov 4, 2009 at 2:26
  • ext3 I updated my question, but how does this affect the answer? Sep 24, 2010 at 2:25
  • Boot off a rescue medium so the disk is not in use and then just TAR it over the wire to the new machine. There have to be a half dozen ways to do this (cpio/tar over ssh, to DVD, to USB, etc.). I'm assuming you only want to do it once. Dec 8, 2014 at 14:40

6 Answers 6

2

If you're going to be doing this often, I would suggest making a custom live CD using a tool like remastersys. It's very easy to use and completely portable.

0
2

You could back up /usr/local and your home directory into version control and then check out a copy for each system you run it on, this is also convenient when you make changes later.

2

You can just copy the whole directory across. I used to provision machines like this:

  • boot from rescue CD
  • partition drive
  • copy entire filesystem using rsync-over-ssh (!)
  • rerun grub-install to install bootloader
  • run a script to change hostname and a few other settings
  • reboot into new system

The (!) is because you need to be slightly careful here with the rsync options. -x stops it trying to copy /proc and /sys. Numeric uid and gid is also a good idea. There are some files in /var that may also cause problems.

If you copy to a machine that has different hardware you may need to rebuild the initrd that has all the drivers in it. See your distro documentation for how to do this.

1

Maybe you can try Clonezilla?

1

Create a VirtualBox machine from your physical.

Step by step instructions:

http://www.torkwrench.com/2009/09/16/creating-a-virtualbox-guest-machine-from-a-physical-machine/

0

GParted on the Live CD has the capability of copying the entire system from one drive to another. That's how I was able to keep everything after my old hard drive was starting to die and have the new system up and running with all of my customizations in under an hour.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .