[re-opened] CMSimple_XH: Backup and Restore

Discussions and requests related to new CMSimple features, plugins, templates etc. and how to develop.
Please don't ask for support at this forums!
cmb
Posts: 13316
Joined: Tue Jun 21, 2011 11:04 am
Location: Mü-Sa, RLP, DE
Contact:

[re-opened] CMSimple_XH: Backup and Restore

Post by cmb » Fri Jun 24, 2011 6:34 pm

Hello community,

I wonder if there are any plans to improve backing up and restoring content.htm and pagedata.php (I'll call the both files "site data" in the following discussion) from the admin backend in CMSimple_XH?

Im not really satisfied with the current state (CMSimple_XH 1.4):
  • 1. There is no possibility to restore a previous version of the site data. So the user must use an FTP client, even if he could do everything else from the backend in his browser.
  • 2. When manually backing up the site data it is recommended to download the both files together, so I have to click two times. Even worse: imagine two admins simultaneously editing the same site, as it's possible in a small sports club for example. Admin1 made his changes, and makes a backup of content.htm. Meanwhile admin2 moves a page and logs out. Admin1 backups pagedata.php. Even if admin1 doesn't know: the two files are out of sync!
So I humbly propose for a next version of CMSimple_XH to either drop the backup functionality in the backend or to have one download link to save both files together (maybe tarred?). I would like the latter option most. And I would like an additional possibility to restore the site data (an older version or a downloaded one).

BTW: I guess it would be theoretically possible to get the site data out of sync, when two admins simultaneously edit pages, if the site data files are not locked properly until they're both written. I don't know, if this is already done.

Regards,
Christoph
Last edited by cmb on Sun Jul 17, 2011 8:57 pm, edited 2 times in total.
Christoph M. Becker – Plugins for CMSimple_XH

Gert
Posts: 3075
Joined: Fri May 30, 2008 4:53 pm
Location: Berlin
Contact:

Re: CMSimple_XH: Backup and Restore

Post by Gert » Fri Jun 24, 2011 7:41 pm

Hi Christoph,

CMSimple is defined as a One Admin CMS. No Multiuser CMS, and so it will remain next time.

But there is a login lock solution in progress:

- if one admin is logged in, no other can login (gets a message if he tries to login).
- If the one logout, login is free again for the next (like a toilet :lol: ).
- if he forgets to logout, there is a timeout (configurable) to give the login free again after a defined time of inactivity in the backend

It will be a plugin, but there is no time line. We have many things 80% ready, but no time enough at the moment to finish ...

You are right, we should have a restore solution in the backend. The idea is not new, but there is no one at the moment having time enough to realize it.

Would you realize it as a plugin? So welcome to the Team ;)
Gert Ebersbach | CMSimple | Templates - Plugins - Services

cmb
Posts: 13316
Joined: Tue Jun 21, 2011 11:04 am
Location: Mü-Sa, RLP, DE
Contact:

Re: CMSimple_XH: Backup and Restore

Post by cmb » Fri Jun 24, 2011 8:15 pm

Hello Gert,

on rethinking the given problem and solution, I've found, that the problems with multiple admins synchronously editing the site are not restricted to the CMSimple core. They may expand to plugins (e.g. Menumanager, Pagemanager_XH). So I wanted to restrict my proposal to the possibility to restore site data from the backend.

And I wanted to make another proposal: to not allow simultaneous admins or at least to inform, that another user is currently logged in.

But, as I see to my amazement: the CMSimple_XH development is not sleeping ;) I'm very satisfied with your planned login lock solution.
Gert wrote: You are right, we should have a restore solution in the backend. The idea is not new, but there is no one at the moment having time enough to realize it.

Would you realize it as a plugin? So welcome to the Team ;)
In principle, yes. But I don't know if I find the time currently to do another plugin. I've just released Pagemanager_XH, and I want to concentrate on this one getting out of ALPHA. But I will think about the restore plugin.

Thanks for your suggestion and the invitation.

Christoph
Christoph M. Becker – Plugins for CMSimple_XH

Holger
Site Admin
Posts: 3209
Joined: Mon May 19, 2008 7:10 pm
Location: Hessen, Germany
Contact:

Re: CMSimple_XH: Backup and Restore

Post by Holger » Fri Jun 24, 2011 8:46 pm

@Christoph & Gert,

about the backup / restore I can inform you that I've extended my Backup-Plugin to a real Backup/Restore-Solution.
The user/admin can configure all files/folders of his choice to download and restore as a zip.
I'm running some tests at the moment and the only problem is some missing error-handling in the unzip part.
If have not yet a timeline when this solution goes to the wild, but it's running on some installations with no problems.

But for the moment the focus is to release the jQuery-Plugin to bring that discussions and problems out of the world.
@Gert: have you found the time to have a look and to finished your tests with FotoGalerie?

Anyway, Jens has a "restore-option" for the online-backups already integrated in his SE-Version.
Some time age he asked if we want to include it to _XH, but there was no response from the devs...

Holger

Gert
Posts: 3075
Joined: Fri May 30, 2008 4:53 pm
Location: Berlin
Contact:

Re: CMSimple_XH: Backup and Restore

Post by Gert » Fri Jun 24, 2011 8:58 pm

Holger wrote:@Gert: have you found the time to have a look and to finished your tests with FotoGalerie?
Will try to check it at the weekend. At the moment my inflatble boats business has main season :roll: - but normally in August is a break, if the Berliners are outside of Berlin for holidays ;)

For CMSimple_XH many things are on the way ... I think they just needs some weeks to get finished.
Holger wrote:The user/admin can configure all files/folders of his choice to download and restore as a zip.
I think, what we need is a simple possibility in the backend to rename the current content.htm and pagedata.php to "date_time_content.htm" and "date_time_pagedata.php", and rename one of the Server Backups to content.htm and pagedata.php in the normal backend. Maybe it should be realized in the admin.php, as core solution.

Your Backup Plugin maybe an excellent advanced solution,

Gruss - Gert
Gert Ebersbach | CMSimple | Templates - Plugins - Services

cmb
Posts: 13316
Joined: Tue Jun 21, 2011 11:04 am
Location: Mü-Sa, RLP, DE
Contact:

Re: CMSimple_XH: Backup and Restore

Post by cmb » Fri Jun 24, 2011 9:11 pm

Hallo Holger,

IMO that sounds great. Two solutions for the restore problem. If Jens' solution will be released as a plugin, the user could choose the one he prefers. :)

I've already put some thought into the restore solution myself. I've already found a name: bar (backup and restore) ;) If I had had the time (and knowledge), I'd probably tried to make a hook available to plugins (like $pd_router->add_interest) to register plugin specific files for backup. The plugin author could make available to the user a selection in the plugin's config which files to backup (if reasonable, e.g. for galleries, so the user could decide if he wants to backup the images or only their meta data). Maybe that's simpler for the user to choose the files he want to backup. But then again the plugins must be modified to work with this. And I'm not sure, if that could be implemented as a plugin.

Thanks for your information, so I don't have to spend time on reinventing the wheel.

BTW: I'm very happy with a jQuery plugin, so that not every plugin must distribute it's own jQuery version (or rely on CDN). But I would wish that it's possible to integrate jQuery (or at least it's initialization) only on pages that really need it (to avoid the overhead).
Gert wrote: For CMSimple_XH many things are on the way ... I think they just needs some weeks to get finished.
Sounds good :)

Christoph
Last edited by cmb on Fri Jun 24, 2011 9:14 pm, edited 1 time in total.
Christoph M. Becker – Plugins for CMSimple_XH

Gert
Posts: 3075
Joined: Fri May 30, 2008 4:53 pm
Location: Berlin
Contact:

Re: CMSimple_XH: Backup and Restore

Post by Gert » Fri Jun 24, 2011 9:13 pm

cmb wrote:I'm very satisfied with your planned login lock solution.
That's Martins party ;)

Martin also is very busy at the moment - seems we have to wait to August ...
Gert Ebersbach | CMSimple | Templates - Plugins - Services

Gert
Posts: 3075
Joined: Fri May 30, 2008 4:53 pm
Location: Berlin
Contact:

Re: CMSimple_XH: Backup and Restore

Post by Gert » Fri Jun 24, 2011 9:18 pm

cmb wrote:But I would wish that it's possible to integrate jQuery (or at least it's initialization) only on pages that really need it (to avoid the overhead).
That will be possible so. But the Plugin developer of a plugin using jQuery have to take care for (loading inside the main function).
Gert Ebersbach | CMSimple | Templates - Plugins - Services

cmb
Posts: 13316
Joined: Tue Jun 21, 2011 11:04 am
Location: Mü-Sa, RLP, DE
Contact:

Re: CMSimple_XH: Backup and Restore

Post by cmb » Fri Jun 24, 2011 9:41 pm

Hello Gert,
Gert wrote: That's Martins party
It's english. As you know, "you" can be singular and plural. ;)
Gert wrote: seems we have to wait to August ...
That's fine with me.
Gert wrote: But the Plugin developer of a plugin using jQuery have to take care for (loading inside the main function).
Fine. :) And it shouldn't be a problem. If he uses jQuery without the plugin (so as it is now), he has to load it manually also ($hjs).

Christoph
Christoph M. Becker – Plugins for CMSimple_XH

Holger
Site Admin
Posts: 3209
Joined: Mon May 19, 2008 7:10 pm
Location: Hessen, Germany
Contact:

Re: CMSimple_XH: Backup and Restore

Post by Holger » Sat Jun 25, 2011 1:57 pm

Gert wrote:I think, what we need is a simple possibility in the backend to rename the current content.htm and pagedata.php to "date_time_content.htm" and "date_time_pagedata.php", and rename one of the Server Backups to content.htm and pagedata.php in the normal backend. Maybe it should be realized in the admin.php, as core solution.
Hi Gert,
yes, that's what I meant and that's how it works in CMSimple_SE. You should give it a try.
So I think that's a solution for the core and it's already avalible and tested.
Maybe it's not so hard to integrate Jens' code than writing the same from scratch.

My Backup/Restore is thought for other purposes:
if you give a paid project to your customers, you can install it as a solution for a non-geek user to prevent support-calls on Sunday morning 7:00 ;) .
It'll work with just two buttons (but the user must find the backup-zip on his computer)... ;)

Holger

Post Reply