From owner-freebsd-questions@FreeBSD.ORG Thu Aug 5 10:58:30 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 06A6F16A4CE for ; Thu, 5 Aug 2004 10:58:30 +0000 (GMT) Received: from stjohn.stjohn.ac.th (stjohn.stjohn.ac.th [202.21.144.1]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2B70843D48 for ; Thu, 5 Aug 2004 10:58:26 +0000 (GMT) (envelope-from mcrogerm@stjohn.ac.th) Received: from tulip.stjohn.ac.th ([203.151.134.104]) by stjohn.stjohn.ac.th (8.9.3+Sun/8.9.3) with ESMTP id RAA14954 for ; Thu, 5 Aug 2004 17:55:37 +0700 (ICT) Message-Id: <5.2.0.9.0.20040805174307.00a0a970@127.0.0.1> X-Sender: stjohn.stjohn.ac.th:mcrogerm@127.0.0.1 X-Mailer: QUALCOMM Windows Eudora Version 5.2.0.9 Date: Thu, 05 Aug 2004 17:58:24 +0700 To: freebsd-questions@FreeBSD.ORG From: Roger Merritt Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Subject: Back-up on remote machine X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Aug 2004 10:58:30 -0000 I've been playing with this for a while. I need to add a small (4 GB) hard drive to one of my servers. Partly because I need more storage space, partly because I think there's something wrong with the present hard drive -- I get page faults while in kernel mode (fatal signal 12, I think it is) and spontaneous reboots when I try to build world on this drive (or make index, or upgrade some ports, etc.). What I want to do is copy my whole /usr/home directory tree to another Free BSD machine down the hall, pull the current hard drive (4 GB) out, put the new hard drive with a fresh build of Free BSD in the box as the master drive, reformat the old drive, and finally, copy the /usr/home directory tree back to the old hard drive and mount it separately as /usr/home. I've found directions that almost fit my needs, but not quite. What I would like to do is tar the directory tree and pipe it to either scp or ssh. What I don't want to do, because I don't think I have enough room, is make a tar file on the old machine. One example I found on the WWW is: tar -czf - /some/file | ssh host.name tar -xzf - -C /destination. That's not quite what I want, because I don't see any need to untar everything at the far end, but I can't send a file without using some command to ssh. I thought tar -czf - /some/file | scp - name@remotehost:somefile.tar.gz, but it doesn't seem to work. Can anyone point out where I'm going wrong? I guess if I have to I can untar the directory tree to some temporary place on the remote host -- that one has plenty of room on it, but it seems like an inelegant solution. That's really my only objection to it. -- Roger