Register Your Domains Hassle-Free
Showing posts with label Backing up. Show all posts
Showing posts with label Backing up. Show all posts

Monday, 21 April 2014

Keep a backup copy of complicated gadget settings

This article explains why it's a good idea to keep a backup copy of settings for your gadget, in particular for HTML/Javascript gadgets that have complicated, hard-to-regenerate, code.



Blogger's backup tools let you take copies of:
  • your post-contents and (separately) 
  • your template. 

Some 3rd party backup tools (eg HTTRack) let you make backup copies of how your blog looks - including the consequences of displaying your gadgets.

But as far as i know, there is no way that you can back up the settings (ie parameters or configuration) that are stored inside the widgets on your blog.

This can be a problem if you accidentally remove a gadget, or if you have an HTML gadget and get the code wrong in it: Blogger is quite unforgiving sometimes, and the HTML/Javascript gadget editor simply removes any code that it doesn't understand.

In some cases, this isn't not a big problem  eg if you show a picture as a gadget, then it's generally easy enough to work out characteristics that you would need to enter to re-create the gadget.

But if you lose a complex gadget (eg your own customised set of subscription buttons), then re-creating it could be difficult and time-consuming.

So - for HTML/Javascript gadgets which have code which you think is complex, I recommend keeping a backup copy of the gadget code somewhere.

Personally I usually put it in a post in a private blog where I draft posts and keep the documentation for each blog - but you could use a range of other places, eg a text file on your computer or on Google Drive, or even any email message to yourself.


How to back up code from HTML/Javascript gadgets in a private blog post

Every time you edit a gadget that you want to keep a backup for, then just before you click Save:
  • Press Ctrl/a to select all the text in the gadget window.
  • Press ctrl/C to copy it
  • Switch to use Blogger in a different window
  • Open up the documentation blog, and navigate to the post where you keep the code for that gadget
  • Edit that post - or make a new one if you don't have one already.
  • Make sure that you're in Compose view, and the Options > Compose Mode setting is on "show HTML literally" (ie not on "interpret HTML")
  • Paste the gadget code into the post, and publish it.

Although this sounds tedious, it's really very quick to do. And losing complicated gadget code, even once, is a good incentive to remember to back it up every time.

Hint: Put a comment to remind yourself where to back this gadget at the top and/or bottom of the gadget code. This reduces the chance that you will forget. A comment is done in HTML like this:
<!-- DON'T FORGET TO BACK UP THIS GADGET CODE  -->


How to back up complicated non-code gadgets

If your gadget has complicated settings which aren't code, one option is to take a screen-shot and save it to your photo collection, or even just a text-file or documentation-blog post where you keep notes about what the settings are.

You won't be able to automatically restore your gadget settings from this, but it should be a good reminder of what you need to do (provided you can find the picture when you need it).

Unfortunately there's no easy way to pack up linked-list or blogroll gadgets at the moment. However making a copy of your site using HTTracker will show you the list, and what the items link to.

Or you could build your linked list code manually (using the same trick that that I recommend for getting picture code) and put it into a HTML/Javascript gadget, which is based up as described above. The code for a handcrafted linked-list gadget looks like this:
<ul>
<li>PUT THE TEXT HERE FOR YOUR FIRST LINK TEXT.</li>
<li>PUT THE TEXT HERE FOR YOUR SECOND LINK TEXT.</li>
<li>PUT THE TEXT HERE FOR YOUR THIRD LINK TEXT.</li>
<li>etc</li>
</ul>



Related Articles:

How to add a picture as a gadget in Blogger

Using the post-editor to build HTML code for gadgets

Prepare your blog-posts in private, using a documentation blog

Monday, 29 March 2010

Creating a Shadow Blog

This article is about how to make a "shadow blog" - one that has the same structure as our real one, but less content, and which used only for testing.   

Overview

By Jérôme from Rouen, FRANCE
(5+6+7+8+9+10+11+12)
 [CC-BY-SA-2.0 (www.creativecommons.org/licenses/by-sa/2.0)],
via Wikimedia Commons
Sometimes, before you make a major change to a blog (or even a minor change to a popular one), you will want to test it before applying it to your blog.

You may even want to go one step further than getting your posts right before you publish them, and actually test the "look" of posts before you put them into your main blog.  (After you have got your post complete in your shadow-blog, you can copy the HTML from the shadow to the main blog, so that the formatting etc is all carried over:   See How to copy an individual post for details)


A shadow blog has is a place where you can do this.   It has
  • The same structure as your real one, and
  • Just enough content so that you can do some changes and test if they're working properly:  generally two or three more posts than the maximum you show on any on a screen is enough.

To make a shadow blog, you need to
  • Create a new, private, blog with the same base template as your existing blog
  • Copy your existing template into it, and 
  • Copy some of your existing posts into it.


Detailed Instructions:

1  Make a blog to work with:

Find out what template your existing blog is using

In your existing blog, download a copy of your template.   (See the first part of Editing your template, if you're unsure how to do this.)

Save the downloaded file somwhere (remember where, you'll need it below).

Go to the Dashboard, and click Create a Blog.  Give it a name and URL like "testing-YOURBLOGNAME"

When Blogger asks which template to use, choose your current template, (if it's on the list shown), or just any template.

After the blog has been created, press Start Blogging, and then go to the Settings / Basic tab:   Set "Add your blog to our listings?" and "Let search engines find your blog?" to No   (since this blog is just for your testing).

Go to Layout / Pick New Template   (or to Layout / Designer Template if your existing blog has a designer template), and choose the same template that your existing blog has.

Go to the Templates tab, and choose Backup/Restore.

Click Choose File, and navigate to the downloaded template that you made earlier.



2  Get some posts to test with:

Choose whether to import all your existing posts into the testing blog, or just copy some individual posts

Any links in your posts won't be re-directed, so when you are testing, you will find that clicking any internal links in your posts will take you back to your main blog. If you are moving all posts, you could avoid this by opening the export file with a text-editor, and doing a fine/replace to change the main blog's URL to the testing blog's URL in any links.



Related Articles: 




Import all your existing posts

Copy an individual post.

What template does your blog use?

Editing your template

Polish your posts before you publish them to the world