BackupPC-users

Re: [BackupPC-users] Noob questions

2009-05-22 17:40:41
Subject: Re: [BackupPC-users] Noob questions
From: "Jeffrey J. Kosowsky" <backuppc AT kosowsky DOT org>
To: "General list for user discussion, questions and support" <backuppc-users AT lists.sourceforge DOT net>
Date: Fri, 22 May 2009 17:37:30 -0400
Daniel Carrera wrote at about 23:02:57 +0200 on Friday, May 22, 2009:
 > Well, in my mind, I wasn't planning to do it while it's actually backing 
 > up. If BackupPC makes a backup every hour, I don't mind waiting until 
 > it's quiet to unplug the disk and take my laptop to the bedroom.

I think your missing Les's point about this being designed from a
Unix/server philosophy. BackupPC runs *all* the time. Even when idle,
it sits there waiting for events and messages. At any time, someone
could be sending it a message via the web interface (or directly via
the command line). So, by design it needs to always be ready to
respond and it *rightly* assumes that if the BackupPC process is
running then not surprisingly it should be ready to access the data it
needs.

Note that I run my nfs check as a failsafe in case for some reason
the NAS device goes down. But if I ever intentionally power down the
NAS, I would shut down BackupPC first. But you seem to want to be able
to plug and unplug your external disk all the time. 

So Les is 100% right. If you have a process running that needs access
to the disk, then you don't just go and unplug it. After all, how do
*you* know that BackupPC is not in the middle of reading or writing
something critically to disk. Just because you are not noticing that a
backup is running does not mean that BackupPC might not be running
some other background process. This is not the same as your little
rsync script that runs once a day and is done allowing you to just run
'ps' or something to see if it's running.

In fact, technically, even your suggested check is not enough because
there are undoubtedly other places in the BackupPC program that
reference the backup directory. Also, there is no guarantee that your
device doesn't get unplugged between the time you run the check and
the time all access to the directory is finished.

The only way to guarantee that BackupPC (or any similar server
program) does not need the disk is to shut the service down. Anything
else is kludgey or relies on assumptions that may not always be true
and thus is going against the grain of server-class software.


 > > umount should not be able to complete if any process has open files or 
 > > its working directory.  You can't do that sort of thing when you run 
 > > server processes.
 > 
 > So there's no problem. If I try to unmount and BackupPC is doing 
 > something I just wait until it's finished and then take the laptop to 
 > the bedroom.

BackupPC *never* finishes until you shut down the service. You are
TOTALLY missing the point of a service vs. a run once program.

 > >> It's only a 2-3 line change. It doesn't seem like an unreasonable 
 > >> addition to BackupPC...
 > > 
 > > Maybe not, but it is quite a philosophical change from the environment 
 > > that typical unix server programs expect.  Most people building a backup 
 > > server would probably start with a stable box expected to be up for 
 > > years even if the targets come and go.

Agreed 100%. That being said, I wouldn't object to an optional hook but
certainly wouldn't advocate some arbitrary check being hard-wired
in. But even with the hook, Les is still right that the proper thing
is to shut down the service if you know you will be unmounting the disk.

 > Jeffrey just gave another, perhaps more typical example: The backup 
 > media might be an NFS share. You might want to check if that is mounted 
 > or not (and possibly try to mount it if it's not).

Yes - and even so for me it's only a failsafe check (and recovery via
remounting) since I would never intentionally unmount the nfs device
while BackupPC is running.

 > 
 > Daniel.
 > 
 > ------------------------------------------------------------------------------
 > Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
 > is a gathering of tech-side developers & brand creativity professionals. Meet
 > the minds behind Google Creative Lab, Visual Complexity, Processing, & 
 > iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian
 > Group, R/GA, & Big Spaceship. http://www.creativitycat.com 
 > _______________________________________________
 > BackupPC-users mailing list
 > BackupPC-users AT lists.sourceforge DOT net
 > List:    https://lists.sourceforge.net/lists/listinfo/backuppc-users
 > Wiki:    http://backuppc.wiki.sourceforge.net
 > Project: http://backuppc.sourceforge.net/
 > 

------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, & 
iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian
Group, R/GA, & Big Spaceship. http://www.creativitycat.com 
_______________________________________________
BackupPC-users mailing list
BackupPC-users AT lists.sourceforge DOT net
List:    https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:    http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/