Showing posts with label backup. Show all posts
Showing posts with label backup. Show all posts

Sunday, April 25, 2010

Wordcount Widget!

Note the awesome wordcount widget I added to the right sidebar. This widget is awesome because it AUTOMATICALLY tracks the wordcount on my latest work-in-progress, no manual updating needed.

For those who are interested in the technical side of it, here's how it works:

1. My computer automatically backs up all my files to a remote server every night.
2. Since I use OpenOffice, the document in question is in .odt format. I discovered that a nice feature of this format is that the word count of the document is availabe in the raw document code (search for "meta:word-count").
3. The image you see is actually a PHP script on the same remote server. When viewed in a browser, the script extracts the wordcount directly from the document and generates the image on the fly.

Result:

Wednesday, August 12, 2009

Stupid, but we have backups now!

This time, it wasn't me, thank goodness:

DELETE FROM site_page_content WHERE site_id - 1450;

Whoops! Is that a minus sign or an equal sign near the end? Equal sign--just the one site gets deleted. Minus sign...every single website gets deleted (2,500 of them!) except, ironically, the one site that was supposed to be deleted.

Fortunately, because I accidentally deleted the entire user table discovered the backups weren't working just a couple weeks ago, the backups were fixed and working and we were able to restore all the websites in five minutes. A disaster of epic proportions was averted. Funny how things work out like that.

Apparently the bigger problem is that we are a little too quick on the draw when it comes to making changes on the production server. With only two programmers, though, it's hard to rationalize going to the time and effort of setting up a "system," although it would seem that we're rapidly getting to the point where NOT setting up a system is costing us more time and effort.

Wednesday, July 29, 2009

Stupid

Stupid.

Stupid, stupid, stupid.

"TRUNCATE TABLE users"

Stupid, stupid, stupid.

What's more stupid is that our backups have apparently been broken and not backing up for the last month. At least I can't take credit for that.