WebDwarf Tutorials banner
WebDwarf logo
Backups -- Creating and Restoring

To be able to edit a project in future, you should backup the files used by your project. You can use a memory stick (USB drive), CD ROM, another drive, or some other process that does a whole drive copy. For this tutorial, we'll assume that you are copying to a memory stick.

The files required for backup are in two categories, project files and user files. In this tutorial, we will cover the following topics:

Introducing Amelia
Project files -- what they include
Reorganizing your external files
Save your project with relative paths
Project files -- backing up
User files -- what they include
User files -- backing up
Restoring project files
Restoring user files
Restoring image directories
Recovering the project file from your host
Recovering images from your host
What? You lost your project file???!!!



But first, who is Amelia?
For the purpose of this tutorial, Amelia is you, or more accurately your Windows user name. If your Windows user name really is Amelia, then this tutorial is written just for you! But if not, substitute your user name for "Amelia" whenever you see it.



Project files -- what they include

Each project is a file with a .ims extension. This is the really important file -- if you lose that you will have a difficult task to recreate your project. WebDwarf does an auto- backup, to both your local publish folder, and also to your site -- if you use WebDwarf to upload. But don't rely on that as your only backup.

There are also image files and other external files. Your project file does not actually contain the images or other files it needs; rather it just maintains links to the files wherever the are on your hard disk. The files remain unchanged on your hard disk in their original locations. These files are less important, because if you lose them from your local disk, you can recover most of them, with maybe some project reconstruction, from your site.

If the files are dotted all all over your disk, you make it difficult to make backups, unless you are doing a whole drive copy. For this reason, it makes good sense to keep all the files for a project in one folder, or a small group of folders.


Reorganizing your external files

During a project development, things can be chaotic with images dotted all over your hard disk. As part of a cleanup and publish, you can use WebDwarf itself to help you get everything into one folder or group of folders. The instructions here will give you a verified complete project that you can easily backup, and one that you can use on any other computer that has WebDwarf installed.

The steps we'll cover in this section are:


Save your project with relative paths

The default for new projects is absolute directory paths, which means you can freely move your project around on your local computer and it will always find your external files, since the project specifies the full path to each file. However, move the project file to another computer, and because the directory paths will likely be different, it won't find the external files. And the external files may be missing from the other computer anyway!

Relative paths are much less forgiving with regard to the current computer. Move a project out of its current folder, and because external file paths are specified relative to that folder, WebDwarf will not find the external files. However if you move the external files along with the .ims project file, keeping the same relative path between externals and project file, it will find them -- even if on another computer.

Use the main menu File > Save As, and select the radio button at the bottom (shown below) -- "Use Relative Directory Paths". If already selected, ignore the rest of this step -- you are already using relative paths.

You can either overwrite the existing project file, or save under a new name. Once you save the project file with absolute or relative directory paths, any future saves will save it the same way.


Location: Use Relative Directory Paths
Publish and make a copy of your local publish folder

Firstly, make sure your local publish directory is empty -- especially of old image files. Otherwise you can include those files needlessly as part of your final project.

Then publish all pages to your local publish directory using the gather option. This gathers all the external files into just a few folders -- image/ media/ etc. Of course, make sure there are no errors recorded in the export progress log.

If you have any code or external files that WebDwarf does not control, copy that into the correct folders too -- keep the structure of your local publish folder the same as your website.

Now copy your whole local publish directory to a new folder -- we'll call it "Final". As is your local publish directory, this folder is a backup of your site, so in the unlikely event that your host loses your site files, you could restore them from this backup, without republishing. You may wish to save this folder now as your site backup.


Delete the files you don't need

We want to save only only the files that allow us to easily reinstate and republish the project at a later date, perhaps on another computer. So let's start by deleting all the files we don't want -- those that WebDwarf will recreate when you republish:

From the Final folder delete:
This assumes that you are using the default publish file directory structure. If you have set something different, do the equivalent deletions, but from from your actual Final folder.


Modify the project so that it uses the copied images

From your Final folder, double-click your project file to open it in WebDwarf. Don't be alarmed when you see your images are missing -- that is just what you expect. If you see all your images still in place, then you haven't saved with relative file paths.

Then reset your image directories to point at the new image folder.


Find and add any missing files

You may not have captured all the images used by your project. If you have some images that WebDwarf has modified in some way, perhaps by resizing or re-coloring, and haven't used the original image for display anywhere -- those original images won't be in your image folder. Sorry, you'll have to manually locate those, and copy them to the image folder.

You may want to add the FTP.ini file to your Final folder too.


Final republish

Republish and note the export progress log. If any required files are missing, they will produce error messages in the log. You will then need to locate the missing files, copy them into your Final folder and make any corrections to the project.

Repeat this step until you have a full publish without errors.

Project files -- backing up
To back up your project files is just a matter of copying the .ims project file, and supporting external files to your memory stick. If you have followed the instructions above, they will all be in your Final folder.



User files -- what they include

As well as the project files, there are two user files that may be important depending on what you have done:

You should also save safely your passwords and login details for your sites (may already be included in ftppro.ini).



User files -- backing up

The user file is specific to each Windows user -- even if you have multiple projects, you need save it only once.

We have assumed a primary drive of C: -- if your drive is some other, substitute your drive letter. And substitute your Windows user name for "Amelia"

Your user file: ftppro.ini  will be here:
C:\Documents and Settings\Amelia\Application Data\Virtual Mechanics\Bin

Your spelling dictionary, userdic.tlx will be here
C:\Documents and Settings\Amelia\Application Data\Virtual Mechanics\Spelling

You can copy the files individually or you can take the simple approach and copy the whole Virtual Mechanics folder to your memory stick:
C:\Documents and Settings\Amelia\Application Data\Virtual Mechanics\
This approach copies 40K of files that you don't really need to back up, but it does catch your two user files.



Restoring project files

Copy your project file from your memory stick back to your disk. If you have done a final save with the relative option, you will not need the next step.

When you restore the project, depending on where the project and images were located originally, the images may not be visible on the first re-loading. You will need to place the images back in their original locations. For more details, see Restoring Image Directories.



Restoring user files

You will need to restore your user files only in the event of a hard disk disaster which has required a new hard disk or a reformat, or when running your project on another computer. In this case, you will have a fresh copy of WebDwarf, that will be using the default copies of the user files (mostly empty).

Shut down all copies of WebDwarf -- if you don't, you may find you can't update the user file. The exact steps you take here will depend on just how you saved your user file, but they just involve copying your saved user file over the existing user file.

If you saved the whole Virtual Mechanics folder, copy it back to here:
C:\Documents and Settings\Amelia\Application Data\Virtual Mechanics\

If instead, you saved the individual user files:

Copy the user file ftppro.ini to here:
C:\Documents and Settings\Amelia\Application Data\Virtual Mechanics\Bin

Copy your spelling dictionary, userdic.tlx to here:
C:\Documents and Settings\Amelia\Application Data\Virtual Mechanics\Spelling


Restoring image directories

If you move your project (.ims file) or your image files, WebDwarf may not find your images the next time you open the project. Exactly what happens can also depend on whether you saved your project with absolute or relative file paths. Instead of your picture, you will see a light grey placeholder that says "Image Not Found". This can also happen if you change the name of an image file or move or rename your image folders.

Example: image not found
This is an image of a missing image -- not an actual missing image!
The placeholder will tell you the location that WebDwarf expects to find the image. If the file path is abbreviated, as it will be in a small image, stretch the placeholder until you can read it all. Then use CTRL + Z to undo the stretch.

To correct the missing image problem, your best option is to move or copy the images back to the original location.

Another option is to re-import each image from the new location, and deleting the old. However, this is a laborious task.

(SiteSpinner has a "New Dir" function which allows you to change a whole directory of images at once.)
Recovering the project file from your host

WebDwarf makes an automatic backup of your .ims project file whenever it publishes. This file will at least be in your local publish folder, and if you used WebDwarf to upload your files, it should be on your site as well. Not all hosts accept .ims files, so there are no guarantees here.

To download your project file from your site, (assuming it is there) type an address like this into your browser address bar:  "http://www.MyDomain.com/MyProject.ims"
After you press "Go" near the address bar, or "Enter" from your keyboard, you will likely get a File Download dialog box asking whether you want to save or open the file. Proceed with the download, and open the file to confirm that the whole process has worked.

If you can access your site via separate FTP, you should also be able to download via that process.



Recovering images from your host

In most cases you can recover your images from your host too. If you can access your site via separate FTP, you should also be able to download via that process.

If not, most browsers allow you to save a web page complete with images. Here's one way you can do it with IE8:
In the collection of images you have downloaded, there will be many image names you recognize -- these will be your original source images, and you can reuse these in your recovered project.

To re-build your project, we suggest you proceed as detailed in Re-organize your external files -- allowing for the fact that your site has become your de-facto "local publish folder". And don't delete any WebDwarf created files -- you may need those later.

When you republish to test whether you have all the external files, you will of course publish to a new local publish directory -- not your website.

Towards the end of the process, you may find that you are still missing some original images. These are likely to be those that you have scaled or modified in some way with WebDwarf. If the original image is not directly displayed anywhere on your pages, then it will not be published to your site. Which means you can't recover it from your site.

However you can recover the modified image, and reuse that as if it was the original. To do this, look at the web page in your browser and right-click the image to see its properties -- which will include the file name, starting with "obj" or "geo". You may not already have that image, so right-click the image again and use File > Save Picture As, saving it to your "Final" image folder.

The next step is to rename the recovered image, to give it the same name as the original. If it has a different file extension to the original, let that stand. E.g, If your original was a MyImage.jpg but you now have a ObjSomething.png, set it to MyImage png. Then if necessary, import the new image via the Mona Lisa button.

Finally, open the Quick Editor > Object tab for the image and click the Reset button -- this will reset any transformations originally applied to that image. You have only a transformed version of that image now, so it follows that you don't need the transformations any more.

Recover the remaining images that you are missing, then republish to your local disk to confirm that there are no further missing files.


What? You lost your project file???!!!

Of course, this would never happen to you, but in case you have a friend with this problem, this is the advice you could give:

With no project file and no backups, you are in serious trouble. Fortunately you should still have the webpages on your site, or failing that, at least in your WebDwarf preview folder. You are in the same position as someone wanting to copy an existing web site, so the same methods will apply.

As you have access to the site, the first step is to open your favorite FTP program and capture everything you can from the site.

Existing webpages cannot be imported directly into WebDwarf. However, you can drag-and-drop the content of a webpage directly into a WebDwarf workpage. Do this:

Open the webpage in your browser.

Select the text you want and either drag it directly, or copy/paste it into the WebDwarf workpage.

For images, use copy/paste to place them into the workpage. If the image has no link associated with it, you can also drag the image onto your workpage. Or you may have images already as part of your site capture that you can add via the Mona Lisa button.

If the image has a link associated with it, drag the link from the image and place it over the image in the workpage.

If you want to import straight HTML, you can do that as a Code Object for code that needs to go in the body of the page. In WebDwarf, there is no easy way to add code to the header -- your best option is to add the code after you publish the page.

You can also add code to a link via the Code field in the Link Editors.

When you save your project, you will get messages like these below, one for each image you have added to your project. The images may be in your Internet temporary folder -- not a very permanent location. This option gives you the chance to save images to a permanent location that you can choose.
Imported image dialog
Normally, you will answer "Yes". However, if you answer "No", your project will continue to use the existing location --  rather risky if the internet, but probably not a concern for someone who operates without backups! If you answer "Cancel", WebDwarf will not save the new image in the project.

The remaining steps are the same as for any new project you are building from scratch. Wish your friend good luck!
< Tutorials Home
Virtual Mechanics Logo
WebDwarf
®

Tutorials
Page Editor Button