As an MVP for Publisher over some 5 years, it has never ceased to surprise me how many times I’ve read this question – “I lost my pub file (insert long story here), how do I get my web site back from the html files on the server?”
It’s obvious that a lesson in common sense (computing) is needed. So I’ll get on my soapbox before I delve into answering the particular question.
First, the maxim. “If the file is important to you, have more than one copy.”
Simple, seems common sense to me. After all, think of all the various things that are important to you. I bet you have some sort of protection for them.
Me personally, in all my years of computing I’ve lost 3 hard drives. Where they just go kaput. I’ve misplaced, deleted, or otherwise lost, a file I was working on more times then I know. Yet I’ve never “lost” a file. The worst case scenario is redoing some recent work in an older version of the file in question.
“If the file is important to you, have more than one copy.”
My computing workflow goes like this…
If the file is very important, I make a copy of it before I begin modifications to it. You can do this in various ways. What I do is open Windows Explorer and right click the file and select copy, then in the folder I want the copy of the file I right click and select paste. Sometimes I leave the file name as is, other times I may append the filename. For example – myprojectname_bku010106.pub . Where that would be the date I saved the file off before making a change to the original copy. Other times I may describe the change I’m going to make to the original copy – mycustomerfile_before I whacked half of it out.pub. But that’s how I do it, like I said there are different ways, like opening the file and then going to File, Save as, and simply saving off a copy that way. Though the difference in that is you’ll open up the copy version of the file, ready for editing. Where I prefer to use the copy version of the file as a “snapshot” of the file as of that moment and then go edit the original version of the file.
Doing this copying methodology serves three purposes, it provides an easy fallback if the changes I make turn out to be a big mistake (it’s usually easier to go back to the copy and start over then to back out significant changes to an original), it provides fallbacks if the original should become corrupted, it provides fallback files that I can burn off to CD and/or copy to a secondary hard disk. I use both additional hard drives and CD’s to archive files. I routinely copy them to another hard drive and then I occasionally do a larger backup to CD or DVD media. That way in a hard drive failure scenario my most recent files are recoverable from the separate hard drive, and older files are available on media.
If you need to, write “If the file is important to you, have more than one copy” on a post-it and affix it to your monitor.
As for implementing common sense computing in managing your Publisher web publication file I recommend the following…
First, decide what “minor change” and “significant change” mean to you.
Before making a significant modification to your web publication file make a copy of it as I covered above.
At the very least make a copy at random times. You’ll want to guard against file corruption of the web publication file.
Make your changes, publish the site, test it. Repeat if necessary.
Now once you have the site files, those html and image files, remember that those files are not important. Not at all. Why? Because the site is fully contained in the Publisher file. At any time you can publish again and replace those files. It is the .pub file, that web publication, that is important. Vital even. The irony is that your web host is backing up your site files every single day. Something you probably assume and take for granted because – it’s only common sense. Am I right 😉
So take advantage of that. When you are done with your pub file, copy it to your web host account. These days the standard web host provider offers more disk space on their account offerings then you could ever fill up. (if you’re using some freebie then perhaps not) So take advantage of that. Most web host have a file manager tool that you can quickly upload the file. Or you can use an http web folder or an ftp tool. Whatever works for you. Start by creating a new folder on your account, call it what you like, perhaps “bkup”. That host file manager is perfect for creating a new folder. Then use that folder to copy the pub file to for its safe keeping.
Of course once you do that the file is accessible by simply browsing to its URL, for example – www.mysite.com/mypubfile/mysite.pub
The likelihood of anybody ever knowing that address without you telling them is pretty much zero, and even if someone downloaded it, what purpose would it serve. But, if this is of concern to you then just simply restrict access to that folder. Most web hosts have a control panel that allows you to set and modify access permissions to the files and folders on the server for your account. Speak to your host support if you need assistance in removing anonymous access to your folder. Once done the result is that when addressing that folder you are required to explicitly enter login credentials.
Hopefully by this point you have been energized with common sense computing skills and you know you will never lose your Publisher wed publication and your web site, due to hard disk failure, file corruption, or other disaster. But, what if this common sense hits you to late. What if you’re the dude going “can I get my pub file back from the html files on the server?”
First, kick yourself repeatedly.
Next, accept the answer. Which is, No. But sorta Yes. Well No is the short answer. Yes is the long answer. Which do you prefer?
I thought so.
No, you can’t download all the site files, not just html files mind you, you need the image files too, and have them magically morph into a Publisher web publication .pub file.
But, if you have version 2002 or version 2003, and you are willing to suck it up and apply yourself, then you can recreate the web publication file. So ask yourself, how important to you is it? 😉
As of version 2002, Publisher will open a htm/html file. Which actually, technically, isn’t very useful since Publisher is not an html editor, nor a web design tool (i.e. FrontPage). However it’s handy in this situation. The kicker is, it’s only going to open one at a time.
Now is when your skills with the Ctrl + C (copy) and Ctrl + V (paste) keys comes into play.
How this works is that you open the index.htm (home page) file in Publisher (2002 or later) and then go to File, Save as, and save it as a .pub file. That gives you the new web publication file.
Insert new blank pages into the publication for how ever many web pages you have. Then there next to your publication you use a second instance of Publisher to open the next htm file. You copy everything on the page (either group, copy, or select all, or lasso, copy – whatever method you prefer) and you go over to the appropriate page in the new publication file and you do a paste. There you go. You repeat for each web page.
When you finally finish and have that recreated .pub file, then you will fully appreciate the time I took to write all this. At least I hope so 😉