Need suggestions on a backup issue



I was bitten by a bug in my backup system recently and would like
advice on how to fix the problem. I use Bash scripts and crontab to do
a daily backup each morning at 6:25 AM. (Why then? Because it is the
default time set up by Debian on a new install, and I've never seen a
reason to change it.) The script runs on a computer that is separate
from my main desktop computer and also serves a print and apt cache
server. The script writes the backup directly on to a USB drive that I
keep plugged into the computer, and uses rsync to only write backup of
files that are new or have changed. Occasionally, I swap out the USB
drive with an alternative one and keep the swapped out one in a safe
place. I had thought the system was working fine until a few days ago
when this backup computer ran out of disk space on its root partition
and crashed. (The root partition is 20GB and the system files use 3GB
of it.) The cause of the crash was some how the USB drive had become
umounted and the daily backup script filled the root partition with an
attempt to backup all 100GB of stuff on the main desktop computer.

Debian already provides an email facility that allows cron scripts to
email me with error messages. I need a way to test in Bash whether, or
not, there actually is a disk mounted at /media/wdp8.

What test can I code in Bash to determine that there is no disk
mounted at this mount point? I'm thinking of testing for the
presence of the file lost+found, but is there something better?

Thanks
--
Paul E Condon
pecondon@xxxxxxxxxxxxxxxx


--
To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx
with a subject of "unsubscribe". Trouble? Contact listmaster@xxxxxxxxxxxxxxxx
Archive: http://lists.debian.org/20120720155053.GA2231@xxxxxxxxxxx



Relevant Pages

  • Feedback on backup script
    ... The one problem I have is that the script keeps stopping at lines 633,635 and or 637 with the error "Path Not Found" I have emailed the original author for help but haven't heard back yet. ... I was just wondering if the problem could be that the account running the script doesn't have correct permissions to a share/directory/file that it's trying to backup? ... ' always one less than the actual number of folders. ... ' Show the user free space info on all available disk drives ...
    (microsoft.public.scripting.vbscript)
  • Re: xcopy and vbscript
    ... It takes about 5-6 minutes to backup approximately ... A copy of the script is below for reference. ... ObjShell.Popup strMessage, 5, "Backup Complete", OK_Button ... Dim sSrc, sDest ' as string ...
    (microsoft.public.scripting.vbscript)
  • Re: Enterprise Manager Newbie Question
    ... a SQL backup is not a simple copy of the database files. ... Is it possible to write a script that one could run from a workstation and ...
    (microsoft.public.sqlserver.tools)
  • Re: batch file to delete files based on criteria
    ... >> I need to throw together a simple batch file to backup a file. ... >> schedule this via Task Scheduler to run every hour or so. ... > Create a snapshot backup when a file changes. ... >!Snapshot script from inside Windows Explorer. ...
    (microsoft.public.win2000.cmdprompt.admin)
  • Re: How do I move an account... A few more details... and more
    ... >> use this system as a backup system if the first ever goes down. ... >> rsync for this. ... >serv1 and the system you back up to is fs. ... >rsync script. ...
    (Fedora)