----- "Douglass Clem" <[EMAIL PROTECTED]> wrote:

> It turns out that Steven Critchfield's timing in posting that tar over
> ssh
> trick was very good. I woke up this morning to a call from a teacher

Thank you. Don't forget Andy for prompting the discussion.

> a reinstall. I'm using the command that Steven posted, with the
> slight
> modification of the -a parameter for compression, in hopes of making
> things
> speed up a bit.
> 
> tar -cvja /archive/dir | ssh [EMAIL PROTECTED] 'cat
> >backup.tar.bz'<http://backup.tar.bz/>

umm, looks like your -a does nothing. -a is for not needing to know what
-j or -z are for but rather handle it for me based on the filename I
hand off. -j is for bzip2 and -z is for gzip. -j may be a debian
specific thing though.

> So my question is, how I do the inverse of this, to extract from the
> tarball
> over the network once I'm ready to put the teacher's files back on
> her
> laptop? An optional bonus would be to exclude all files beginning with
> a '.'
> in the home directory, so as not to overwrite the default user app
> settings.

The first part is to point out that the same should work in reverse.

So first, simple extraction.
>From receiving side;
ssh [EMAIL PROTECTED] 'cat backup.tar.bz2' | tar xj

The excluding files would be best dealt with by the -X option to tar.
ssh [EMAIL PROTECTED] 'cat backup.tar.bz2' | tar xjX "/home/username/.??*"

Note the .??* will match on any files that start with a dot folowed by
at least 2 more chars. This keeps it from matching '..' or even '.' with
that pattern.

Alternately, you could run it the other way with;
cat backup.tar.bz2 | ssh [EMAIL PROTECTED] 'tar xjX "/home/username/.??*"

See, not so hard.

-- 
Steven Critchfield [EMAIL PROTECTED]

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"NLUG" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/nlug-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to