Henry,
It varies a little depending on the version of Linux, but this should work.
I'm assuming that you're using a USB key formatted for Windows.
Issue the df command, then plug the USB drive in - see if your version
of Linux auto-mounts it (df command again)
If so, note the device name (/dev/...), and then unmount it (umount
/dev/...)
If it didn't automount, issue the command dmesg - at the end you'll see
messages about recognizing the USB device when you plugged it in.
In dmesg, you'll see something like:
usbcore: registered new driver usb-storage
USB Mass Storage support registered.
Vendor: VBTM Model: Store 'n' Go Rev: 5.00
Type: Direct-Access ANSI SCSI revision: 00
SCSI device sda: 2013184 512-byte hdwr sectors (1031 MB)
sda: Write Protect is off
sda: Mode Sense: 23 00 00 00
sda: assuming drive cache: write through
SCSI device sda: 2013184 512-byte hdwr sectors (1031 MB)
sda: Write Protect is off
sda: Mode Sense: 23 00 00 00
sda: assuming drive cache: write through
sda: sda1
sd 0:0:0:0: Attached scsi removable disk sda
usb-storage: device scan complete
sd 0:0:0:0: Attached scsi generic sg0 type 0
In this case, the device is sda, but the actual filesystem is sda1. You
may see a different device name.
So, in either case, for this example we'll assume we're using /dev/sda1
then, issue the mount command:
mount -t msdos /dev/sda1 /var/lib/asterisk/backups
The current contents of the backups directory will be hidden, and the
contents of your USB drive will become the backups directory.
When you're done, issue the command:
umount /dev/sda1
before you unplug the USB. The previous contents of the backups
directory will become visible again.
Hope that helps.
Regards,
Doug.
On 13/12/2010 10:43 AM, Henry Coleman wrote:
I remember asking this question about two years ago but unfortunately didn't
document the answers.
I need to Backup and Restore using the FreePBX Module but to a USB stick
rather than an asterisk directory.
Currently this directory is: '/var/lib/asterisk/backups/$Backup_Name'
however changing this will break the "Restore"
I understand that the best way is to mount this directory onto the USB.
Unfortunately this is beyond my abilities.
If the USB stick is removed the backup and restore should be available in
the normal way.
Hoping that someone out there can "sort me out"
Thanks H
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]