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 |
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 - |
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 |
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 - |
All times are GMT -5. The time now is 03:50 PM. |