Skip to content

Instantly share code, notes, and snippets.

@suhas-karanth
Last active August 28, 2016 05:23
Show Gist options
  • Save suhas-karanth/4a5bda5281b1dfc5c6ad5d2023189f43 to your computer and use it in GitHub Desktop.
Save suhas-karanth/4a5bda5281b1dfc5c6ad5d2023189f43 to your computer and use it in GitHub Desktop.
Home folder migration Ubuntu

Ubuntu home folder migration

Setting up a system takes time and effort. It would be ideal if we could port our settings to the new system.

tar has the capability to preserve permissions for folders and files. We can use the following commands to package the contents of the home folder and unpack it in the new ubuntu system be using the following commands:

tar cpf ~/home.tar ~
sudo tar xpf home.tar home/suhas/ -C . --strip-components=2

Also see http://unix.stackexchange.com/questions/236255/zipping-files-without-changed-its-ownership

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment