tar a complete drive excluding one directory (solved)
oliverfuchs at onlinehome.de
Sun Oct 17 11:45:46 PDT 2004
On Sun, 17 Oct 2004, Radek Kozlowski wrote:
> On Sun, Oct 17, 2004 at 03:24:45PM +0200, Oliver Fuchs wrote:
> > Hi,
> > I want in FreeBSD RELEASE 5.2.1 tar a complete / system except one directory
> > e.g. /mnt where I want to store the tar archive.
> > In linux I do:
> > cd /
> > tar cvzf /mnt/root.bak-$(date +%Y%m%d).tar.gz . --exclude=proc --exclude=mnt
> > Trying this in FreeBSD is not accepted because tar is still trying to tar
> > the /mnt directory and the to be made archive.
> # tar --exclude=proc --exclude=proc -cvzf \
> /mnt/root.bak-$(date +%Y%m%d).tar.gz .
Yes, thanx - that did the trick. I only wonder why tar is on one side
accepting this order and on the other side it isn't.
What I did was:
I copied the whole drive via:
tar cf - bin | ( cd /mnt/freebsd ; tar xvf)
tar cf - boot | ( cd /mnt/freebsd ; tar xvf)
Until know (I rebooted the new drive with the copied system) no errors
occured except one that the file modes/permissions of
directories /tmp and /var/tmp seemed to have changed because e.g. kde could not
start anymore saying that it has no permissions to use tmp.
So thanx again for helping and answering
... don't touch the bang bang fruit
More information about the freebsd-questions