Backup to external USB

So I’ve got a USB Stick that is at
/dev/sdb /mnt/usbbackup

I can write to /mnt/usbbackup and wget a file to the USB mount point.

I’ve created a storage location in FreePBX to /mnt/usbbackup

However it doesn’t seem to work, I get this when running the backup

Initializing Backup 2
Backup Lock acquired!
Running pre-backup hooks…
Adding items…
Building manifest…
Creating backup…
Storing backup…
Whoops\Exception\ErrorException: mkdir(): Permission denied in file /var/www/html/admin/modules/backup/functions.inc/class.backup.php on line 356
Stack trace:

  1. Whoops\Exception\ErrorException->() /var/www/html/admin/modules/backup/functions.inc/class.backup.php:356
  2. mkdir() /var/www/html/admin/modules/backup/functions.inc/class.backup.php:356
  3. FreePBX\modules\Backup\Backup->store_backup() /var/www/html/admin/modules/backup/bin/backup.php:148

Running the same type of full backup but instead just selecting the local server succeeds.

So I’m not sure if I have an issue with how I mounted / formatted the USB also of note its an ext3 format.

So sdb is formatted as ext3 partition and mounted to /mnt/usbbackup

Is the mount writeable by the asterisk user?

I’m not sure what would be the best way to verify?

ls -l /mnt/usbbackup

A likely fix, as root

chown -R asterisk:asterisk /mnt/usbbackup

1 Like

Why thank you that was the problem!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.