[wp-hackers] [Gsoc Idea] Tagging/Taking a snapshot of WP installation

Mike Schinkel mikeschinkel at newclarity.net
Wed Mar 10 23:16:02 UTC 2010


Kudos!  All these are great ideas.    

What would also be nice is if your system encouraged a snapshot to be a collection of discrete divisible snapshots (defined by a tag) so that selected items could be snapshot by themselves and ideally so that someone who has created an entire system snapshot could manually dissect that snapshot and carve out just the piece they may need at the time (especially helpful during new site development to take parts developed from previous sites.)  Having the hooks in plugins would allow each plugin t

Off the top of my head a plugin might do something like this in an activation hook: 

register_snapshot('myeventcal', 'myeventcal_snapshot')
function my eventcal_snapshot($snapshot=null) {
	//... do stuff here to create or update the snapshot
	return $snapshot;
}

Then your system could take the registered subsystems, call the functions to get the snapshots and then generate a serialization format, ideally one people could read and edit. Maybe this would be in XML files or even JSON maybe with each subsystem's serialization stored in a different file which you could then zip up into a single .ZIP file that contains a manifest and/or each file could have identifying information.  

Of course I'm sure it won't work exactly like I describe; one can't know until they starting coding it; but hopefully the ideas make sense?

Doing this would also empower other plugins to use the snapshots too making possible much more elaborate backup and restore, archive, and deployments plugins.

I've been wanting something like this for a while... 

-Mike
P.S. Be sure to follow Postel's Law: http://en.wikipedia.org/wiki/Robustness_principle  A snapshot should be (somewhat) usable even if the site is using a newer version of a plugin.  

On Mar 10, 2010, at 2:50 PM, Ankit Ahuja wrote:

> @Jason Great idea about a hook on creation of a snapshot. That way, third
> party services could create their own plugins to make backing up easy. WP
> does need a backup solution as part of core.
> 
> And I could create an example plugin to show how the hook can be used.
> 
> 
> 
> On Thu, Mar 11, 2010 at 1:13 AM, Justin Shreve <justin.shreve at gmail.com>wrote:
> 
>> I am extremely sorry for the second message and it probably looks like
>> spam.
>> I did not mean to post all that. I meant to copy and paste the following
>> link and had some information for work on my clipboard instead.
>> 
>> This is the link I meant to include (some additional ideas for
>> export/import:)
>> 
>> 
>> http://wpdevel.wordpress.com/2010/03/02/its-that-time-of-year-again-time-to/comment-page-1/#comment-5156
>> _______________________________________________
>> wp-hackers mailing list
>> wp-hackers at lists.automattic.com
>> http://lists.automattic.com/mailman/listinfo/wp-hackers
>> 
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers



More information about the wp-hackers mailing list