[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[leafnode-list] Re: Moving Leafnode News Directory

Gerry Doris <gdoris@xxxxxxxxxx> writes:

> I want to move my leafnode news directory from /var/spool/news to a 
> different mount point on a new disk.  I planned on doing a cp first to 
> be sure it worked then rm the existing directory and finally create a 
> soft link to the new mount point.
> I've created the new mount point but run into trouble when I try and cp 
> over the existing news directory.  The size of the new directory becomes 
> huge and I have to stop the cp.  I have no idea why this happens.  I was 
> using cp -a to do the copy.
> What is the correct way to do this?


You need to make sure that your "cp" command copies hard links by
linking files, rather than stuffing one copy per link. Is that what your
"cp" command is doing? My GNU cp documentation is inconsistent, but it
appears to copy hard links as such. I am using GNU coreutils 5.3.0.

Otherwise, one of these should do:

(cd /var/spool/news && tar -cf - .) | (cd /new/dir && tar -xpf -)

(cd /var/spool/news && pax -r -w -p e . /new/dir )

On many systems, you can use tar -xvpf - (instead of tar -xpf -) or
pax -v -r -w -p e (instead of pax -r -w -p e) to obtain verbose output.


Matthias Andree
leafnode-list mailing list