Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
how can I clone partition over ftp?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
eivinn
Apprentice
Apprentice


Joined: 10 Jul 2002
Posts: 219
Location: Norway

PostPosted: Fri Dec 13, 2002 10:34 am    Post subject: how can I clone partition over ftp? Reply with quote

I am about to upgrade my server with Gentoo and plan to use LVM. Therefore I need to wipe out my harddrive.

My question is how can I pipe a tar to an ftp-server with bash?

Of course I would also like to know if I can trust this solution :wink:
Back to top
View user's profile Send private message
m0pr0be
Guru
Guru


Joined: 29 Aug 2002
Posts: 308

PostPosted: Fri Dec 13, 2002 10:46 am    Post subject: Reply with quote

i think what your are looking for is a HERE document:

somnething like
ftp << HERE
o 111.222.333.444
binary
put file.tar.bz2
quit
HERE

to be able to use ftp without entering user and password you need to setup a ~/.netrc file.

see man ftp for more info on .netrc
see man bash section "REDIRECTION" for info on here-documents.

---edit begin---
pls explain a little further what you are about to do, i didnt quite get your update method
---edit end---
Back to top
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 15989
Location: Colorado

PostPosted: Fri Dec 13, 2002 5:15 pm    Post subject: Reply with quote

Moved from P&P.
_________________
Safety is my gaol.
US Constitution | Amendments
Back to top
View user's profile Send private message
eivinn
Apprentice
Apprentice


Joined: 10 Jul 2002
Posts: 219
Location: Norway

PostPosted: Fri Dec 13, 2002 5:21 pm    Post subject: Reply with quote

I have been upgrading my workstation lately and used the following command to clone a directory:
Code:
tar lcf - .|(cd /target; tar xpvf - )


The thing I would like to do is:
1. Make a tar file of my /home
2. Pipe the tar-file over to another computer through ftp without using temp disk-space
3. Wipe out all disk info and repartition using LVM
4. Pipe the tar-file back out on /home
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo 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