girlie
Feb 17 2002, 10:45 AM
Thanks, it appears that I managed to successfully export everything. Only one of the exports appeared in the browser in one long string of text and a different font (even though 3 out of 4 of my blogs had HTML in the entries) - but I was able to View Source on them all. Interesting.
I just saved the resulting text file from each "View Source" command I performed.
One thing I noticed which made me curious: the entries didn't seemed to be exported in any particular order. I doubt this matters, but at first, I thought some had been missed.
As an extra precaution, I have FTP'd all my entry files down to my local hard drive.
The only question still left concerns backing up my templates and modules: any easier way than copy and paste?
Thanks for your help, Ben!
kgish
Feb 18 2002, 05:11 AM
Okay, so after I do the export, what am I supposed to do next? I can figure out three possibilities:
1. Select all, copy, paste in Notepad and save txt-file.
2. Save as an HTML-file.
3. View source and repeat step 1.
Which one is right?
By the way, export only backs up the blog stuff. You still need to back up templates, modules etc. yourself in case the server blows up anyway.
Personally I prefer a complete FTP as the only fail-safe way to have a copy of everything.
Only disadvantage is that this is not automatic, and for the forgetful people like myself this is a problem. Also this is much slower.
Interesting!
Here's the Import Format, maybe that will get you started.
Brenna
the booge
May 2 2002, 03:31 AM
Maybe 5 or 10 seconds. It isn't that bad, considering that my backups will always be there in the event of a problem. I think that it is worth the wait!
the booge
May 8 2002, 10:34 AM
would it be possible to archive on a yearly basis? with over 1500 entries being automatically exported, it now drags a little whenever i enter a post. if MT only exported the entries for the current year, it would certainly speed things up. i could export on a montly basis, but reimporting all of these files would be a drag in the event of a crash.
and does this exporting effect the speed at which comments are stored? i am noticing a longer delay when entering comments on my site, but this could be due to a slow internet connection.
pat
btrott
Feb 16 2002, 07:14 PM
All--
This is a reminder, a request, etc.: *please* export your data from Movable Type using the standard Export mechanism. This exports all of your entries and comments into a format that is suitable for importing back into MT using the Import mechanism.
It is *the best way* to back up your data.
Movable Type is a stable system, and database corruption is pretty rare. But it can happen, and the most likely scenario is when you run out of disk space on your account--once you have reached your disk quota, your system will automatically prevent any further writes to the disk. If the data storage layer (Berkeley DB) is in the process of writing data to the disk, *your database can be corrupted*. This is bad news, and if you don't have your data exported, it's much, much worse.
So PLEASE: use the Export mechanism to back up your entries and comments. I realize that it may be difficult to remember to do it, since it's not automatic; but even if you do it only once a week, losing a week's worth of entries is not nearly as bad as losing all of your entries, which is what you will lose if you never back up.
We do have plans for automatic backups in the future (of the entire database, including templates, configuration, etc.).
Also: note that nothing in the above is specific to Movable Type. Data corruption can happen with any sort of data storage: Berkeley DB, flat text files, etc. In fact, it can actually be even worse when using flat text files, because your entire file could be wiped out; whereas when you are using Berkeley DB, only a small part of the database is corrupted, and data can be recovered manually.
So this is not specific to either Movable Type or Berkeley DB storage; in reality the speed gained by using Berkeley DB over text files makes any drawbacks irrelevant.
btrott
Feb 17 2002, 11:53 AM
At the moment copy and paste is the best way to go re: backing up your templates etc. In a future release we plan to have automatic backups, but currently, we don't. Of course, you can always back up your template.db file from your server, as well.
btrott
Feb 18 2002, 09:30 AM
Well, the easiest way is to just use option-click or shift-click; but if you're using Internet Explorer, you need to be careful with this, as it could give you unusable data (as I mentioned in my other post).
So in general, if you have Netscape it's best to use that for exporting, and then just use option-click or shift-click (depending on Mac vs. Windows), which will save the file to your hard drive.
girlie
May 8 2002, 05:48 PM
Doesn't adding a comment force the rebuilding of relevant pages? and thus your export file is being rebuilt each time a comment is posted, since comments are included in the export?
the booge
May 1 2002, 05:23 AM
Could you provide the template tags that are used when MT exports it's entries? Since I have ample space on my hosting service, I thought I would set up a template to automatically export my entries. Therefore, each time I post, MT would automatically publish a file that would be equivalent to me remembering to use the Export feature.
How 'bout them apples?
Thanks
Pat
btrott
May 1 2002, 11:33 PM
Nice! How much longer does the index template rebuild take, out of curiousity?
girlie
Feb 17 2002, 09:34 AM
I see from the manual that exporting from IE can cause problems.
1) What's the best way to check for errors? Just view the output file and look for what?
2) Has anyone successfully exported from IE with any type of workarounds? Meaning, is there a way to avoid above-mentioned problem?
3) It's been so long since I've used Netscape I'm not sure what version I have on my computer. Does the version matter if I have to go that route?
4) So the export will take care of entries - but is there a way to back up my templates and modules?? I've been copying them all into one big text file, but that's a major pain once you get a few blogs going.
Thanks in advance!!!
girlie
Feb 17 2002, 01:42 PM
ah, yes I FTP'd ALL my MT files while doing the same for my entries
btrott
Feb 26 2002, 08:03 PM
The entries will be sorted in 2.0 when exporting.
As for the problem with pair.com--are you running MT using cgiwrap? It will be much more stable on pair.com using cgiwrap, because the resource allowances are much higher. So you may want to try that.
the booge
May 1 2002, 03:45 PM
Works like a charm (even without the V2.1 upgrade - albeit a few fields are currently blank). Perhaps this is a configuration option that could be made available in a future MT version?
I am running 5 different blogs to take care of different components of my websites, and now they automatically generate exported entries every time I post. These blogs generate 1.5 Mb of exported entry files (I have over 1500 posts on one blog) but with storage space being cheap and the fact that I no longer have to remember to export my entries make it worth it.
Thanks for the help and the quick response.
Pat
jessorangeclouds
May 5 2002, 02:45 PM
the one thing i noticed was that the posts in the file produced are in the opposite order when compared to the file created by export in the MT menu.
so when importing, i'm guessing they'll link properly based on date created, but the numbering of the posts would be totally different from the original blog (due to the reverse import).
anyone following me? lol!
btrott
May 5 2002, 03:39 PM
Hmm, that's true. I think you could use sort_order and sort_by to change the ordering.
the booge
May 9 2002, 03:43 AM
seems to be that way. therefore, if it is taking a long time to rebuild my massive export file, everytime someone comments, it will take a long time for them as well.
this is why it would be nice to break the exported file into pieces (yearly) but not too many pieces (monthly) in the event of a rebuild.
the booge
Feb 26 2002, 01:36 PM
Would an upcoming version of MT be able to allow sorted exporting of the entries? I ask because I have around 1500 entries in my MT blog and sometimes when I export it, it appears to cut out before it is finished exporting my entire blog (probably because I also host at pair.com). If I was able to export based on date, I could check the first and last entry exported to ensure that the entire thing was being exported.
Sorry about the number of times the word 'export' was used in this post...
Thanks
pat
btrott
May 1 2002, 09:53 AM
Sure. This is the template that the export uses:
CODE
AUTHOR: <$MTEntryAuthor$>
TITLE: <$MTEntryTitle$>
STATUS: <$MTEntryStatus$>
ALLOW COMMENTS: <$MTEntryFlag flag="allow_comments"$>
CONVERT BREAKS: <$MTEntryFlag flag="convert_breaks"$>
PRIMARY CATEGORY: <$MTEntryCategory$>
<MTEntryCategories>
CATEGORY: <$MTCategoryLabel$>
</MTEntryCategories>
DATE: <$MTEntryDate format="%m/%d/%Y %I:%M:%S %p"$>
-----
BODY:
<$MTEntryBody convert_breaks="0"$>
-----
EXTENDED BODY:
<$MTEntryMore convert_breaks="0"$>
-----
EXCERPT:
<$MTEntryExcerpt no_generate="1" convert_breaks="0"$>
-----
<MTComments>
COMMENT:
AUTHOR: <$MTCommentAuthor$>
EMAIL: <$MTCommentEmail$>
IP: <$MTCommentIP$>
URL: <$MTCommentURL$>
DATE: <$MTCommentDate format="%m/%d/%Y %I:%M:%S %p"$>
<$MTCommentBody convert_breaks="0"$>
-----
</MTComments>
--------
If you wrap that in <MTEntries lastn="1000"> and </MTEntries>, that should work for you (though you may need to adjust the 1000 if you have more entries).
Note that the above is from 2.1's export, which also exports Post Status and the convert breaks/allow comments flags. So it probably won't work until 2.1 is released (but that's in like a day or two).
girlie
May 4 2002, 11:04 AM
I just had to say, this was a mighty clever idea!! Duly noted in my Tips blog for future reference!!
btrott
Feb 17 2002, 09:51 AM
Exporting from IE: the problem is that, if your export data contains any HTML, IE will ignore the Content-Type header (set to 'text/plain') and interpret the export data as HTML.
The way you can tell if it is doing this is if your data all runs together on one line, without line breaks; also, generally the font will be different (because IE uses its fixed-width font for viewing text/plain pages).
If you do see that the problem is occurring in IE, you can still get the original text content that you need: just View Source and copy the data from the source.
Actually, that is another way of determining which content-type IE is using: if you are able to View Source (ie. the menu item is not greyed out), IE is seeing the content as HTML. So if you *can* view source, you *should*, and you should copy the data from there. Otherwise, just copy it from the page. Or save it directly to disk.
Rogi
Feb 17 2002, 04:28 PM
QUOTE
Exporting from IE: the problem is that, if your export data contains any HTML, IE will ignore the Content-Type header (set to 'text/plain') and interpret the export data as HTML.
The way you can tell if it is doing this is if your data all runs together on one line, without line breaks; also, generally the font will be different (because IE uses its fixed-width font for viewing text/plain pages).
Hi Ben,
I'm using IE6 and it has indeed always tried to foul up the export into one huge 900-post long line/block of useless confusion, but since I've done the latest bug-fix/security update (From;
http://www.microsoft.com/windows....ult.asp ) it has been fine and exports them all formatted properly etc.
*Disclaimer* This doesn't of course mean that everyone else will be so lucky, but it is fine with me now. (at last.)
Cheers,
jessorangeclouds
May 5 2002, 03:58 PM
yes!
CODE
<MTEntries lastn="1000" sort_order="ascend">
that did the trick. thanks ben!
rcogley
Jul 16 2003, 08:22 PM
QUOTE (btrott @ May 1 2002, 05:53 PM)
CODE
AUTHOR: <$MTEntryAuthor$>
TITLE: <$MTEntryTitle$>
STATUS: <$MTEntryStatus$>
ALLOW COMMENTS: <$MTEntryFlag flag="allow_comments"$>
CONVERT BREAKS: <$MTEntryFlag flag="convert_breaks"$>
PRIMARY CATEGORY: <$MTEntryCategory$>
<MTEntryCategories>
CATEGORY: <$MTCategoryLabel$>
</MTEntryCategories>
DATE: <$MTEntryDate format="%m/%d/%Y %I:%M:%S %p"$>
-----
BODY:
<$MTEntryBody convert_breaks="0"$>
-----
EXTENDED BODY:
<$MTEntryMore convert_breaks="0"$>
-----
EXCERPT:
<$MTEntryExcerpt no_generate="1" convert_breaks="0"$>
-----
<MTComments>
COMMENT:
AUTHOR: <$MTCommentAuthor$>
EMAIL: <$MTCommentEmail$>
IP: <$MTCommentIP$>
URL: <$MTCommentURL$>
DATE: <$MTCommentDate format="%m/%d/%Y %I:%M:%S %p"$>
<$MTCommentBody convert_breaks="0"$>
-----
</MTComments>
--------
Regarding this, I have a UTF-8 MT blog, which has Japanese posts. When I tried this (really cool idea) on it, I get munged text. Can I specify what language the text is supposed to be in, like the other XHTML templates?
Best regards
Rick
rcogley
Jul 16 2003, 08:48 PM
A little more information -
The text file that gets created in either the automatic export from the mt.cgi main admin menu, or, from this new template created to do the same thing, is UTF-8.
I can switch to UTF-8 in my browser, and it shows the Japanese with no problem. I can then save to a text file on my local hard disk and it shows up w/ no trouble.
Now, my question is, can I get it to show in the browser in UTF-8 automatically, without having to make the encoding switch?
Regards
Rick
khalido
Jul 16 2003, 11:51 PM
The template posted above for exporting entries dates back almost a year and a half. I just wanted to know whether with all the MT changes since that time, this is still the *right* template, or have there been changes to it? I ask becasue it there aren't any trackback related tags in it.
I want to make a index template which is automatically rebuilt once a week, say by calling a cron job. I can call a cron job to build the whole site, but how do I only build one template? Also, I want that template not to rebuild automatically when I post a new entry, it should only be run once a week.
Could it be possible to have the MT application itself have rebuild times set for each template? Maybe in a future release or something.
rcogley
Jul 17 2003, 12:00 AM
QUOTE (khalido @ Jul 17 2003, 07:51 AM)
The template posted above for exporting entries dates back almost a year and a half. I just wanted to know whether with all the MT changes since that time, this is still the *right* template, or have there been changes to it? I ask becasue it there aren't any trackback related tags in it.
I want to make a index template which is automatically rebuilt once a week, say by calling a cron job. I can call a cron job to build the whole site, but how do I only build one template? Also, I want that template not to rebuild automatically when I post a new entry.
Try -
mt-rebuildWhen I created my index template to make this backup text file, I turned off automatic indexing - there's a checkbox. Also, you might be able to get a hint out of looking at what program and URL is being run when you do a manual index on that template (use the rebuild button under the text entry field, NOT the one at the top of the page.)
girlie
Jul 17 2003, 01:52 PM
You can see the latest version of the export file template by viewing lib/MT/App/CMS.pm in a text editor and looking for the export subroutine. The template code begins at line 2952 in version 2.64.
maddy
Sep 18 2003, 07:43 PM
So I don't lose it, and to serve as another important reminder to back up, I'm going to
link to this thread about backing up your entries and blog - it contains some useful links and ideas for backing up your blogs. It also contains an expensive horror story. So, BACK UP!!!!
iancull
Feb 14 2004, 08:20 PM
Thanks Girlie for linking to this thread from your Tips & Tricks.
I created a template to export everything to a .txt file, copying the appropriate bits from the CMS.pm file. Works perfectly and takes no (noticeable) time to execute.
I think such a template should be included with the MovableType build ...
girlie
Feb 14 2004, 08:42 PM
You might also be interested in
Create an Export Blog.
shelley
Nov 16 2004, 11:58 AM
Caveat to the export method being touted here:
If you create an export file via template method, only published entries will be included in that - not DRAFT or FUTURE status.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please
click here.