Skip to content

Instantly share code, notes, and snippets.

@thwarted
Created April 5, 2011 04:21
Show Gist options
  • Save thwarted/903028 to your computer and use it in GitHub Desktop.
Save thwarted/903028 to your computer and use it in GitHub Desktop.
migrating to a newly acquired computer
# install operating system onto new drive
# previous computer's drive is mounted in /mnt/oldinstall
# install all software my previous machine had installed
# - might want to trim off distribution and arch if going to a new release
# - or just skip this if going to a new release
yum install $( diff <( chroot /mnt/oldinstall rpm -qa | sort ) <( rpm -qa | sort) | grep \< | cut -c3- )
# or apt-get if you have it
# copy home directories
cp -avr /mnt/oldinstall/home/* /home
# there is no step three.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment