From owner-freebsd-questions Wed Apr 10 06:43:41 1996 Return-Path: owner-questions Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id GAA06432 for questions-outgoing; Wed, 10 Apr 1996 06:43:41 -0700 (PDT) Received: from nixpbe.pdb.sni.de (mail.sni.de [192.109.2.33]) by freefall.freebsd.org (8.7.3/8.7.3) with ESMTP id GAA06402 for ; Wed, 10 Apr 1996 06:43:18 -0700 (PDT) Received: (from nerv@localhost) by nixpbe.pdb.sni.de (8.6.12/8.6.12) id PAA02977 for freebsd-questions@freebsd.org; Wed, 10 Apr 1996 15:43:12 +0200 Message-Id: <199604101343.PAA02977@nixpbe.pdb.sni.de> Subject: Re: backing - up FreeBSD To: mmd@sprintlink.co.za (Man Machine Dynamics) Date: Wed, 10 Apr 96 15:38:52 MET DST From: Greg Lehey In-Reply-To: <199604101326.PAA02737@peliz.sprintlink.co.za>; from "Man Machine Dynamics" at Apr 10, 96 3:28 pm X-Mailer: xmail 2.4 (based on ELM 2.2 PL16) Sender: owner-questions@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk > > Dear Greg, > > Sorry about that I 'm not very good at this. It's a black art, especially if you have to use Microsoft :-) > Anyway this is what it was suppose to say: > Firstly I want to thank you for your reply. You're welcome. > My boos wrote this down so I'm gonna quote it to you. > " We have a freeBSD box in the motor industry that was installed by a > propeller head and we have to maintain the system. > We have a xyabyte 2 gig tape. > We want to make a complete backup of the drive (system + programs). We have > used the tar command to boackup the source on the /home directory Do I understand correctly that you're happy with the way this works? > but as with dos , xcopy/s will copy one complete drive to another > excluding hidden system files and bingo you type sys command and you > have a bachup drive. Question: Can you use the tar command to > backup from / eg everything? OK, to be sure that I understand the question: you have enough space on some other disk to make a complete copy of /home, and you want to know how to do it? I'll assume that you have the disk already mounted in the file systems--if not, contact me and I'll explain that too. Let's assume that you have a file system called /home2. The name's not important, of course, but it *is* important that you don't have a file system mounted under /home (like /home/backup). There are a number of ways to do it, but I would think that the easiest is: cp -Rp /home /home2 Do this as root, and you get all the files, including hidden and device files. It copies symbolic links rather than their contents, which is probably what you want here. You can get more information with man cp Alternatives with tar and cpio are more complicated. Here's the tar version: cd /home; tar cf - . | (cd /home2; tar xf -) No, I won't go into the details of what that all does. It's in most introductory sysadmin books (Nemeth and Co. is the one to buy). Greg