Article Index
Since version 1.0.1 of BwPostman you have the possibility to save and restore the tables of BwPostman. Additionally these tables can be checked. If errors occur, then they will be repaired automatically. That works very reliable, but a hundred-percentage-guarantee I cannot give.
With this you have the possibility to de-install a totally shot to pieces installation of BwPostman and install BwPostman anew without loosing mailing lists, newsletters, campaigns or subscribers.
Save your data! This can be done with save tables from BwPostman. The reflection: “If I do some repair and something goes down in drain, then the fat's in the fire.” prompted me to code a backup routine. But the best and latest backup will be worth nothing, if I can't restore it in worse case. Furthermore it gave a restore tables, too.
Maintenance is called from main menu of BwPostman or from sub-menu. Beside basic settings, with that BwPostman can be configured and the link to the forum there are three buttons: Check and repair tables, Save tables and Restore tables.
Check and repair tables
With one click to this button the tables were checked by reference to the SQL installation file of the installed version of BwPostman. The result of the check and the repair attempt is shown step by step in an overview. With the button Back in the toolbar you get back to maintenance.
Internally the check works as follows:
First will be checked, if there are all needed tables in place. Missing tables are created. Next will be checked, if there are some tables having BwPostman in their name, but are not needed (e.g. remaining from a previous installed version). These will be deleted if any.
In the next step each table is checked for engine, default character set and primary key and will be corrected if needed.
Following each table will be checked for column names and attributes (also called properties) of the columns. Divergences are corrected, too.
In the second last step the Asset-IDs of the data sets of all tables will be checked. If there is no Asset-ID, there will be an attempt to create one. With a missing Asset-ID it is not possible to delete an item. If creating the Asset-ID fails, then you once have to open the item manually in back-end and save it.
Finally it will be checked, if the entered User-IDs match them of Joomla!® and they will be corrected if needed, too. This happens by comparing the email addresses of the subscribers with the email addresses of the users of Joomla!®.
Well, this is an attempt to find and correct essential errors as well as not as urgent problems. The essential errors are displayed in red, lesser problems occur in yellow-orange. If such appears in the overview, the result follows right below. Only when the result is red there is an error that cannot be corrected automatically.
Save tables
Backup of tables is suggested from time to time, especially before a check/repair of the tables, nobody knows…
With one click at the button Save tables structures and data of the tables are assembled in XML formatted file and a browser window is shown, which asks what to do with this file. It is useful to save the file (locally). Remember well where the file is to find, perhaps it will be needed some time!
Since version 1.3.0 of BwPostman the access rights of the component, the tables and the individual items are saved. Because the access rights are closely related to the user groups, the user groups and their parent groups, for which are assigned access rights for BwPostman, are saved also.
Since version 2.1.0 of BwPostman this backup file also may be packed to reduce file size. The used pack format is ZIP.
The backup will be packed automatically, if the switch Compress backup file at Basic settings at the options of BwPostman is activated.
The backup file not only is offered for download, before version 3.0.0 it also is stored at folder
<my_Joomla_installation>/images/bw_postman/backup_tables/,
since version 3.0.0 at the folder
<my_Joomla_installation>/images/com_bwpostman/backup_tables/.
So You are able to delete the backup file using the Media Manager of Joomla!®.
Restore tables
Restoring tables won't work with one click:
One click to the button Restore tables lends to the view, where you may select the backup file. The click at Start restore starts restoring tables to the database.
With this click all existing tables of BwPostman will be deleted from database and only the backup data are available afterwards!
Since version 2.1.0 of BwPostman the restoring of a backup of BwPostman recognizes, if a backup file is packed and unpacks it automatically before restoring.
Immediately after restoring the tables will be checked by above-mentioned manner to ensure, that the structure of the restored tables fits the installed version. Certainly the result is displayed.
With the button Back you get back to maintenance.
Restoring of tables only works with backup files made by BwPostman!
Since version 1.3.0 of BwPostman the access rights of the component, the tables and the individual items are saved. Because the access rights are closely related to the user groups, the user groups and their parent groups, for which are assigned access rights for BwPostman, are saved also.
At restoring the tables the structure of the user groups will be restored. While doing so, BwPostman checks by means of the name of the user group, if the user groups deposited at the backup are still present. If this is not the case, BwPostman creates the correlate user group and the parents anew at Joomla!®. For that the access rights of the restored version not to come to nothing, the IDs of the user groups, that are deposited at the access rights, are rewritten to the new Ids.
If against expectations the restoring abort, then this is normally no problem. BwPostman creates a restore point before restoring. Th this restore point will be returned, if something goes wrong while restoring. With this it is fairly ensured, that a running version of BwPostman exists and one is not left empty handed with empty or missing tables.
Unfortunately there are some cases left, where the restoring fails at a manner, that it is not possible to set back to the restore point automatically. In this case You have to intervene manually to the database, with phpMyAdmin for instance. The restore point is a copy of the affected tables with the suffix _tmp. Now its the best time for a backup of Your tables if You not have done so before! If You delete all tables, which are the original to the tables with the suffix _tmp, that means the tables without suffix _tmp, and subsequently remove the suffix _tmp from the copied tables, You should get a running version, though.
Migration of BwPostman to another Joomla!® Installation?
When your read the previous chapters, you may wonder: Am I able to migrate from one Joomla!® installation to another by Save tables and Restore tables?
The answer is: Yes, conditionally and if BwPostman is installed at this installation of Joomla!®.
Mailing lists and campaigns are absolutely not the problem. By this reason – among others – there is the check and pacing of stored User-IDs while check and repair tables, if possible.
There are more difficulties with the newsletters. Beneath the HTML version and text version BwPostman stores the IDs of the articles. If the articles of Joomla!® are exactly the same, that means textual and with ID, then there are absolutely no problems. But if content or IDs differ, or content, to that the newsletter possesses an ID, in the new installation have a completely different article, there will be at last a problem editing the unsent newsletters in the new installation.