| View previous topic :: View next topic |
| Author |
Message |
eivinn Apprentice


Joined: 10 Jul 2002 Posts: 219 Location: Norway
|
Posted: Fri Dec 13, 2002 10:34 am Post subject: how can I clone partition over ftp? |
|
|
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  |
|
| Back to top |
|
 |
m0pr0be Guru

Joined: 29 Aug 2002 Posts: 308
|
Posted: Fri Dec 13, 2002 10:46 am Post subject: |
|
|
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 |
|
 |
pjp Administrator


Joined: 16 Apr 2002 Posts: 15989 Location: Colorado
|
Posted: Fri Dec 13, 2002 5:15 pm Post subject: |
|
|
Moved from P&P. _________________ Safety is my gaol.
US Constitution | Amendments |
|
| Back to top |
|
 |
eivinn Apprentice


Joined: 10 Jul 2002 Posts: 219 Location: Norway
|
Posted: Fri Dec 13, 2002 5:21 pm Post subject: |
|
|
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 |
|
 |
|