mercycorps / bmbackup

ClearOS Baremetal Backup
1 stars 2 forks source link

bmbackup not working on clearos 6 ? #2

Closed pagaille closed 8 years ago

pagaille commented 8 years ago

Hi,

I'm struggling to get bmbackup to work using Clearos 6. I had to format the drive myself (Initialise button wasn't giving any good result) and now the only thing I can see in the logs is the following :

Jun  7 12:00:03 serveur engine: exception: error: /usr/clearos/apps/base/libraries/Shell.php (207): fsck from util-linux-ng 2.17.2
Jun  7 12:00:03 serveur engine: exception: debug backtrace: /usr/clearos/apps/bmbackup/deploy/bmbackup.php (252): execute
Jun  7 12:00:03 serveur engine: exception: debug backtrace: /usr/clearos/apps/bmbackup/deploy/bmbackup.php (87): clearos\apps\bmbackup\check_usb
Jun  7 12:00:03 serveur engine: exception: error: /usr/clearos/apps/base/libraries/Shell.php (207): fsck from util-linux-ng 2.17.2
Jun  7 12:00:03 serveur engine: exception: debug backtrace: /usr/clearos/apps/bmbackup/deploy/bmbackup.php (252): execute
Jun  7 12:00:03 serveur engine: exception: debug backtrace: /usr/clearos/apps/bmbackup/deploy/bmbackup.php (87): clearos\apps\bmbackup\check_usb

Any idea ?

mahmoodkhan commented 8 years ago

I have not been able to replicate this issue. Have you tried connecting a different disk on a different USB port? Are you plugging in the disk via USB hub or directly to a USB port? Does the module detect the disk at all in the UI?

pagaille commented 8 years ago

Yes, absolutely. I'm surprised that it works on your side, since this plugin seems to be currently completely useless at least in ClearOS 6. Nothing works, from initialising the device to backing up any file.

The hdd is plugged directly on a USB port and works correctly when used through the command line. The disk is detected by the module.

Would like to connect to our system using TeamViewer to see by yourself ?

mahmoodkhan commented 8 years ago

We actually use it not on one server but on several servers and it works. And, i can't replicate the issue on my test server either. Sorry, I don't have much extra time to debug/fix the issue you're experiencing. It is an open-source project and you're welcome to clone it, fix the issue and then send me a pull request.

pagaille commented 8 years ago

Thanks.

I installed Clearos 6 on a virtual machine, hooked the hard drive and indeed it worked : the disk initialised, so I plugged it back into the production server and while we are talking bmbackup is happily doing it's first backup.

I guess this is linked to the hardware (pretty unusual indeed : that's an old Dell PowerEdge 1800 http://www.dell.com/downloads/ap/products/servers/1800_specs.pdf), but sadly ClearOS apps are extremely difficult to debug on a production server since no error message other than the one showed here above are logged. I guess I should install the development environnement to get more information on what's going on, which I don't want to do on our prod server. If you got any other idea I might try, please let me know.

pagaille commented 8 years ago

BTW another log that showed up when clicking on the Initialize button

bmbackup: exception 'clearos\apps\base\Engine_Exception' 

with message 'Command execution failed.' in /usr/clearos/apps/base/libraries/Shell.php:207

#012Stack trace:
#012#0 /usr/clearos/apps/bmbackup/libraries/Bmbackup.php(192): clearos\apps\base\Shell->execute('/sbin/sfdisk', '-q -f /dev/sdc ...', true)
#012#1 /usr/clearos/apps/bmbackup/controllers/usb.php(55): clearos\apps\bmbackup\Bmbackup->initialize_usb_disk('sdc')
#012#2 [internal function]: Usb->initialize('sdc')
#012#3 /usr/clearos/framework/system/core/CodeIgniter.php(359): call_user_func_array(Array, Array)
#012#4 /usr/clearos/framework/htdocs/app/index.php(222): require_once('/usr/clearos/fr...')
#012#5 {main}

bmbackup: exception 'clearos\apps\base\Engine_Exception' 
mahmoodkhan commented 8 years ago

Thanks for the update. It is hard to diagnose/fix problems that are not easily replicated.