Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2020-07-10 23:56:10

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 9,612
Website

rss_admin_db_manager: Database management in Textpattern

Can’t find the original plugin thread so I’ll post this here since I’ve taken over this plugin and overhauled it for Textpattern 4.8.

Latest release

As always, raise an issue if you spot anything going sideways. Hope this update proves useful.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#2 2020-07-11 02:09:23

michaelkpate
Moderator
From: Avon Park, FL
Registered: 2004-02-24
Posts: 1,313
Website

Re: rss_admin_db_manager: Database management in Textpattern

[ORPHAN] rss_admin_db_manager – database backups and more

I searched for it and then went to the last page of the search results.

Offline

#3 2020-07-11 05:23:23

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 8,138
Website

Re: rss_admin_db_manager: Database management in Textpattern

Looks good and I like it that for tables which can not be repaired the repair link is missing. I nevertheless had a minor issue first time I used it when I clicked the backup on such a table. I’m wondering if it would be easy for those tables to have the word repaired but unlinked.


Yiannis
——————————
neme.org | hblack.net | LABS | State Machines | NeMe @ github | Covid-19; a resource
I do my best editing after I click on the submit button.

Online

#4 2020-07-11 08:18:28

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 9,612
Website

Re: rss_admin_db_manager: Database management in Textpattern

Ha, thanks Michael. I searched in the Plugin Support thread section, which is why I didn’t find it and forgot about the archive in my 1am stupour. Should we:

a) Move that thread out of the archive and bring it back here, then merge this topic with it.
b) Rebrand this as smd_db_manager and rename this thread then leave rss_admin_db_manager behind?

I don’t mind either way.

colak wrote #324422:

I nevertheless had a minor issue first time I used [the repair link] when I clicked the backup on such a table. I’m wondering if it would be easy for those tables to have the word repaired but unlinked.

Here’s the thing. I tried that set of ‘actions’ with pipes between them. Looked great until you go to mobile, then it shows this:

Repair |
Backup |
Optimize
| Drop

which is ugly. So I went without, but don’t care for the fact the links are closely spaced now. I could go back to 4 individual table cells with redundant column headings.

Either way, I don’t think ‘repaired’ is the right message. Because for an InnoDB table, it might well be corrupt. Two things we could do here:

  1. Only link the Repair button if the table has errors/overhead. So you can’t repair a table that is showing green/0B. AND show the Repair text (similarly unlinked) for InnoDB tables all the time.
  2. Try and enable InnoDB tables to be repaired manually (because MySQL doesn’t support REPAIR TABLE for InnoDB).

The latter is very labour intensive as it involves (at minimum) cloning the table structure to a temporary table, cloning the data into it, truncating the original table and then moving the data back and deleting the clone. And it’s recommended that the MySQL service be stopped while this happens, which of course we can’t do in a live Txp environment or the admin side will stop working!

Lots of things could also go wrong there, and there’s still no guarantee it’ll fix it. Mind you, there’s no guarantee a repair operation will work on a MyISAM table either if it’s very corrupt. There are so many things that can go wrong with InnoDB tables and repair is usually incredibly labour intensive at the command line.

So I dunno really.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#5 2020-07-11 09:20:31

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 8,138
Website

Re: rss_admin_db_manager: Database management in Textpattern

Admittedly I have no experience with InnoDB.

Is there a way to detect and serve different options or will it be too convoluted?
In my setup at least, I like option 1:)


Yiannis
——————————
neme.org | hblack.net | LABS | State Machines | NeMe @ github | Covid-19; a resource
I do my best editing after I click on the submit button.

Online

#6 2020-07-11 09:39:49

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 9,612
Website

Re: rss_admin_db_manager: Database management in Textpattern

colak wrote #324425:

Is there a way to detect and serve different options or will it be too convoluted?

It does that now. If engine = InnoDB, then omit Repair link.

I’m not sure if adding an unlinked ‘Repair’ text to InnoDB rows implies that it might be repairable, like the other tables are. That’s misleading as the text will never become a link in this case. It does, however, keep everything lined up nicely.

The other option is to entirely omit the Repair link unless the table has overhead/errors. That means repairable tables stick out a bit more by having one extra action. Is that enough to reduce the clutter and make it less likely for you to mistake the word ‘backup’ for ‘repair’? :)


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#7 2020-07-11 16:13:47

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 8,138
Website

Re: rss_admin_db_manager: Database management in Textpattern

Bloke wrote #324426:

The other option is to entirely omit the Repair link unless the table has overhead/errors. That means repairable tables stick out a bit more by having one extra action. Is that enough to reduce the clutter and make it less likely for you to mistake the word ‘backup’ for ‘repair’? :)

I do not think that I’ll make the mistake again:) The issue was with an unrepairable table with an overhead and my conditioning. I have to admit that I am a bit of a db_manager addict. I visit it once a day and repair all tables that need and can be repaired.

I do a backup once every 15 days which I alternate with an SSL one. These backups become more frequent when I add content or change the presentation.

I very seldom need to use the drop table and I only do so to delete remnants of uninstalled plugins or updated plugins that build new tables after they back-up the old ones.

I do not remember ever optimising a table.

Omitting the repair link for InnoDB and all other tables that do not need repairing may be a good idea.

Another option could be to text-align:right the particular tds … for desktops.


Yiannis
——————————
neme.org | hblack.net | LABS | State Machines | NeMe @ github | Covid-19; a resource
I do my best editing after I click on the submit button.

Online

Board footer

Powered by FluxBB