Copy one partition to another using rsync, dd, or GParted
NOTE: Following are just for copying one partition from another, they don’t discuss generating new UUID and editing fstab
that you will have to do if you want to change the mount points
1sudo rsync /home/. /media/home/.
If you want to exclude some files, you can add them with the --exclude=
flag, for example: --exclude='/*/.gvfs'
--exclude=PATTERN exclude files matching PATTERN
--exclude-from=FILE read exclude patterns from FILE
Check that the copying worked:
1sudo diff -r /home /media/home -x ".gvfs/*"
1sudo dd if=/dev/sdx1 of=/dev/sdy1 bs=64K conv=noerror,sync
/dev/sdx1
is the source partition (input) and /dev/sdy1
is the destination (output)
if
provides input file (instead of the standard input)of
provides output filebs
means block sizenoerror
means do not stop processing on an input errorIn the GParted GUI, right click on the drive and select Copy, then right click on the drive where you want to copy to and select Paste