Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 10 Apr 96 15:38:52 MET DST
From:      Greg Lehey <lehey.pad@sni.de>
To:        mmd@sprintlink.co.za (Man Machine Dynamics)
Subject:   Re: backing - up FreeBSD
Message-ID:  <199604101343.PAA02977@nixpbe.pdb.sni.de>
In-Reply-To: <199604101326.PAA02737@peliz.sprintlink.co.za>; from "Man Machine Dynamics" at Apr 10, 96 3:28 pm

next in thread | previous in thread | raw e-mail | index | archive | help
>
> 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





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199604101343.PAA02977>