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

Re: Troubles with moving /var



On Mon, Dec 20, 1999 at 09:58:51PM -0500, Brian Servis wrote
> *- On 20 Dec, Ethan Benson wrote about "Re: Troubles with moving /var"
> > On 20/12/99 aphro wrote:
> > 
> >>
> >>cp -a doesn't work on more obscure platforms like irix..there is a tar
> >>command..that acts like cp -a i saw it posted in a magazine(Maximum
> >>Linux) but i forgot what it was, if its linux its safe to use cp -a
> > 
> > probably something like (cd / ; tar -cvpf - var) | (cd /home ; tar -xvpf -)
> > 
> > quite a bit more obnoxious then cp -a for sure, but iirc it seemed to 
> > deal with symlinks a bit better.  there is a cpio way too but i'll 
> > leave that to someone else.
> > 
> > the key is when using tar use the -p switch !!  :-)
> > 
> > 
> 
> cd /var; find . -mount | cpio -dumpv /home/var
> 
> has done the trick for me several times.
> 

I use
# cd /source/dir/ ; find . -xdev | afio -p /dest/dir/

afio is the only one (of tar, afio and cpio) that has successfully
done everything asked of it.  

Any of the following may not get copied correctly with one or another 
version of the other two:
 special files (block & character devices)
 sockets & named pipes
 sparse files
 long pathnames
 symlinks
 hard links

I'm sure it's not perfect, but it hasn't failed me yet.


John P.
-- 
huiac@camtech.net.au
john@huiac.apana.org.au
"Oh - I - you know - my job is to fear everything." - Bill Gates in Denmark


Reply to: