[comp.unix.questions] Dump in multi-user mode?

chris@ntvax.UUCP (Chris Britton) (01/10/89)

Greetings from North Texas.

I have a Vax 11/780 running Unix 4.3 BSD.  What are the consequences
of running "dump" in multi-user mode?  Will I just get out of date
copies of files that are open when dump reads them, or are the dangers
more significant?

Thanks in advance for any input.

Please respond to the address below.

--------

Chris Britton	chris@dept.csci.unt.edu
		{killer,iex,convex,utd,texsun}!ntvax!chris
		University of North Texas   817-565-2279

mikej@lilink.UUCP (Michael R. Johnston) (01/15/89)

In article <362@ntvax.UUCP> chris@ntvax.UUCP (Chris Britton) writes:
> What are the consequences of running "dump" in multi-user mode? 

I'd say the consequences are very unpredictable unless you unmount the
file system you are dumping. If the file system is active there is no 
telling what will happen. It somewhat akin to trying to paint a pictur of
a moving target. Not very easy and the program whas not meant to work this
way. Do you want to have to rely on this type of a backup? I can tell you that
the tape will most likely NOT verify.

-- 
Michael R. Johnston
System Administrator   {..!philabs!mergvax! | ..!uunet!ispi!} lilink!mikej
LILINK - Public Access Xenix   (516) 872-2137  1200/2400 8N1  Login: new

dave@lethe.UUCP (David Collier-Brown) (01/24/89)

> In article <362@ntvax.UUCP> chris@ntvax.UUCP (Chris Britton) writes:
>> What are the consequences of running "dump" in multi-user mode? 

From article <352@lilink.UUCP>, by mikej@lilink.UUCP (Michael R. Johnston):
> I'd say the consequences are very unpredictable unless you unmount the
> file system you are dumping. If the file system is active there is no 
> telling what will happen. It somewhat akin to trying to paint a
> picture of a moving target.

   I can be a bit more specific about what the "moving picture" contains
for the specific case of BSD4.2 dump/restore as shipped in SunOS 3.0
through 3.5:

  The program makes two initial passes collecting file and directory
information, then copies information to tape.
  There are really only wo places (well, times) when the dump
program can be confused about what to do. The first is between the
collection phase(s) and the copy phase, and the second is during
the copying of individual files (and therefore directories).
  If one adds a file between the scan phase and the copy, it will
not be backed up.  If one deletes one between those two phases, it
will not be backed up (and restore will complain about it).
  If, however, one deletes a file during the copying of that file,
it is liable to be copied, in part or in whole, to the tape.

  The "in part" is fun!

  In fact, certain editing programs (our, for example), manipulate
their current and previous-version files in such a way that dump
always gets one of the versions of an existing file being edited,
and files deleted tend (but only tend) not to be dragged back by
restore.

  In a word, dump/restore are **subtle**.

  I still try to do level zero dumps on a quiet system, though: its
easier than explaining why some deleted files reappear and others
don't.

--dave

friedl@vsi.COM (Stephen J. Friedl) (01/24/89)

In article <362@ntvax.UUCP> chris@ntvax.UUCP (Chris Britton) writes:
> What are the consequences of running "dump" in multi-user mode? 

I missed the start of this thread, but I've got the same question
related to file-based backups (i.e., with tar or cpio).  A
customer with a 3B15 has been doing live backups for three years
with no problems (we rarely never have to go back to tape), and
we would like to hear from others with experience on this.

Yes, he knows that the "right" way to do it is on in-active
filesystems, but he has accepted *some* lessened data integrity
as the cost for much simpler backups.  It would be expensive for
him to shut down the whole shop every day...

     Steve

-- 
Stephen J. Friedl        3B2-kind-of-guy            friedl@vsi.com
V-Systems, Inc.       I speak for you only      attmail!vsi!friedl
Santa Ana, CA  USA       +1 714 545 6442    {backbones}!vsi!friedl
Nancy Reagan on these *stupid* .signatures: "Enough already, OK?"

fmr@cwi.nl (Frank Rahmani) (01/26/89)

> 
> In article <362@ntvax.UUCP> chris@ntvax.UUCP (Chris Britton) writes:
>> What are the consequences of running "dump" in multi-user mode? 
> 
> I'd say the consequences are very unpredictable unless you unmount the
> way. Do you want to have to rely on this type of a backup? I can tell you that
> the tape will most likely NOT verify.
Sir,
you don't tell what system you are working on .Under BSD4.[23] and SunOS3.5
we do dumps for years in multiuser mode with typically up to 50  users on
a machine without any problem whatsoever.Also everything is restorable
without one problem ever as long as you keep in mind that only that
version of a file is saved that was on disk while dump was accessing it.
We just can't ask some hundred people to log out for hours. Some of our
fileservers have gigabytes of diskspace and a level 0 dump can take up to
seven hours.
Frank Rahmani 
UNIX9(tm) System Operator
Center for Mathematics and Computer Science
Amsterdam ,The Netherlands
fmr@cwi.nl
-- 
It is better never to have been born. But who among us has such luck?
Maintainer's Motto:
	If we can't fix it, it ain't broke.
These opinions are solely mine and in no way reflect those of my employer.  

chris@mimsy.UUCP (Chris Torek) (01/26/89)

In article <780@sering.cwi.nl> fmr@cwi.nl (Frank Rahmani) writes:
>... Under BSD4.[23] and SunOS3.5 we do dumps for years in multiuser
>mode with typically up to 50 users on a machine without any problem
>whatsoever.

I think it more likely that you have done this without *noticing* any
problems, or perhaps better phrased, without having anything go wrong
unrecoverably.

I know of no Unix systems with backup procedures that are immune to
errors if run on an active file system.%  It is easy to engineer
disasters (major in older versions of 4BSD dump/restore, minor in new
ones), and Murphy is there to do it when you need it least.
Nonetheless, the benefit of multiuser backups is not inconsiderable.
You must decide for yourself whether the advantage outweighs the risk.
In the CS Department here, we compromise by doing biweekly level 0
backups in single user mode, and daily backups multiuser.
-----
% Although Kirk has been heard to mutter something about `fsfreeze'.
-----

(Incidentally, while calculating risks, it is worth considering
operator error during backups and/or restores.  It does happen.)
-- 
In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163)
Domain:	chris@mimsy.umd.edu	Path:	uunet!mimsy!chris

ericb@athertn.Atherton.COM (Eric Black) (01/28/89)

In article <780@sering.cwi.nl> fmr@cwi.nl (Frank Rahmani) writes:
>> 
>> In article <362@ntvax.UUCP> chris@ntvax.UUCP (Chris Britton) writes:
>>> What are the consequences of running "dump" in multi-user mode? 
>> 
>> I'd say the consequences are very unpredictable unless you unmount the
>> way. Do you want to have to rely on this type of a backup? I can tell you that
>> the tape will most likely NOT verify.
>Sir,
>you don't tell what system you are working on .Under BSD4.[23] and SunOS3.5
>we do dumps for years in multiuser mode with typically up to 50  users on
>a machine without any problem whatsoever.Also everything is restorable
>without one problem ever as long as you keep in mind that only that
>version of a file is saved that was on disk while dump was accessing it.

Whoa!  You're very lucky if you really have never had any problems with
50 active users munging the file system during a dump.  All the user has to
do is write out new contents of the file which is currently being dumped,
and if the flush to the disk comes in the middle of dumping that file, and
the dump breaks up tape blocks such that data blocks for the file in question
are in different physical tape blocks, and you have a trashed file.

Even if you luck out and get a file backed up intact, either old or
new, on the tape (and that is not guaranteed, nope!), you're increasing
your neck-extension if your users are accessing and modifying multiple
files which must be mutually compatible.  If I've got a database system
which uses muliple UNIX files (even DBM, with separate index and data
files), let alone a database big enough to want to have multiple data
files in one database, then a dump made of the active file system very
likely will contain a garbage database.

I wouldn't want to have to depend on such a backup.  I wouldn't, in any case,
trust it; I'd be forced to verify that the restored data is in fact even
internally consistent, I couldn't be sure that it's either an entire new set
or an entire old set.

Still, it might be better than no backup at all.  Might not, though.

-- 
Eric Black	"Garbage in, Gospel out"
Atherton Technology, 1333 Bordeaux Dr., Sunnyvale, CA, 94089
   UUCP:	{sun,decwrl,hpda,pyramid}!athertn!ericb
   Domainist:	ericb@Atherton.COM