On 06/20/2012 09:15 AM, Chris O'Connell wrote:
Hi Everyone,
I'm using Ubuntu 10.04 for a couple of Nagios boxes here in my office.
I've written a backup script that compresses all of my configuration files
and copies them to a USB thumb drive each evening. The exact path the
files are copied to is /media/Nagios_Backup
About 6 months ago I noticed that the /media folder contained a folder
called "Nagios_Backup" and a folder named "Nagios_Backup_". Much to my
surprise, I found that for some reason the directory name of the thumb
drive had changed to "Nagios_Backup_", and that my backups were going to
the old directory, which seemed to reside only on the hard disks.
This is how I mount my USB drive for the BackupPC software I
use.
In fstab I created a line so the disk would get remounted if
the machine was restarted.
############################
LABEL=/backupdisk /data/bilbo/backup ext3 defaults 0 0
############################
My diskinit script is as follows minus some backuppc specifics:
###############################
#!/bin/bash
# USB backup disk initialization file
mount /data/bilbo/backup
if [ ! -d /data/bilbo/backup/BackupPC ];then
mkdir /data/bilbo/backup/BackupPC
chown -R backuppc.backuppc BackupPC
cd /
else
echo "BackupPC exists"
fi
# end of script
################################
To unmount the disk I have this script when switching disks:
##############################
#!/bin/bash
umount /data/bilbo/backup
##############################
This has worked flawlessly for 6 years now. I check my
backups regularly and restore some of the critical files to
disk just to check they are valid.
Hope this helps
Jim KR
_______________________________________________
Discuss mailing list
Discuss@blu.org
http://lists.blu.org/mailman/listinfo/discuss