tar, cpio, or cp?

1997-11-30 Thread Ekkehard Kraemer
Hi Torsten!

> I use:  tar cvf /dev/st0 .

TH>I regulary create backups of my whole system using tar on SCSI tapes.

What about symbolic links if the link is restored before the file it is 
pointing to? Is this handled correctly?

MbG, Ekkehard
---
OS/2 Merlin - mchtig magisch!
-- 


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
[EMAIL PROTECTED] . 
Trouble?  e-mail to [EMAIL PROTECTED] .


Re: tar, cpio, or cp?

1997-11-26 Thread Torsten Hilbrich
"Frere Roy" <[EMAIL PROTECTED]> writes:

> Your question prompted me to think about the way I make backups of
> my Debian system to tape.
> 
> I use:  tar cvf /dev/st0 . 
> 
> Could someone on the list please tell me if I can restore my
> complete working system from the archive made in this fashion - or
> suggest a better way !

I regulary create backups of my whole system using tar on SCSI tapes.
After repartitioning my hard discs I was able to restore one of these
backups without any problem, no manual intervention was neccessary.  I
just mkefs all filesystem, mounted them as neccessary, did the
restore, and adjusted the /etc/fstab and /etc/lilo.conf.  Lilo just
run once and my system was working again.

Torsten

-- 
I haven't lost my mind -- it's backed up on tape somewhere.
Fortune Cookie
PGP Public key available


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
[EMAIL PROTECTED] . 
Trouble?  e-mail to [EMAIL PROTECTED] .


Re: tar, cpio, or cp?

1997-11-25 Thread Frere Roy
>tar cf /path | ( cd other/path ; tar xvf -)
>cp -a /path /other/path

> Are there real differences between the three?  What about symlinks,
> hard links, empty dirs, devices?  I know, I could read the manuals,

Your question prompted me to think about the way I make backups of my 
Debian system to tape.

I use:  tar cvf /dev/st0 . 

Could someone on the list please tell me if I can restore my complete 
working system from the archive made in this fashion - or suggest a 
better way !

Thanks, Frere Roy

-- 

Taize Community, 71250 TAIZE, France
Personal email: [EMAIL PROTECTED]
To contact Taize: [EMAIL PROTECTED]
To visit Taize: [EMAIL PROTECTED]
List of useful info: [EMAIL PROTECTED]
Web site  http://www.taize.fr


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
[EMAIL PROTECTED] . 
Trouble?  e-mail to [EMAIL PROTECTED] .


Re: tar, cpio, or cp?

1997-11-25 Thread Remco Blaakmeer
On Tue, 25 Nov 1997, Tommi Virtanen wrote:

> On Tue, Nov 25, 1997 at 10:40:10AM +0100, Francesco Potorti` wrote:
> 
> > Why not 
> >cp -a /path /other/path
> 
>   Won't handle devices, pipes, etc.

It does here.

$ cp --version
cp (GNU fileutils) 3.16
$ 

Remco


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
[EMAIL PROTECTED] . 
Trouble?  e-mail to [EMAIL PROTECTED] .


Re: tar, cpio, or cp?

1997-11-25 Thread Tommi Virtanen
On Tue, Nov 25, 1997 at 10:40:10AM +0100, Francesco Potorti` wrote:
>tar cf /path | ( cd other/path ; tar xvf -)

This one's good.

>cd /path; find . | cpio -dump /other/path

This one (actually, find) won't handle filenames with newlines.
If dump would have something like xargs -0 parameter it would
be better.

echo test >'new
line'

> Why not 
>cp -a /path /other/path

Won't handle devices, pipes, etc.

> but after a first look none of the three seems to do everything right,

Why isn't the tar one good?
-- 
[EMAIL PROTECTED] - it's a valid address w/o spam | +358-50-5124907
f u cn rd ths, thn u cn rd perl 2 | rm -rf / && echo bye-bye. |   --tv


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
[EMAIL PROTECTED] . 
Trouble?  e-mail to [EMAIL PROTECTED] .


Re: tar, cpio, or cp?

1997-11-25 Thread Francesco Potorti`
Peter S Galbraith wrote:
   tar cf /path | ( cd other/path ; tar xvf -)
   
[EMAIL PROTECTED] (Stephen Zander) writes:
   cd /path; find . | cpio -dump /other/path
   
Why not 
   cp -a /path /other/path

Are there real differences between the three?  What about symlinks,
hard links, empty dirs, devices?  I know, I could read the manuals,
but after a first look none of the three seems to do everything right,
that's why I am asking.

Francesco


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
[EMAIL PROTECTED] . 
Trouble?  e-mail to [EMAIL PROTECTED] .


Re: tar, cpio, or cp?

1997-11-24 Thread Stephen Zander
Peter S Galbraith wrote:
> The asterisk was perhaps a bad example.  This works for me (including all
> dot files):
> 
> tar cf /path | ( cd other/path ; tar xvf -)
> 
> Some people add a bunch of other flags to tar.

Wading in late but

Why not

cd /path; find . | cpio -dump /other/path

Does everything, leaves it just as it was.  Or if you don't want to cross
file system boundaries

cd /path; find . -mount | cpio -dump /other/path

(We now return to your regularly scheduled messages...)


Stephen
---
"Normality is a statistical illusion." -- me



--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
[EMAIL PROTECTED] . 
Trouble?  e-mail to [EMAIL PROTECTED] .


Re: tar, cpio, or cp?

1997-11-24 Thread Peter S Galbraith

Lorens Kockum wrote:

> On Fri, Nov 21, 1997 at 08:58:56PM +0100, Olivier THARAN wrote:
> > 
> > (cd dir1 && tar cv *) | (cd dir2 && tar xf -)
> > which preserves everything (dunno about times however).
> 
> Huh? What about files beginning with a '.' that are not expanded by the
> '*'? That's just to begin with ... use cpio.

The asterisk was perhaps a bad example.  This works for me (including all
dot files):

tar cf /path | ( cd other/path ; tar xvf -)

Some people add a bunch of other flags to tar.
-- 
Peter Galbraith, research scientist <[EMAIL PROTECTED]>
Maurice-Lamontagne Institute, Department of Fisheries and Oceans Canada
P.O. Box 1000, Mont-Joli Qc, G5H 3Z4 Canada  418-775-0852 - FAX 418-775-0546



--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
[EMAIL PROTECTED] . 
Trouble?  e-mail to [EMAIL PROTECTED] .


Re: tar, cpio, or cp?

1997-11-24 Thread Lorens Kockum
On Fri, Nov 21, 1997 at 08:58:56PM +0100, Olivier THARAN wrote:
> 
> (cd dir1 && tar cv *) | (cd dir2 && tar xf -)
> which preserves everything (dunno about times however).

Heuh? What about files beginning with a '.' that are not expanded by the
'*'? That's just to begin with ... use cpio.

-- 
include   Lorens KOCKUM ( [EMAIL PROTECTED] )


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
[EMAIL PROTECTED] . 
Trouble?  e-mail to [EMAIL PROTECTED] .


Re: tar, cpio, or cp?

1997-11-21 Thread Olivier THARAN
On Fri, Nov 21, 1997 at 01:40:51PM -0500, Alex Yukhimets wrote:
> Does anyone know the best way to copy a huge directory tree (~1Gig)
> to another disk (mounted at some point)? I need to preserve the
> ownerships and permissions, preservation of times are optional.

You can try :

(cd dir1 && tar cv *) | (cd dir2 && tar xf -)

which preserves everything (dunno about times however).

olive
-- 
Olivier Tharan, <[EMAIL PROTECTED]>

The determined programmer can write a FORTRAN program in any language.


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
[EMAIL PROTECTED] . 
Trouble?  e-mail to [EMAIL PROTECTED] .


Re: tar, cpio, or cp?

1997-11-21 Thread Alex Yukhimets
> I don't know if this works under Linux, but under Solaris we (egr)
> have used dump to do this.  I would try using dump of a filesystem
> to another filesystem.  I'm no authority on this... so please
> dispute me if I'm crazy.

Thanks to everybody for quick response.
I guess cpio is the best bet.
The disadvantage of dump is that it will copy the whole filesystem
even if it is empty and will definitely not fight fragmentation.

Alex Y.

-- 
   _ 
 _( )_
( (o___   +---+
 |  _ 7   |Alexander Yukhimets|
  \(")|   http://pages.nyu.edu/~aqy6633/  |
  / \ \   +---+


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
[EMAIL PROTECTED] . 
Trouble?  e-mail to [EMAIL PROTECTED] .


Re: tar, cpio, or cp?

1997-11-21 Thread Jay Barbee

> Does anyone know the best way to copy a huge directory tree (~1Gig)
> to another disk (mounted at some point)? I need to preserve the
> ownerships and permissions, preservation of times are optional.
> 
> I am aware of 3 ways: 
> tar cpfl - dir1 | tar -C dir2 -xpf -
> find dir1 -xdev -print | cpio -p -admu dir2
> cp -ax dir1 dir2
> 
> Which one is considered to be safer, faster, etc?
> 

A technique that I use on a regular basis to copy from one partition 
to another is the following:

...say i want to copy my root directory to a new harddrive that I 
have now mounted on /mnt.  I have a /home mount and a /usr mount and 
I don't want to touch those.

one the dest. drive is mounted

find / -xdev -depth -print | cpio -pvdumB /mnt

It is quick, safe, keeps permissions, blah...blah!  I have used it 
quite a bit!

Hope it helps.

--Jay Barbee


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
[EMAIL PROTECTED] . 
Trouble?  e-mail to [EMAIL PROTECTED] .


Re: tar, cpio, or cp?

1997-11-21 Thread dpk
I don't know if this works under Linux, but under Solaris we (egr)
have used dump to do this.  I would try using dump of a filesystem
to another filesystem.  I'm no authority on this... so please
dispute me if I'm crazy.

Thanks,
Dennis
--
dpk <[EMAIL PROTECTED]>, Systems/Network |  work: 353.4844
Division of Engineering Computing Services |  page: 222.5875

On Fri, 21 Nov 1997, Alex Yukhimets wrote:

> Hi.
> 
> Does anyone know the best way to copy a huge directory tree (~1Gig)
> to another disk (mounted at some point)? I need to preserve the
> ownerships and permissions, preservation of times are optional.
> 
> I am aware of 3 ways: 
> tar cpfl - dir1 | tar -C dir2 -xpf -
> find dir1 -xdev -print | cpio -p -admu dir2
> cp -ax dir1 dir2
> 
> Which one is considered to be safer, faster, etc?
> 
> thanks.
> 
> Alex Y.
> 
> -- 
>_ 
>  _( )_
> ( (o___   +---+
>  |  _ 7   |Alexander Yukhimets|
>   \(")|   http://pages.nyu.edu/~aqy6633/  |
>   / \ \   +---+
> 
> 
> --
> TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
> [EMAIL PROTECTED] . 
> Trouble?  e-mail to [EMAIL PROTECTED] .
> 
> 


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
[EMAIL PROTECTED] . 
Trouble?  e-mail to [EMAIL PROTECTED] .


Re: tar, cpio, or cp?

1997-11-21 Thread Nathan E Norman
On Fri, 21 Nov 1997, Alex Yukhimets wrote:

: Hi.
: 
: Does anyone know the best way to copy a huge directory tree (~1Gig)
: to another disk (mounted at some point)? I need to preserve the
: ownerships and permissions, preservation of times are optional.
: 
: I am aware of 3 ways: 
: tar cpfl - dir1 | tar -C dir2 -xpf -
: find dir1 -xdev -print | cpio -p -admu dir2
: cp -ax dir1 dir2
: 
: Which one is considered to be safer, faster, etc?
: 
: thanks.
: 
: Alex Y.
: 
FWIW,

I prefer cpio as it (IMHO) does the best job of preserving permissions,
and it doesn't throw up on device files and the like.

However, this seems to be a topic similar to religion; last time we
debated this there was quite a row.  Not unlike debating vi/emacs/etc.
...

--
Nathan Norman
MidcoNet - 410 South Phillips Avenue - Sioux Falls, SD  57104
Voice: (605) 334-4454 Fax: (605) 335-1173
email: [EMAIL PROTECTED] or  [EMAIL PROTECTED]
PGP Key ID: 0xA33B86E9 - Public key available at keyservers  
PGP Key fingerprint: CE03 10AF 3281 1858  9D32 C2AB 936D C472


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
[EMAIL PROTECTED] . 
Trouble?  e-mail to [EMAIL PROTECTED] .


tar, cpio, or cp?

1997-11-21 Thread Alex Yukhimets
Hi.

Does anyone know the best way to copy a huge directory tree (~1Gig)
to another disk (mounted at some point)? I need to preserve the
ownerships and permissions, preservation of times are optional.

I am aware of 3 ways: 
tar cpfl - dir1 | tar -C dir2 -xpf -
find dir1 -xdev -print | cpio -p -admu dir2
cp -ax dir1 dir2

Which one is considered to be safer, faster, etc?

thanks.

Alex Y.

-- 
   _ 
 _( )_
( (o___   +---+
 |  _ 7   |Alexander Yukhimets|
  \(")|   http://pages.nyu.edu/~aqy6633/  |
  / \ \   +---+


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
[EMAIL PROTECTED] . 
Trouble?  e-mail to [EMAIL PROTECTED] .