tips and tricks for movable type
back up templates with "link this template"
July 27, 2002
Maybe I'm just a blooming idiot - but after six months of copying and pasting my MT Templates into a text file for safekeeping (and copying them all repeatedly because I never remembered which ones I had changed lately), it finally dawned on me that I could use MT's "link this template to a file" feature instead!!
I guess I never thought of it because I don't edit my templates outside of MT, and the description of this feature in the manual suggests that reason as its primary purpose (i.e., I wasn't thinking "outside of the box").
So, this is what I did:
1. In each of my blog directories, I created a folder called "templates" and set the permissions to 777.
2. I pulled up each template for editing and assigned a linked file to each one. Example, for my Main Index Template, I linked to a file called "templates/mainindex.tmpl".
3. I saved the template, which generated the necessary backup file in my templates folder.
4. I downloaded all the template directories to my local drive (to prevent them from potentially getting overwritten by some freak incident).
Since I still haven't thought of an easier way to save my configuration setup for each blog:
5. I created a "configuration.txt" file for each blog as well. Included in that file is a listing of each of the Blog Configuration components and their settings relevant to that blog, as well as a listing of each template with the corresponding linked file name.
If I ever have to restore my blogs from scratch, all I need to do is make sure the template directories and their files are on my server, and re-link a (blank!) template to each one.
Voila! No more copy and paste of all those templates any more!
Maybe everyone else is already doing this (and I'm the last fool standing), but if this tip saves even one person from what I've been going through, I figured it was worth posting.
Related Links:
• how to work with templates when making changes
• link this template to a file
TrackBack: 22
(URL: http://www.thegirliematters.com/sf/mt-track.cgi/56)
» Automatically Back-up MT Templates
Excerpt: I was reading PromoGuy's site and he had a list of handy little MT tweaks. The one that I found
Weblog: Neurotic Fishbowl
Tracked: 08.02.02 12:47 PM
» Isn't she clever?
Excerpt: Do you need a more convenient way to tweak your mt.cfg file? If you're interested in doing things like stopping
Weblog: Live in the Delirious Cool
Tracked: 10.14.02 07:19 AM
» backup templates
Excerpt: [the girlie matters] tips, tricks, and things to do to my site: back up templates with "link this template"
Weblog: lovelinks
Tracked: 11.05.02 08:32 PM
» mt templates
Excerpt: i backed up my 20, 000 MT templates using this tip. very good considering if my MT got corrupted or
Weblog: digital.down.low.
Tracked: 11.16.02 08:54 AM
» Play it safe
Excerpt: Just a quick reminder for those of you using Movable Type... I know of two blogs that had their databases corrupted this week. It can, and just might happen to you. Be on the safe side. If you're sitting at home bored this weekend, take the time to mak...
Weblog: Ain't too proud to blog
Tracked: 01.31.03 10:23 PM
» Backing up
Excerpt: Robyn mentioned that she knows some people who had their MT sites corrupted and recommended regular back ups. I've backed
Weblog: Unix Gal
Tracked: 02.01.03 09:57 AM
» Back up your MT files!
Excerpt: I'm not a big reader of Ain't too proud to blog, but I did take a look today to see if Robyn had posted anything
Weblog: Neil's World
Tracked: 02.02.03 08:15 AM
» Aww Sh*t
Excerpt: Brilliant J, brilliant. I backup my templates whenever I change something. I backed it up when I added the comments...
Weblog: J : Da Blog
Tracked: 03.17.03 04:16 AM
» Movabletype Tips & Tricks
Excerpt: One of my biggest mistakes was not backing up the actual MT (movabletype) blog entries and thus why I had to manually re-enter all 150+ previous blog entries (and the comments are still not fully entered). MT has an export...
Weblog: RichardZ Blog
Tracked: 05.03.03 07:18 PM
» Time to make the back-ups
Excerpt: Thanks to a reminder from Robyn, I've exported my entries, and backed up my templates. Just for good measure, I tar/gzip'd up everything and downloaded it to the local home server......
Weblog: Rotten to the Core
Tracked: 05.17.03 10:17 PM
» BACKING UP A MOVABLE TYPE WEBLOG
Excerpt: Both of the techniques that Robyn suggested work well. I've used Movable Type's native export feature to create a file...
Weblog: Rodent Regatta
Tracked: 05.18.03 05:21 PM
» Backup Your MT Templates!
Excerpt: Here's an easy procedure for backing up your MT templates. There are tons of other good tips on this site as well.
Weblog: Mike's QuickLinks
Tracked: 06.08.03 11:43 AM
» Back Your Shit UP!
Excerpt: Web Hacking Contest I really don't need any further reason to back my shit up. A harddrive failure is enough to do that to ya. But some people out there may be backing up their harddrives, but missing the larger...
Weblog: flatoutpita
Tracked: 07.07.03 08:41 AM
» liquid
Excerpt: Didn't lose a thing! Got my account at liquidweb set up at 2pm yesterday, requested my domain name transferred (connection still a bit spotty, so must be still propagating to all the nameservers) Was a bit worried, being new to...
Weblog: the shaky kaiser
Tracked: 09.16.03 07:20 AM
» Movable Type Resources
Excerpt: Movable Type (MT) is a powerful web content publishing system, though often difficult for beginners to implement. Here are the links I have found most useful while implementing Movable Type weblogs. This list will grow as I continue to add...
Weblog: On the Job
Tracked: 10.01.03 05:26 PM
» the geek that is me.
Excerpt: i get really excited about really geeky things.....which makes me a big geek. but this is also cool for you mt users out there. :) very convenient....
Weblog: chewbecca.com: words
Tracked: 10.09.03 08:16 AM
» MT Template Maintenance
Excerpt: The quest for knowledge continues, the light bulb finally went on for templates and index files in MT. I have successfully loaded all the static HTML stuff into MT templates and all of my index files are regenerated when the...
Weblog: Completely Random
Tracked: 11.19.03 04:19 AM
» That did it
Excerpt: I got some more comment spam today... I can't imagine the hell it must be when your blog is actually popular... So I finally installed MT-Blacklist today, and while I was at it, I upgraded my Movable Type install to...
Weblog: x.blog
Tracked: 11.27.03 12:19 AM
» jan 21
Excerpt: Hour One: Ugh! hard to get up this morning. got bagel, couldn't eat the whole thing. gagged when i brushed my teeth--so gross. black T, grey sweater, jeans, boots. Left note for Fedex man. Hour Two:transit. hour three: work. giant,...
Weblog: N.B. When in doubt, TIDY UP.
Tracked: 01.21.04 01:03 PM
» Movable Type Resources
Excerpt: Movable Type (MT) is a powerful web content publishing system, though often difficult for beginners to implement. Here are the links I have found most useful while implementing Movable Type weblogs. This list will grow as I continue to add...
Weblog: Learning Movable Type
Tracked: 01.25.04 12:07 AM
» Moving your MT Blogs to a New Server or Web Host
Excerpt: Moving Your Movable Type Blog is now being updated on a separate blog - elise.com Learning Movable Type. Please see that page for the most up-to-date version. Moving your Movable Type blog to a new server or to a new host is much more perilous than you...
Weblog: elise.com: On the Job
Tracked: 01.30.04 05:26 PM
» MT Success!
Excerpt: In which I recount, in painful detail, problems encountered in switching from Berkeley db to MySQL for my Movable Type installation.
Weblog: Kaedrin Weblog
Tracked: 10.31.04 11:21 AM
Comments
Wonderful idea! Thanks so much for the tip!
Nope, you're not the last one; that would be me - thanks for such clear and easy to follow instructions!
What an genius idea, I can't believe it didn't dawn on me either. Thanks! I lost all templates when MT went berzerk recently too... this could be a savior.
Grin. It took me about a week to realise that editing templates on MT was a waste of time when I could just upload them, and it doubled as a handy backup. Everytime I prepare to make significant changes, I download a copy of my template directory, a copy of my stylesheets, and then store it up against the copy on a Zip disk which goes into a separate room from my main computer. (I'm paranoid, all right? :)) Then I upload the new templates, and rebuild. If I don't like it, or it goes beserk, I just upload the "last working config"... :-)
Yep, you saved my butt from wasting a lot of time. Been doing it exactly the way you WERE doing it until I read this.
Thanks.
I never thought of doing it that way. I have a php script that generates all the templates into one long txt file..
As for the configuration.txt and easier way is to pull up the screens, hit Print Screen and then Paste them into a Word document. You will get screen captures of your settings in the document. Its much quicker than typing it all out.
*smooch!*
you have so many great ideas. now if i can just remember to download them. to half a dozen places, since i never know which computer i'll have to reformat next. *grumble*
If you have shell access, an easier way to do this is to simply back up the directory you keep your db files in (if you're using MySQL, I'm not sure what the easiest way to do it is...)
There are many ways to do this... you can login to your server, use the tar command to create a compressed archive, then ftp it to a local disk (maybe even a CD ROM) or even use rsync to get incremental backups.
Merci encore pour ton aide précieuse!
I learn more on your site than on the mt-forum.. thank you!
I wish I had done that before I broke my blog! where are the templates located so I can get them thru ftp?
That would depend on the path you use for linking. Mine are stored in a "templates" folder.
ahh! I don't know what that posted twice! I didn't link them before it broke, am I hopeless?
Here: "and copying them all repeatedly because I never remembered which ones I had changed lately", you was talking about me!
Hugs,
Luis, from Brazil.
thanks for this tip! I got tired of copying and recopying my templates. I was wondering what that linking option was!