Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 12 Dec 2006 10:57:24 -0500
From:      Jerry McAllister <jerrymc@msu.edu>
To:        arun@dasmax.com
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Backing up FREEBSD
Message-ID:  <20061212155724.GB71718@gizmo.acns.msu.edu>
In-Reply-To: <20061212063009.kctzgagozc8gokc8@www.dasmax.com>
References:  <20061212063009.kctzgagozc8gokc8@www.dasmax.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Dec 12, 2006 at 06:30:09AM -0500, arun@dasmax.com wrote:

> Hi
> 
> This is Arun from Singapore. I basically want to know how to back up  
> files if a computer is already running on FREEBSD. Please help me with  
> this as it is urgent.

It depends a little on what media you have available to store a backup.
The long time traditional media would be tape.   I still use it for
some things.  DAT tape is economical, but somewhat unreliable.
DLT and LTO are very nice and seem to be reliable, but quite expensive.

Many people are now buying large extra disk drives just to contain
backups.   That works well for short term failure recovery, but is 
less convenient for archival (very long term) backups.   Disks are also
less useful for extra large file systems - ones that are larger than the
largest disk you can put on the machine.  It is easier to to multiple
media units on tape.

Optical media works OK if the amount of data you will back up is small. 
The capacity of CD and DVD is small compared to modern disk and tape.

Probably for disaster recovery, I would be inclined to suggest backups
to disk if your backup requirements are withing the capacity of a drive
you can make work on the system you wish to back up.

So, once you have decided and acquired the backup media, then you have
several choices for software.

The most complete and general solution is to use dump(8) to make the
backups.   It handles all situations and types of files, directories,
links and file ownership/permissions correctly.   Nothing else does
it 100%.    You can easily write to either tape or disk with dump.
Dump files are read by restore(8).

The only weakness of dump is that it only works on whole file systems.
That is great for most backups.   But, if you want to back up just
a few files or directories within a file system, then you might want
to use tar(1) (with the -p flag to preserve as much of permissions
as possible).    

Another thing to consider is to design your partitions such that the
things you want to back up are put in a particular partition (file system)
and things you will never want to back up are in a different partition.
Then dump will get just what you want.   That is one reason (not the only)
for making /tmp a separate partition, for example.  You don't generally
bother to back up /tmp.   Also, you may not want to back up '/'
and /usr more than once or twice after an upgrade if you put users
home directories elsewhere and move /usr/local to a different, frequently
backed up partition.
With just a little thought to layout, the whole file system limitation
becomes moot and dump is _the_ choice.

If you write dumps to a big disk, note that you should make a single
large file system on it and write the dumps to files that include
the dump date - something like:

   dump 0af /dumpdisk/root20061212 /

presuming you have mounted that big disk file system as '/dumpdisk'
and that you are dumping root on December 12, 2006.

You will want to make a way of deleting obsolete dumps as well.

////jerry

> 
> Thanking you
> Arun
> _______________________________________________
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"



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