Re: Migrating /home from too small /dev/hda partition

Vance Lankhaar <[email protected]> Mon, 11 Aug 2003 22:04:29 -0700
Newsgroups gmane.linux.hardware.sony
Message-ID <1060664669.1157.7.camel@debian>
Like I just said in a previous email, try rsync. It does all that fun
stuff too :)

Vance Lankhaar

On Mon, 2003-08-11 at 05:37, [email protected] wrote:
> > Jean Delvare <[email protected]> said:
> > 
> > > cd /opt/home
> > > tar cf - . | ( cd /home; tar xpf -)
> > > 
> > > This insures all files keep their ownerships and permissions intact. 
> > > You can then delete /opt/home when you are done.
> > 
> > I believe that "cp -a" does just the same, in an easier manner.
> 
> Agreed.  I usually do the tar pipe trick, since versions of cp on a number of
> Unices do not support the -a switch.  This makes the tar approach portable on 
> systems with only POSIX compliant cp commands.
> 
> The tar trick also gives you more control over file permission access and who
> runs the command.  For example to copy a directory tree from a remote directory
> and preserve permissions where you have read access to a remote directory tree,
> but not root access on the remote system, you can do:
> 
> (ssh remote_system tar cf - /dir) | ( cd /local_dir; sudo tar xpf - )
> 
> You cannot do this with cp or even scp easily.