How to safely copy home dir one cpu to another?

augie grayfox grayfox78 at cox.net
Tue Jan 16 16:15:23 MST 2007


On Tuesday 16 January 2007 12:00, "Josef Lowder" <joe at actionline.com> wrote:


> Subject: How to safely copy home dir one cpu to another?
>
> What is the recommended procedure and correct syntax
> to copy one's home directory from one computer to another?
>
> I make regular DVD backups of my home directory on my main
> Linux box and would like to copy the complete home directory
> onto my laptop on which I have installed the same distro.
> Of course, the laptop has some attributes that are different,
> such as the processor, cd/dvd drives, video card, etc.
>
> Are there any risks or potential problems to avoid in using a
> command syntax like the example below to copy my complete home
> directory (3.2 gig) from the desktop box DVD backup to the laptop?  
>
> cp -pruv /mnt/cdrom/joe/* /home/joe

Josef,
I got this from another LUG list I belong to. HTH
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
moving /home


fdisk (or sfdisk or cfdisk or other partitioning tool) to create new
partition

mkfs to create filesystem on new partition. (Be careful to not mkfs an
existing partition.)

mount new partition (and add to /etc/fstab as /home for later reboots).

Copy all of /home to new mount point. Be sure to preserve all attributes.

mv /home /home.old

unmount new partition and mount as /home

Remove /home.old once you think new /home is fine.


# rsync -auv /home.old /home
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

-- 
	augie grayfox

	


More information about the PLUG-discuss mailing list