Fog Creek Software
Discussion Board




Knowledge Base
Documentation
Terry's Tips
Darren's Tips

Recovering a website

I lost my cty file for one of my websites.  Yes, I know, I should have backed it up... it's a long story.  Anyway, now that my site is a CD site, how can I get the html files back into CityDesk so all of the fog file names remain the same?  Will I have to manually change something in Access or is it just not possible?

Chris Rickwood
Thursday, January 17, 2002

eek..

It depends on how bad you really don't want people to come to your site with broken links...

Its not easy since the numbers that appear in the fog urls are the autonumbers assigned to the article when its created in the database... ie. if you created your site in exactly the same steps and in the same order it would work... but you'd have to find all your fog urls and put them in order and then create those articles in that order (i think that would work but i'm not sure).. of course you could try a few and see if it works and then continue as long as it keeps working...

The other option is to publish all your articles to a new directory and then make redirects for all the old articles on your site... so if the old url was www.site.com/article/fog001.html then move the new articles to folder www.site.com/articlenew/fog00x.html and make the old fog001.html point to articlenew/fog00x.html

Michael H. Pryor
Thursday, January 17, 2002

Luckily the site is small http://www.rickwoodmusic.com so correcting the links won't be too hard.  Thanks.

Chris Rickwood
Thursday, January 17, 2002

Another way would be to pre-create your site with  folders and empty articles, then publish them in an new directory.

Use a script like:
{$foreach x in (all)$}
URL:  "{$x.link$}"
Filename:  {$x.filename$}

{$next$}

so the that you can figure out which URL goes with each file name.  (URL FOG00000000001 is "empty file #1)

Then match the empty article's URL with your old URL's and paste in the content.  Then move your articles in the folders where they belong.

I'm getting confused writing this but for a small site you could get all of your articles back into the correct URL.

TK
Thursday, January 17, 2002

Nice TK!  That would work perfect if you don't have too many folders (you'll have to adjust which folders they go into after you fill them with the content).

Michael H. Pryor
Thursday, January 17, 2002

Thanks TK... I'll try this tonight and report back the results.

Chris Rickwood
Thursday, January 17, 2002

*  Recent Topics

*  Fog Creek Home