Who We Are
bmk
girlie
kristine
Search



Notify List
Let us keep you posted on new entries! Join the notify list!
Blog Status
14 entries
146 comments
12.06.04 11:44 am last update
last 50 referrers

Listed on BlogShares
Syndication
link to us!

virtual venus

virtual venus: MT Wiki
Powered By
because weblogs need love too
Sunday, September 7, 2003
Create An Export Blog

I'm really bad about remembering to do exports of my blog entries in MT, primarily because I have multiple blogs and it's a pain in the rear to visit each one, run the export, View Source (I'm using IE, which sometimes renders the output as HTML), and perform File > Save As to grab the data.

So I decided to create a Backup blog for automated exports. (This blog also holds my Configuration Listings.)

NOTE: This backup method will only export entries with a status of PUBLISH!

Because I'm such a nice person (heh), I've zipped the files for you.

Files included:

  • export.txt - the format for exporting
  • exportreadme.txt - instructions
  • rebuild.cgi - used to generate the export files
(The rebuild.cgi file was found in this MT forum thread.)

Detailed instructions are available in exportreadme.txt, but basically, you

  • create the new blog
  • create an Index Template for each blog to export
  • rebuild the blog using rebuild.cgi
A .txt file for each blog's exported entries is then generated in your Backup folder.

It now takes about six seconds to export all my blogs!


Comments: 10

I have a Cron that runs every night and preforms a MySQL db dump. Are there advantages/disadvantages to your way over mine?

by the red guy at 07:18 PM on 09.09.03

Just out of curiosity, why delete all templates except the stylesheet?

I added in a new index template for each blog showing the templates for each blog - using Brenna's ShowTemplates. I have far too many blogs with millions of templates to go back and link them to files! ;)

And this is great - I don't have to feel guilty now every time I ask someone if they've got a recent export! ;)

by maddy at 06:58 PM on 09.10.03

Hey, I figured out a way to have the backup directory zipped automatically, and ready for download. If you add this as a cron job (fixing the paths obviously):

zip -r ~/public_html/backup.zip ~/public_html/backup

I've really gone to town today, I went through and created backup blogs for both my installations, and have them "exporting" all of their entries and templates to the same directory. I also did your config listing thingy and set up a page with all the relevant links to the various scripts and zip file. I now have a little bookmark with my daily and weekly tasks, and it's great!

So, thank you, thank you, thank you! I was getting worried because the last couple of mySQL dumps I've tried have timed out, and I'd resorted to doing tables at a time! And as great as Multiple Blog Suite is, I'm too lazy for all that "save file as" business for my multiple blogs. :)

by maddy at 11:12 PM on 09.10.03

And to have the export emailed to me:

metasend -b -t email@domain.com -s Backup -m application/zip -f ~/public_html/backup.zip -S 1500000

where Backup is the subject of the email, and the 1500000 is the number of bytes before the email is split into parts. Set it higher than the size of your backup.zip. :)

by maddy at 07:23 AM on 09.11.03

Oh, Maddy, thank you for those last two pieces I wanted (zip and email)!!

I prefer the linking method because I won't ever have to do copy-and-paste of my templates that way. Though I think I like having the index templates you mentioned as a means of viewing all my templates at once. I may go in and do that just for kicks.

(And I can also use your zip and email for all those template folders, yay!)

I'm obsessive about having a variety of backup methods: in case one fails, there's always another. =)

by girlie at 05:57 PM on 09.11.03

Oh, and a single page for all these options is a great idea as well. I think I have a project for this weekend. ;-)

by girlie at 05:59 PM on 09.11.03

Thanks for the ideas. I've attempted to get this to work with a cron job...my first ever attempt with cron jobs. We'll see how it works.

by Rayne at 09:45 PM on 11.21.03

hey i tried this and all im getting in my txt file is </MTOtherBlog>.

ive run rebuild.cgi and it works

by marc at 08:21 PM on 12.03.03

Did you install the MTOtherBlog plugin?

by girlie at 08:32 PM on 12.03.03

it worked beautifully now thanks

by marc at 10:09 AM on 12.04.03
Comments are closed on this entry
More Entries

Copyright © Virtual Venus