From owner-freebsd-questions Thu Jan 4 18:56:45 1996 Return-Path: owner-questions Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id SAA24179 for questions-outgoing; Thu, 4 Jan 1996 18:56:45 -0800 (PST) Received: from phaeton.artisoft.com (phaeton.Artisoft.COM [198.17.250.211]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id SAA24167 for ; Thu, 4 Jan 1996 18:56:39 -0800 (PST) Received: (from terry@localhost) by phaeton.artisoft.com (8.6.11/8.6.9) id TAA01089; Thu, 4 Jan 1996 19:55:05 -0700 From: Terry Lambert Message-Id: <199601050255.TAA01089@phaeton.artisoft.com> Subject: Re: Tar backup to another machine ? To: wjh@bhoss.ifx.net Date: Thu, 4 Jan 1996 19:55:04 -0700 (MST) Cc: questions@freebsd.org In-Reply-To: from "Bill Henderson" at Jan 4, 96 07:15:50 pm X-Mailer: ELM [version 2.4 PL24] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-questions@freebsd.org Precedence: bulk > Can someone help me with the syntax for running tar on one machine outputing > the file on the other? 1) Archive local files to a device on a remote machine: tar cvf - | rsh dd of= 2) Extract files from a device on a remote machine to the local machine: rsh dd if= | tar xvf - 3) Archive remote files to a device on a local machine: rsh tar cvf - | dd of= 4) Extract files from a local device to a remote machine: dd if= | rsh tar xvf - You may change the directory on the remote machine before the archival or extraction if you use the rich shell escape sequence for your account on the remote machine. For instance, if your shell on the remote machine is the Bourne shell (/bin/sh), you can extract the files into the /tmp directory (assuming they are relative pathed), by changing #4 above to: dd if= | rsh "( cd /tmp ; tar xvf -)" The same will work for changing the directory before archiving files from the remote machine. You would probably be better off using the "Amanda" port in "packages" if your intent is to perform remote backups. Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers.