LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
LinkBack Search this Thread
Old 07-26-2005, 04:12 PM   #1
nifflerX
Member
 
Registered: Dec 2003
Distribution: RedHat 8.0, 7.1 and Enterprise WS 3,4
Posts: 94

Rep: Reputation: 16
tar get on the fly


Hi,

Thanks to you great people on this forum I can use

put |"tar cvzf - /" backup.tar.gz

to great a tar file on the fly to a secondary backup machine. I was wondering if there is a way to do the opposite. So I have backup.tar on my ftp site and I want to restore from it. Is there some similar ftp command I can use that will leave me with just the untarred contents of the tar file on my local drive? Thanks very much.


-NifflerX
 
Old 07-26-2005, 08:39 PM   #2
mhen
LQ Newbie
 
Registered: Jul 2005
Location: Portsmouth, England
Distribution: Gentoo
Posts: 8

Rep: Reputation: 0
The following -I think- should extract a tar archive from an ftp site into the current directory, though I have never tried anything like this so I don't know how well it will work.

Code:
wget -O - "ftp://whatever.ftp.server/backup.tar.gz" | tar -xvzf -
If you are thinking about trying this out in your root directory, or in any vital part of your filesytem for that matter, I defininately wouldn't recommend it.
 
Old 07-27-2005, 09:45 AM   #3
nifflerX
Member
 
Registered: Dec 2003
Distribution: RedHat 8.0, 7.1 and Enterprise WS 3,4
Posts: 94

Original Poster
Rep: Reputation: 16
Hi,

Thank you for the reply. This seemed to almost work, except that I'm not ftping into an anonymous site. The site is set up to use kerberos tickets. To connect I just ftp <site> and then hit return when it asks for a name (as it's picked the correct one up from the ticket). But with the wget command it's trying to connect as anonymous. Any way around this? Thanks very much.

-NifflerX
 
Old 07-27-2005, 10:09 AM   #4
mhen
LQ Newbie
 
Registered: Jul 2005
Location: Portsmouth, England
Distribution: Gentoo
Posts: 8

Rep: Reputation: 0
I don't know any way of doing this with the standard 'ftp' command, since it cant exactly send files to stdout.
I don't know anything about kerberos tickets either, so I can't help you with that.

I do believe, however, that you can get wget to connect with a username and password by specifying them in the url thus:
Code:
wget -O - "ftp://username:password@whatever.ftp.server/backup.tar.gz" | tar -xvzf -

Last edited by mhen; 07-27-2005 at 10:10 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
tar tar cvf - . | (cd /root/; tar xvf -) ewt3y Linux - General 10 02-19-2014 10:55 AM
how can i decompress this tar.tar file? hmmm sounds new.. tar.tar.. help ;) kublador Linux - Software 10 02-23-2008 05:40 AM
tar and ftp put on the fly nifflerX Linux - General 6 06-14-2005 11:45 AM
CD Burning On-The-Fly gamehack Programming 3 11-25-2004 03:56 PM
Diferance between rpm, tar, tar.gz, scr.tar, etc mobassir Linux - General 12 08-21-2003 06:30 AM


All times are GMT -5. The time now is 05:29 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration