[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: dd|tar backup over ssh fails, could someone give me a pointer.



On Fri, Sep 12, 2008 at 10:04:46PM +1000, Adrian Levi <adrian.levi@gmail.com> was heard to say:
> I am trying to do a complete backup of a drive in a brand new laptop
> to eventually wipe and install linux.
> 
> I'm trying to use the command:
> tar -cjf - < `dd if=/dev/sda bs=512` | ssh otherhost.com 'cat >
> /path/to/file.tar.bz2'

  I don't understand what you're trying to achieve with that tar
command.  You've told bash to load your entire hard drive into memory,
then open it as a file-name and pass it on standard input to a tar
command that will read an empty list of files, form a tar archive from
them, and pass the archive to standard output (except that tar won't
create an empty archive by default, so it'll fail with an error).

  I think that what you want to do is "tar cjf / | ssh ...", but I'm
a little thrown off by your desire to use dd.  Are you trying to load
a tar archive off a block device?

  Daniel


Reply to: