SUMMARY: something is wrong with tar

From: Vichnevetski, Alexei <alexei.vichnevetski_at_gdcanada.com>
Date: Thu Jun 12 2003 - 09:28:39 EDT
Thanks everyone for responding so quickly.

The solution that is recommended by most people is ufsdump. Tar was not
meant to back up
complete systems and does not handle 'special files' (device files, pipes,
etc) properly.

It was also suggested to use cpio

-------------SUGGESTED solutions-----------------
Syntax would be ufsdump 0f
/export/home/OS.dump /dev/rdsk/c0t0d0s2
put the correct device file in place of c0t0d0s2, find it wit a df -k and
select the one that says slice 2 as that will grab the entire disk.


Or, maybe cpio:

find / -xdev -print | cpio -ocv -O /export/home/OS.cpio


if you're trying to get a copy of the whole OS, use fssnap
or flarcreate and then tar the archive.  If you must use tar of a live
system try using the gnu version.


The tar that comes with Solaris cannot tar up device files (ie /dev/fd/0
or other special files reliably).  Unfortunately, in order to tar up
an OS, you need to be able to do that.  Your options are to either get
the GNU tar (you can get a ready made package from the Sunfreeware
site - http://www.sunfreeware.com), or use cpio.  cpio is what Sun
uses to archive the files for it's packages.  You can also use ufsdump
to dump to a file.  The next problem you can run into is that many
utilities have problems with files over 2 GB, which your file copy
of the OS is likely to be.
----------------------------

Thanks to this people that responded:
Andre Godin
Bennett, Michael 
Tom Crummey 
Steve Maher 
Mitchell, John 
Bikash Sarkar 
Smart, Bob 
Tim Evans
Randy Romero
jsc3@gtf.org
Ric Anderson 
Rich Kulawiec 
--------------------------------------
Michael J Bennett suggested a different way of doing it using tar:

Think you have to exlude some files using tar:

create file called /tmp/excludes with the contents
         /dev
         /proc
         /floppy
         /cdrom

run the command:
	tar cvf /stordev -X /etc/excludes /

This is in my summaries.  I did not do it.

-----------------------------------------------


-----Original Message-----
From: Vichnevetski, Alexei [mailto:alexei.vichnevetski@gdcanada.com]
Sent: Thursday, June 12, 2003 8:47 AM
To: sunmanagers@sunmanagers.org
Subject: something is wrong with tar 


Hi,

I was trying to tar complete OS.
I did the following: logged in as root from / I typed
tar cvf /export/home/OS.tar ./*
It was working fine, for the first minute and then it was doing the
following:
a ./dev/fd/0 0K
a ./dev/fd/0 0K
a ./dev/fd/0 0K
a ./dev/fd/0 0K
a ./dev/fd/0 0K
a ./dev/fd/0 0K

It took about 4Gb doing that. Anyone has any idea why it couldn't tar
./dev/fd/0 or it was taring it for such a long period.

Anyone might know better way of taring complete OS?

Thanks

Alexei Vichnevetski
General Dynamics Canada
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers
Received on Thu Jun 12 09:31:51 2003

This archive was generated by hypermail 2.1.8 : Thu Mar 03 2016 - 06:43:14 EST