Boston Linux & Unix (BLU) Home | Calendar | Mail Lists | List Archives | Desktop SIG | Hardware Hacking SIG
Wiki | Flickr | PicasaWeb | Video | Maps & Directions | Installfests | Keysignings
Linux Cafe | Meeting Notes | Linux Links | Bling | About BLU

BLU Discuss list archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Discuss] Ubuntu USB Drives appending _ to folder



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






Valid HTML 4.01! Valid CSS!



Boston Linux & Unix / webmaster@blu.org