Author Topic: How to recreate default scenarios?  (Read 2424 times)

archived

  • Hello, I'm new here
  • Posts: 0
    • View Profile
How to recreate default scenarios?
« on: January 08, 2006, 10:10:26 pm »
Hi all
I'm facing the following problem: some of my scenarios got spoiled, i.e. they are no more working and if I try to edit them via pluto admin site I get a mysql error like this
Code: [Select]

Fatal error: mysql error: [1064: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '?' at line 5] in EXECUTE(" SELECT Device.*, Room.Description AS RoomName, DeviceTemplate.Description AS Template FROM Device INNER JOIN DeviceTemplate ON FK_DeviceTemplate=PK_DeviceTemplate LEFT JOIN Room ON FK_Room=PK_Room WHERE PK_Device = ? ") in /var/www/pluto-admin/include/adodb/adodb-errorhandler.inc.php on line 77


My own scenarios are not a big issue, as I can delete them and recreate (well, not a big issue but quite boring ... :roll:).

Regarding default scenarios I cannot delete them, and for some of them (Play Disk, for instance) I cannot even find a proper way to recreate them.

I guess that each scenario is a record (or query) in mysql, and if a scenario got spoiled this means that the related record (or query) got spoiled as well.

Is there any way to fix those issue in a different way than rebuilding scenarios by hand?

Is there any way to re-trigger the creation of some default scenarios?

More generally, is it possible to have a kind of a backup system for mysql tables, in order to be able to restore the last stable and consistent configuration in case something goes wrong?

TIA
Marco

archived

  • Hello, I'm new here
  • Posts: 0
    • View Profile
How to recreate default scenarios?
« Reply #1 on: January 09, 2006, 10:04:21 am »
Quote
I guess that each scenario is a record (or query) in mysql, and if a scenario got spoiled this means that the related record (or query) got spoiled as well.

It's correct, a scenario is a record in the database pluto_main, table CommandGroup, but also have related records in other tables, like CommandGroup_Command. If a device who is used in a scenario is deleted, the scenario will stop working (actually, the scenario should be deleted too).
Regarding backup sollution, it's a feature on our ToDo list; however, if you want to make a backup only for mysql database, you can run from console:
Code: [Select]
mysqldump -uroot pluto_main > backup_file.sql
and restore the database with:
Code: [Select]
mysql -uroot pluto_main < backup_file.sql

Regarding broken default scenarios, perhaps it's better to open remote asistance and let us take a look to see why they are broken.