2 Jun 20, 2008 12:17
Wow this would be cool.
So here's some "top of my head" thoughts, hoping that it sparks some discussion and/or hacks. First you need to query the database a lot to make this happen. For example: what categories (and of course sub-categories) are assigned to this blog? Because posts are really assigned to categories, so to get the posts means you have to get the cats first. Also if you are allowing "cross post across multiple blogs" then you will really have to dig deep to find all the posts that MIGHT be attached to that blog.
Database backups typically have everything. To get only one blog would, to me, imply that you only want info related to bloggers (users in table-land) who can post in that blog, so that is another thing you would have to carefully extract accurately. Like: the generic evo_users table would only pull the users who can post in that blog. Further you would probably want to only pull evo_settings that applied to that particular user. hmmm... It might be that the user-specific settings are stored in the user profile. It is worth investigating though to see if you are pulling ONLY the info appropriate to those bloggers who can post in the blog you are doing the database dump about.
Other areas of interest will be widgets and plugins. It should be no problem to pull the widgets associated with a blog, but I can't even guess at how to make sure you have the appropriate plugin info in the event that a plugin has created a widget that the blog you are backing up is using.
Wow this is an awesome question! Way back when I did the "give a blogger a blog" hack did I envision the blogger wanting a backup of their blog. I have this funny feeling that both the obsolete AutoBlog and current UserBlog plugins thought of this either. Great place to go though. It will be exciting, on a digital level, to see what can be done regarding a complete answer to this question.