On Thu, Dec 23, 2010 at 2:45 PM, Henry Coleman <[email protected]>wrote:
> Thanks for staying with this. > Here's what is happening.... > > When creating a backup in Freepbx the backup *name* will create a > directory, otherwise the option is to add it to an existing directory and it > goes ahead and adds the backup file (tar.gz) file into an existing > directory. The new or existing directories are owned all owned by * > asterisk* > When the stick is inserted initially there are no sub-directories off the > mounted * var/lib/asterisk/backups*. If an attempt is made to backup using > a new *name* the new directory doesn't display and the file gets lost. > Using Putty and Winscp I can see the newly created directory but it is > owned by* root, *attempting to change this using *chown* creates an error > saying I don't have permission to change the owner. (very odd). > So it seems as though it is still a owner/permission problem. > > Thanks Henry > > > > > > > > > > > On Wed, Dec 22, 2010 at 12:18 PM, John Lange <[email protected]> wrote: > >> On Wed, Dec 22, 2010 at 9:22 AM, Henry Coleman >> <[email protected]> wrote: >> >> Inserting the stick and refreshing the GUI page shows the new directory >> >> structure on the USB stick. >> >> However after a backup they get saved to the HD directory instead >> >> You lost me there. If the USB is mounted on top of >> /var/lib/asterisk/backups, then it would be impossible for you to >> write to that directory and have it written to the hard disk. >> >> >> Unplugging the USB stick does not restore the original HD directory, >> only a reboot does this. >> >> We probably need to fix something in this section: >> >> # Clean up after removal >> ACTION=="remove", ENV{dir_name}!="", RUN+="/bin/umount -l >> /var/lib/asterisk/backups" >> >> After removing the usb key, try running the unmount manually and see >> what it says: >> >> # /bin/umount -l /var/lib/asterisk/backups >> >> There should also be a log of what happened in /var/log/messages >> (That's assuming CentOS uses /var/log/messages for udev logging). >> >> The most likely explanation is that the file system is "busy" >> preventing it from being unmounted. If that is the case you can do (as >> root): >> >> # lsof | grep /var/lib/asterisk/backups >> >> to find out what it is. >> >> -- >> John Lange >> www.johnlange.ca >> > > > > -- > *Henry L. Coleman * > ***Per: VoIP-PBX.ca > * > * > * > > > -- *Henry L. Coleman * ***Per: VoIP-PBX.ca * * *
