Blogs - Web Technologies Blog

I was very lucky...

Written by Marco Conti Sunday, 09 November 2008 20:52

Share |
User Rating: / 0
PoorBest 

I want to open my new Web Dev blog with a post about backups and why I was so damn lucky.

I finally got around to launch a new version of my website. I worked at it for over 6 months and I was either never happy with it or I had something more pressing to do. My old website was about 2 1/2 years old and it no longer reflected neither current technologies or my personal abilities.

Finally, over the past weekend I decided to take the plunge and launch the site. It wasn't finished, but it was good enough for me.

Usually, when I make a site launch for a client I move like an old spinster. I very cautiously backup every file, I keep a log with notes on the move and only after I check things twice I finally make the move.

On my own site, of course, I was more cavalier and I paid the price.

First I created a folder in my public_html named "Old_site" where I planned to move the files from my old website and possibly link the DB again so I could refer to it as needed. Fortunately, I got a bit sidetracked for about 15 minutes before I gfot around to go back to moving the old files over and finally move my new website files from the "staging" folder where they resided.

That 15 minutes saved the day because once I moved the old files out of the way I selected muy new files and thanks to Cpanel's new drag and drop feature I simply dragged them over to public_html. Naturally, something went wrong and not all the files transferred. They looked OK, but many files had permissions set at 0000 and some files were missing outright.

More importantly, because I decided to move the files rather than copy them, my originals were gone and my latest backup was a few days old.

I tried to patch the files with a fresh Joomla installation, but that wasn't enough. My site is far too customized for that. I tried other tricks, including patching some of the code manually and gradually I started eliminating some of the errors until I got to the point where the site was showing up. Except for some of the content. No small problem.

At this point, just when I was going to give up, I remembered the "Daily backup" feature on some Cpanel, mine included and I went to download it.

At that point I hoped that I would be able to restore the site to a version from earlier that day. I would still lose a lot of content and some mods I had done, but the bulk of the site would have been there.

After the daily backup had downloaded, I went to check on the state of the file system and the first thing I noticed was the presence of the "Old_site" folder in the top level. My hearth sunk. I figured that the backup script had run right after I did the site move. However, when I looked into it, it was empty. Then I looked in the "staging" folder and all my files were there. Intact.

I extracted them, uploaded them again and sure enough, my site worked just like the last time I saw it in all its glory (so to speak).

What had happened? I was very, very lucky. I must have set the backup to run at midnight, and I must have created the "Old_site" folder right before midnight. Then, because I spaced and went to watch "Family guy" for a few minutes, the backup run in precisely that time frame, therefore saving all my hard work.

Naturally, I could have saved myself a lot of grief if instead of moving the files over I had simply copied them. Moreover, if I had used the same process I use for all my clients, I would have first downloaded a manual backup and then, copied the files over.

The moral of this story is: always use the safest route to deal with irreplaceable files and never take shortcuts. They will end up costing you a lot more.

Trackback(0)

TrackBack URI for this entry

Comments (0)

Subscribe to this comment's feed

Show/hide comments

Write comment

smaller | bigger

busy

10 Minute Joomla! Tips Blog

Conticreative joomla book reviews

Independent joomla hosting reviews

Joomla Training

Conticreative offers Individual and Corporate training (in person or online) on Joomla, Wordpress, Zen Cart and other leading Open Source scripts.

[Read More...]

Books

Books we suggest...

 

Spreadfirefox Affiliate Button
switch the positions on