It’s stupid to have a nag about doing a DB backup before updating core and plugins and not having a simple tool to let the user make that DB backup and recover. A simple DB export (and possibly import) feature should be in core.
Read-only archive : Issues · ClassicPress/ClassicPress · GitHub
Author : Alvaro Gois dos Santos
Vote count : 25
Status : open
Tags :
Comments
This isn’t a nag, it’s an advisory. There are lots of plugins for backups. Anyway, I’ve only used the import function, but if you look under Dashboard > Tools, you’ll find there are an importer and exporter built in.
~ posted by John
Although the idea is nice, I cannot support it as this is plugin territory.
@Alvaro , perhaps a better idea is to fine-tune your feature request and ask to include more information on what to do to make the updating process safer for the user. For example with a setp by step list of recommended actions.
@John , the importer is actually not built in at all as for it to run, first the WP Importer plugin needs to be downloaded. On top of that the most important part, the database itself, is not being im/exported, so it is pretty much useless as a protection measure.
~ posted by Pieter Bos
I agree with others that this is plugin territory because it’s not obvious to me where core should then send the backup. That’s part of the point of using a plugin: the user gets to choose.
But I do wonder whether it might be possible to add a button and a hook that plugins could then use. So a user seeing this notice and who has a backup plugin installed could then click the button, and the plugin would run immediately before the update.
~ posted by Tim Kaye
Yes, it could be a core plugin. But at least a simple procedure to enable downloading the database. It’s basic and should be available. Of course, a more elaborate system would be better, but the minimal should be available.
~ posted by Alvaro Gois dos Santos
I would strongly recommend starting this as a plugin, that way we can iterate there and recommend the plugin for testing.
If you’d like to put something up on GitHub under the ClassicPress name, let me know and I’ll create a repository for it. ClassicPress/site-backup
is one idea for the name.
In order to be considered for merge into ClassicPress core, the plugin should have excellent automated test coverage and consistent code style.
~ posted by James Nylen
I was already in the process of writing a database replacement plugin for WordPress which also doubles as a database-only backup, see https://github.com/akeeba/replace Its engine is fully unit tested. I would gladly refactor it into a database-only backup plugin,including unit tests, and contribute it to ClassicPress. The engine code is a cleaned up, stripped down version of a very mature code base which has backed up and restored dozens of millions of Joomla and WordPress sites over the last 12 years.
FWIW, having the experience of writing full site (files and database, including an installer) backup software for Joomla! and nearly 5 writing the same for WordPress (and just completed the conversion for ClassicPress) it doesn’t make much sense to do full site backups as a core CMS feature. Any CMS release cycle is too long to deal with the inevitable bugs arising from the practically infinite ways people develop their site, the environments they backup from / restore to, how they intend to use backups etc. Dealing with that is a full time occupation if you want to do it right. Database backups have a much smaller scope and cover many of the practical use cases where all you need is a backup in case an update goes pear-shaped. The more complicated cases are best served by taking a full site backup either manually or with a plugin (the latter also means that you have an experienced person to help you if things get really hairy).
~ posted by Nicholas Dionysopoulos
Hi Nicholas, this sounds like a great start to me!
Since I wrote that last message, we’ve refined our approach to accepting “research” plugins based on petitions, and they now live at ClassicPress Research · GitHub . This will serve to try out ideas behind petitions, and also to populate our upcoming plugin directory with some initial samples.
So, we’d be more than happy to have you work on something there. We really just need a way to get in touch with you to set up access and answer any questions. Generally the best way to do that has been to join our Slack group.
~ posted by James Nylen
Sounds perfect! I joined the Slack group with the handle nikosdion (same as my GitHub username). I keep general notifications off but if you at-mention me you’ll grab my attention for sure. Thank you for letting me contribute
~ posted by Nicholas K. Dionysopoulos
I believe a plugin for this is more ideal than it being in core. My own thoughts about backups are perhaps old school but I have always been of the oppionion that an application should never be left responsible for its own backups. Ever.
~ posted by William Patton
Same. Unfortunately, this backup (and restoration) method is a bit of a pain, and regular users won’t know how to do it.
viktor
October 11, 2021, 4:57am
4
Reliability of backups and restorations can’t be guaranteed across all hosting environments. Backup plugins have multiple methods to generate backups and extensive ways to try and restore backups without exhausting hosting resources.
If we add backup feature to the core, it will fail often. This means we will have to deal with angry users and try to troubleshoot a problem that’s not really a problem because user has cheap shared hosting.
I will set this petition to close, but do comment if you disagree.
7 Likes
viktor:
Reliability of backups and restorations can’t be guaranteed across all hosting environments…
If we add backup feature to the core, it will fail often. This means we will have to deal with angry users and try to troubleshoot a problem that’s not really a problem because user has cheap shared hosting.
I totally agree. The one reason I’m using the command line to make backups and restorations (and also themes and plugins installations) is that my webhost frowns upon CMSs modifying themselves. Not because of cost issues though, but because of security concerns.
1 Like
viktor
Closed
October 18, 2021, 4:57am
6
This topic was automatically closed after 7 days. New replies are no longer allowed.