1
deka87
How to bring an uninstalled module back?
  • 2009/3/30 18:45

  • deka87

  • Friend of XOOPS

  • Posts: 1125

  • Since: 2007/10/5


Hi, this question is connected to my other question but i believe it deserves a separate topic.

So the question is like this: I uninstalled a module recently, but I have the full backup of the database I did before I got my module uninstalled. So I want my module back with all the info that I had. How do I do this? I understand that if I simply import the module sql tables it won't be installed. I thought about installing it again and then replacing new empty tables with the old ones Ihad for items and categories but that caused the total screw up. Thanks in advance!
Mind anchors

2
anderssk
Re: How to bring an uninstalled module back?
  • 2009/3/30 20:25

  • anderssk

  • Quite a regular

  • Posts: 335

  • Since: 2006/3/21


Have You try the other way.
The backup contains the table creation, so try to restore the database with tables and after that, install the module.


3
ijtzib
Re: How to bring an uninstalled module back?
  • 2009/4/14 23:00

  • ijtzib

  • Just popping in

  • Posts: 13

  • Since: 2008/5/5 1


SO if you guys are trying to do that. it means that you can move a module from one XOOPS installation to another XOOPS installation.. is that possible. but i think other stuff need to be considered...
Anyone with ideas???

4
ghia
Re: How to bring an uninstalled module back?
  • 2009/4/15 7:53

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


The module has several data in the database. Of course the tables created by the module, but also an entry in the module table, where all modules are listed. This entry contains the module number the mid. This id is used in various other tables as reference to the module. They have a field that is named mid or contains mid in the name (sometimes modid or mod_id). Examples are the tables for blocks, comments, configuration (where the preferences are kept), group permissions, templates and notifications.
So, a lot of information is woven in the database. Depending on the module it is easier to recreate the exact status of what is was before. The biggest problem is that the module id is a consecutive number for every install. When you restore to another system, the number may already be taken. Overwriting will be a sure inroad to disaster.
When you get a new module id, all refencing data must be altered.
For most modules an install with restore of the tables created by the module (see sql file) would work together by a review of all permission and admin settings.

For more complex modules, it may be necessary that other data has to be present for eg the created categories. In normal use, for eg creating new categories, the category record is inserted together with eg a permissions record. When changing the category permissions, both records are updated.
If you have the category inserted by the restore operation and you modify the permissions of the category, the update for the permissions record will fail, because it was never inserted and does not exists.
That also category numbers get their number at creation, may further complex the situation for getting all the reference numbers right.

5
ijtzib
Re: How to bring an uninstalled module back?
  • 2009/4/15 17:04

  • ijtzib

  • Just popping in

  • Posts: 13

  • Since: 2008/5/5 1


so the easiest way to go is to install fresh copy of the module and reconfigure its settings and recreate everyting...
But its possible to do it depending on which module you're working on right?
But complex modules requires more to consider....

This situation sometimes arises when we already have a live website on the internet, but then at the same time one needs to add or test another modules to the website but at the same time would like not to tamper with the live copy! so we tend to work local and then would like to restore it on the live copy.

Login

Who's Online

199 user(s) are online (113 user(s) are browsing Support Forums)


Members: 0


Guests: 199


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits