Help - Search - Members - Calendar
Full Version: Automated export
Movable Type Community Forum > Additional Resources > Tips and Tricks
lyrae
Hey,

I'm thinking about writing a cron job to perform the post export at a regular interval to back up my posts. Before I do this I thought I'd ask if anyone else has done it so I don't have to reinvent the wheel. Anyone?

TIA!
iosonoio
it's not the same, but i have an index template called export (witch refers to an export.cgi file) with the following code:
CODE
<MTEntries lastn="1000" sort_order="ascend">
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>
--------
</MTEntries>


so every time a make an entry or rebuilding the export file upgrade itself, so the backup!
lyrae
Hrm, I was really thinking more about a cron job, perhaps sendmail-me the export file. It'll be easy to write, I just thought maybe someone else might have done it. Thanks!
kraynight
Just curious whether anyone has created an updated version of this export template with the added features of later versions of MT (trackback data, etc.)? I'm using the version posted here but want to make sure there's not anything missing from the export.
jareha
I too was wondering if there is an updated export template.

<< Jonathan
girlie
If you open up lib/MT/App/CMS.pm in a text editor, starting at line 2952 you'll see the current export format (that's in version 2.63, of course).
jareha
Does that export code end with:

CODE
--------
TEXT

...?

Thanks for the response girlie.
maddy
You can check out an example of a template (from 2.62) in this thread. The correct number of - 's are important. smile.gif
girlie
QUOTE (jareha @ May 7 2003, 08:21 PM)
Does that export code end with:

CODE
--------
TEXT

...?

Thanks for the response girlie.

It ends with the dashes - leave out "TEXT".
jareha
Thanks again girlie!
jareha
I'm not sure where we've gone with this topic since mid-2003, but I have a relevant post on my blog now. Here.

It may be of use to some (and if so, I'd be pleased to hear it).

<< Jonathan
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.