5 Days of Mura Plugins: Day 2 - Auto Archiving
After another shuffle in the lineup, we've decided to pursue the Auto Archiving plugin today. This feature will use the new Mura Bundles. I want to build this plugin for two reasons: first, it will create a full automated backup of a Mura site, which just nice. Secondly, because we at Meld Solutions were hired to extend the core functionality for Bundles out of the existing Mura API (and Blue River has since added even more functionality since we handed it back to them).
Note: I should also mention we were going to do Threaded Comments as a plugin today, but after a conversation with Matt at Blue River Interactive (developers of the Mura CMS) and a walk through the existing Mura Comments code, I realized that a great deal of the work is already there and just waiting to be tested and implemented. So, instead of duplicating that work, we've decided to take it on and get the core Mura functionality usable, as well as build a plugin to add some enhanced functionality. We've got to flesh out what that will be, but will probably include a comments browser, more direct control over the "Form Protect" feature, and others. Stay tuned for when/what we decide there (and feel free to suggest your own).
Functionality
Bundles create full duplications of a site's architecture, files and database and packages it into a single compressed package. The 'Bundle' can then be uploaded to any other Mura 5.4 install and restore the site's entire original structure. There are many options for creating/restoring Bundles, but for our purposes we'll be doing a straight, complete 'archive my site'-type Bundle that will give you a complete backup of your site*.
The backups will be scheduled as Daily/Weekly/Monthly, and there will be an option to automatically delete backups older than a specified number of days. If there's time, we'll also add an 'email' option so that backups are automatically mailed to you.
Technobabble
Because we only need a few simple fields to store our archive settings, we'll be using a Custom Class Extension (basically a class extension that isn't attached to a core Mura object like Users or Pages). I like to use this whenever possible, as it saves on having to create custom database tables and building out a more complicated architecture. This isn't to say you should avoid using custom tables, but rather that custom class extensions are more that suitable when you only need to store a limited set of data.
[update: 1:29 PM 08/02/2011]
All of the plugin administration is complete, slowed down a little by a minor Mura issue that may need to be updated (as I pointed out to Matt at BRI, I'm probably the only person on the planet, including him, that's ever used this function ... especially since he added the functionality specifically by my request). So, now all that's left is to generate a cfshedule to handle the archive requests, and then do a bit of processing/saving/emailing.
[update: 4:29 PM 08/02/2011]
Auto-archiving is now working! Still have to do some clean-up and a bit of documentation, but the plugin should be available for testing in the next hour or so.
[update: 7:43 PM 08/02/2011]
You can now download the Auto Archive plugin. Remember to test it thoroughly if you are planning to use it as your automated site backup, and if you find any bugs or issues please report them in our forums.
» download the Auto Archive plugin
*note that this plugin was designed for demonstration purposes only, and should be thoroughly tested by your organization if it is to become part of a critical backup infrastructure.
Comments
- Wes Anderson
-
I just downloaded and installed the Auto Archive plugin and when I clicked on the Settings tab I received the following error...
"Exception in onRequest
The action admin:settings.default failed.
The value useMuraDefault cannot be converted to a date."
Not a great start. Any ideas on what the problem is?
Thanks,
...Wes
- December 16, 2011, 3:44 PM