support

New Backup Module Now In Beta

Ok, let's face it, our backup module sucked. It didn't suck in a mosquito sucking blood way, more like a dyson ball vacuum super sucking kind of way. Aric's big project has been to rewrite the entire backup system from the ground up and the first beta is now ready. There are a few issues with screen refreshes but for a beta the functionality should be really solid.

To install it, go to the Settings menu and select Repositories, you will need to enable the Beta repository. Then go to the Package Manager and install tbm-backup. When finished there will be backup option in the System menu.

If you don't mind trying out some beta software, we would really appreciate some feedback on this new module so we can get it perfected and released to the general public. Thanks.

-Kerry

Backup Beta

Might want to take a look at my more backup woes post in open discussion

Kevin

What kind of backup?

Is it a full system backup, configs and voice mail? I'm getting ready to go to amanda do be able to do a full restore if necessary.

It does all the configs, an

It does all the configs, an entire mysql backup, voicemails, recordings, as well as the /tftpboot directory. It is pretty much everything you need to restore onto a new system.

After installing the beta backup upgrade....

I get the following when I select backup in Maint, As I see it, My options are to figure which password in mysql needs to be changed, going to some random trixbox file and updating the password or userid, or trying to figure out how to revert my system back to the original non-beta. What would be a good solution for my little problem....

(Trixbox CE version 2.6.1)

Warning Message

An error was detected which prevented the loading of this page. If this problem persists, please contact the website administrator.

mysqli::mysqli() [function.mysqli-mysqli]: (28000/1045): Access denied for user 'asteriskuser'@'localhost' (using password: YES)

Error occurred at line 52 of framework/system/libraries/drivers/Database/Mysqli.php.
Stack Trace

* framework/system/libraries/drivers/Database/Mysqli.php [52]:

mysqli->mysqli( localhost, asteriskuser, amp109, asterisk )

* framework/system/libraries/Database.php [193]:

Database_Mysqli_Driver->connect( )

* framework/system/libraries/Database.php [213]:

Database_Core->connect( )

* maint/modules/backup/controllers/backup.php [18]:

Database_Core->query( show tables like 'backup_item' )

* framework/system/core/Kohana.php [251]:

Backup_Controller->__construct( )

*

Kohana::instance( )

* framework/system/core/Event.php [217]:

call_user_func( Array
(
[0] => Kohana
[1] => instance
)
)

* framework/system/core/Bootstrap.php [55]:

Event::run( system.execute )

* kindex.php [83]:

require( framework/system/core/Bootstrap.php )

Try

Try /var/lib/asterisk/bin/ampbackup.pl

Michael Mathewson CCNA,MCSE
Owner/Consultant
Northeast CT IT Solutions

Hmm

I did go to /var/lib/asterisk/bin/ampbackup.pl and checked it and the AMPDBPASS seemed to be set incorrectly. I changed it to my new password. At least it matches amportal.conf.

tbm-backup.noarch 2.6.2-14

Might very well be related to my change of the mysql password (or other passwords) from the trixbox default.

But regardless, after reboot, I am still getting:

Warning Message

An error was detected which prevented the loading of this page. If this problem persists, please contact the website administrator.

mysqli::mysqli() [function.mysqli-mysqli]: (28000/1045): Access denied for user 'asteriskuser'@'localhost' (using password: YES)

Error occurred at line 52 of framework/system/libraries/drivers/Database/Mysqli.php.
Stack Trace

* framework/system/libraries/drivers/Database/Mysqli.php [52]:

mysqli->mysqli( localhost, asteriskuser, amp109, asterisk )

* framework/system/libraries/Database.php [193]:

Database_Mysqli_Driver->connect( )

* framework/system/libraries/Database.php [213]:

Database_Core->connect( )

* maint/modules/backup/controllers/backup.php [18]:

Database_Core->query( show tables like 'backup_item' )

* framework/system/core/Kohana.php [251]:

Backup_Controller->__construct( )

*

Kohana::instance( )

* framework/system/core/Event.php [217]:

call_user_func( Array
(
[0] => Kohana
[1] => instance
)
)

* framework/system/core/Bootstrap.php [55]:

Event::run( system.execute )

* kindex.php [83]:

require( framework/system/core/Bootstrap.php )

Loaded in 0.8764 seconds, using 1.36MB of memory. Generated by Kohana v2.1.1.

Password

I do not use the standard AMPDBPASS=amp109 password on my system. I have changed amp109 in /etc/amportal.conf . This has been working fine on my system for months. But when I put on the current beta, tbm-backup, I can no longer successfully access the maint backup option. It gives me the error listed above in previous messages. It appears that the file mysqli.php is being passed the password amp109 from somewhere.

Anybody have any idea where mysqli.php is getting amp109 from?

I did check /var/lib/asterisk/bin/ampbackup.pl which did have amp109, but I changed it and the problem persists.

The following, I believe, indicates the problem:
Error occurred at line 52 of framework/system/libraries/drivers/Database/Mysqli.php.
Stack Trace

* framework/system/libraries/drivers/Database/Mysqli.php [52]:

mysqli->mysqli( localhost, asteriskuser, amp109, asterisk )

Previous versions

Will this backup module work in versions previous to 2.6.1 (with FreePBX)?

Yes, it will.

Yes, it will.

Question

Is anybody, who has this beta running successfully, using a password other than the default - AMPDBPASS=amp109?

I really love trixbox and

I really love trixbox and everything you all do but can't we make it so when we change default passwords other things don't break? I see that the amp manager password can't be changed anymore and for some reason my cdr broke (this might have been my fault but I don't know yet) and the new backup module broke when I changed the default sql user password. Users need to be able to update these passwords in an install script or something. Either it needs to be easy or every time someone has a problem and they say their system was not behind the firewall everyone needs to stop jumping their butt about how you should never put it outside a firewall without locking it down. No wonder people do this all the time because it is hard to get things to work right behind a firewall and it is hard to get things to work right when you try to lock things down.

Alternate Question

An alternate question, is everybody who has this beta patch running, using AMPDBPASS=amp109 in /etc/amportal.conf?

Kerry, Where do we change

Kerry,
Where do we change where the backup script looks for the password? I ended up having the same issue. I DO NOT have the default mysql password and came up with the same error. We cannot Beta test if we can't get by the password issue!! I ended up going back to the previous backup module because it at least somewhat worked.
Please advise.

Jervin, I think this is only

Jervin, I think this is only happening to systems not using the default ampdbpass.

Yes

I agree, it appears that somehow, the mysqli.php is being supplied the wrong password for userid asteriskuser. Probably implies that if I'd used a alternate for asteriskuser, that it would be wrong too. But the error message indicates:
mysqli->mysqli( localhost, asteriskuser, amp109, asterisk )

I am not using amp109. ergo, there seems to be a bug somewhere.

I found this in

I found this in /var/www/html/maint/modules/backup/controllers/backup.php on line 91.
$db = new Database("mysql://asteriskuser:amp109@localhost/asterisk");
I don't have the module installed anymore so I can't test it.

Tried that too w/o Success

Nope, tried /var/www/html/maint/modules/backup/controllers/backup.php too by just hard coding in the right password w/o success.

Do you suppose that Backup is getting the password from a different amportal.conf than the one in /etc ??

It's a mystery.

Anybody know how to back this module out and put back in the older version?

I just did a rpm -e

I just did a rpm -e --nodeps tbm-GUI and tbm-backup. Then disabled the Beta repository and did a yum install tbm-GUI and tbm-backup.

Schedule

I am having problems to set up the backup schedule in the beta, it sets up OK but the backup does not run and I do not see a cron job set for the backup. I can manually run the backup - no problem - it is saved in /etc/asterisk/backups and it also ftp's out to an off site server. Has anyone any ideas please?

Backups

Is there any way that when you do a restore of the freepbx configs the backup module can look at what modules are installed already and change them to the version you are restoring? I have found that restoring from backup works fine when you have messed something up and you just want to get back the old settings but if you have to rebuild the box or want to move to a new one it is useless because you can only get the modules on the original install or the latest but nothing in between. If your backup contains modules that where updated between these points it will cause errors and broken modules. When the backups run if you could have a config file that contains the module versions and when you did a restore it can go out and install these versions then you can restore to any tb machine (still limited by the same tb version I am sure but that is not too big of a deal). Right now I am stuck with not doing module updates because I want to be able to do backups reliably.

New Backup won't execute

I had some issues with the standard backup module so I decided to try the beta version today. Now nothing works. I get:

Not Found

The requested URL /maint/modules/backup/backup.php was not found on this server.

... when I try to execute.

I have no backups and this is a relatively fresh re-install of trixbox CE 2.6

Looking into it. We are

Looking into it. We are going to push a new version in the next few days that has a number of bug fixes in it.

There are multiple issues

There are multiple issues with the beta that are being fixed (an update to the appcelerator framework totally fubared it) and this should be done in the next few days.

The idea of actually restoring the same module versions (or, I guess, installing them if they arent installed) when doing a restore is interesting. I am not sure how hard that would be to do, but it would be really cool. I'll look into it.

this new module dont work

this new module dont work

The module *DOES* work..

After a bit of tweaking... Here's a quick synopsis of my experience..

I am NOT using default passwords.

Clean 2.6.1.13 install.
Changed default mysql passwords, maint-passwd (not as trivial as I'd like ;))
ran 'yum -y update'
noticed tbm-backup was missing
ran 'yum -y --enablerepo=trixboxbeta install tbm-backup'

Then, when trying to access the backup webpage, I got the warning message referencing the amp109 password that I'm NOT using.. .e.g."Warning Message: An error was detected which prevented the loading of this page. If this problem persists, please contact the website administrator. blah blah... "

Then I modified the hard-coded "amp109" password that necits posted in /var/www/html/maint/modules/backup/controllers/backup.php so it was using my correct password..

The backup webpage then worked fine. And the backup .tar.gz file was created successfully. I have not tested recovering from this .tar.gz file yet.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.