backing up a laptop

Andrew Mathews andrew_mathews
Mon May 17 11:31:37 PDT 2004


Net Llama! wrote:

> Greetings,
> I've got a bit of a problem on my hands.  I've got a laptop with a 4GB 
> drive, that currently has about 1.7GB free (less than half).  It has a 
> CDROM(not a burner) & floppy drive.  Thus, the only way I can get files 
> on or off the HD, is via the floppy or with scp (ssh).
> 
> The HD is partitioned so that hda1 is /boot, hda2 is swap, and hda3 is /
> 
> What I want to do is backup the entire disk, however since I don't have 
> enough free space on the HD, i can't just create one big tarball.
> 
> Does anyone know of a way to pipe the output from tar to scp so that i 
> could automatically dump the tarball onto a remote box?  I've been 
> pooring through the tar & scp man pages and can't find any way of doing 
> this.
> 
> If anyone has any alternate solutions, i'd be eager to hear them as well.
> 
> thanks!
> 

You didn't say whether you had an available tape drive on another 
machine or not, but tar can be redirected to a remote device on another 
machine using rsh to connect. Even if you don't have a tape drive, you 
can write the tarball to a remote file on disk. Use the 
--file=HOSTNAME:/DEV/FILE NAME syntax to connect to a remote device. 
 From the info tar page:

`tar' will complete the remote connection, if possible, and prompt you
for a username and password.  If you use `--file=@HOSTNAME:/DEV/FILE
NAME', `tar' will complete the remote connection, if possible, using
your username as the username on the remote machine.

    If the archive file name includes a colon (`:'), then it is assumed
to be a file on another machine.  If the archive file is
`USER at HOST:FILE', then FILE is used on the host HOST.  The remote host
is accessed using the `rsh' program, with a username of USER.  If the
username is omitted (along with the `@' sign), then your user name will
be used.  (This is the normal `rsh' behavior.)  It is necessary for the
remote machine, in addition to permitting your `rsh' access, to have
the `/usr/ucb/rmt' program installed.  If you need to use a file whose
name includes a colon, then the remote tape drive behavior can be
inhibited by using the `--force-local' option.


-- 
Andrew Mathews
------------------------------------------------------------
   8:05pm  up 11 days, 19:46,  7 users,  load average: 0.01, 0.02, 0.00
------------------------------------------------------------
I think my career is ruined!




More information about the Linux-users mailing list