Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
tarring over tcp
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
fimblo
Guru
Guru


Joined: 19 Feb 2003
Posts: 306
Location: European Union, Stockholm

PostPosted: Wed Aug 06, 2003 3:35 pm    Post subject: tarring over tcp Reply with quote

Hiya everyone!

Im intending to make a backup of a large directory over tcp, and though I could do this:
Code:
tar zcpf backup.tar.gz /directory/to/bk
scp backup.tar.gz another.puter.com

I dont have the space on my drive for this. So I was thinking of somehting like:
Code:
destPuter# nc -lp 5000 |mimencode -u > backup.tar.gz
sourcePuter# ( tar -pzcv . | mimencode ; sleep 1 ) | telnet destPuter.domain.com 5000


I put the sleep in there since telnet doesnt seem to like data streaming in immediately...

Also mimencode to avoid the escape char ^]...

But I suspect that for large directories this wont work- the one second wait makes me think that it will have to be placed in memory. Does anyone have a better solution?
_________________
http://blahonga.yanson.org - little geekblog
http://blahona.yanson.org/howtos/livecd - yet another livecd howto
Back to top
View user's profile Send private message
neuron
Advocate
Advocate


Joined: 28 May 2002
Posts: 2371

PostPosted: Wed Aug 06, 2003 3:41 pm    Post subject: Reply with quote

mount it and untar it :) (shfs?)
Back to top
View user's profile Send private message
fimblo
Guru
Guru


Joined: 19 Feb 2003
Posts: 306
Location: European Union, Stockholm

PostPosted: Wed Aug 06, 2003 3:51 pm    Post subject: Reply with quote

hmm cool idea :)

But do you know a way to avoid the "sleep 1" command?

hmm maybe I could use netcat to send data... any ideas?
_________________
http://blahonga.yanson.org - little geekblog
http://blahona.yanson.org/howtos/livecd - yet another livecd howto
Back to top
View user's profile Send private message
liquidjoe
n00b
n00b


Joined: 06 Aug 2003
Posts: 23
Location: Germany - Bad Soden

PostPosted: Wed Aug 06, 2003 4:09 pm    Post subject: Reply with quote

or do:
tar cvjf - /lala | ssh babe@moon cat - > lalilu.tbz2
:wink:
Back to top
View user's profile Send private message
fimblo
Guru
Guru


Joined: 19 Feb 2003
Posts: 306
Location: European Union, Stockholm

PostPosted: Wed Aug 06, 2003 4:44 pm    Post subject: Reply with quote

good idea- with quotes it worked :)

btw, I solved the problem using nc on the sending side, I didnt need to use the "sleep 1" command.

neuron: thanks for telling me about shfs! excellent module, I'll be using it alot :)
_________________
http://blahonga.yanson.org - little geekblog
http://blahona.yanson.org/howtos/livecd - yet another livecd howto
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum