Archive for the Techy Tidbits Category

Notice: this is NOT a high-security solution for database backup! Use at your own risk.

Verbose instructions, including a step-by-step example, are included in the zip file.

Download: techdonkeycom-database-backup.zip

———————————————-

This package will enable you to set yourself up a browser-visitable simple one-button backup of your MySQL database.

It was cobbled together by Elaine Miller from a few different scraps of GPL code, and specifically was constructed to have a bit of security on the index file while side-stepping the problems caused by .htaccess directory-level protection battling with the URL rewrite rules of the omnipresent Wordpress.

Users on a different architecture than my techdonkey.com clients may need to tweak their settings differently, and advanced users may wish to tweak even more. Have at it. If you make changes that are Very Useful To Others, please shoot ‘em back to me and I’ll incorporate ‘em in this package.

time: 5 min
geekiness level: minimal

——————————————————-

You’ll need these skills to start:

be able to edit a text file
be able to transfer files to your account, whether by FTP or SCP or Cpanel’s FileManager

——————————————————-

You’ll need this info before you start:

your database name
your database username
your database password
your account/site username

——————————————————-

Notice: this is NOT a high-security solution for database backup! Use at your own risk.

Verbose instructions, including a step-by-step example, are included in the zip file.

Download: techdonkeycom-database-backup.zip

Hullo, O Clients…

Within your CPanel is a nifty thing called Fantastico. Great name and all, but it should really be called something descriptive, like The Thingy That Installs Nifty Web Software For You (As Long As You Have An Available MySQL Database) And By The Way, It Also Monitors Whether The Installed Software Is Up To Date.

On second thought, Fantastico is not such a bad name.

Did you get an email saying you needed to upgrade? Fantastico! Here’s what you do!

If you are running a standard (no adaptations, mods, frills, and bells and whistles) version of the program in question, and know it, you can do the upgrade yourself by pushing the appropriate button. Go into Cpanel, Find the Fantastico button and click it. You’ll see a listing of fantastico-installed software, and a notification that one or more is out of date.

STOP! Is there a lot of custom work on your application? Jeepers, don’t push that button! Call your techdonkey.

If you’re sure  (sure, now) that you’re running a standard version, go ahead and… get back out of the Fantastico upgrade screen and into your backups screen. Make a backup and download it to your home ‘puter. Do it now.

Okay,  now go back and tell Fantastico to upgrade. You need a bit of room to do so.

Out of room? As a quick fix, throw out the contents of your tmp folder your the root directory IF you don’t care about reading your fascinating webstats.

Go back and check your application, whether Wordpress or phpBB or what have you.

Does it work? Hooray! In your root folder, you’ll find a folder named something like “fantastico backups”. It’s now safe to delete the *.tgz file within. Or download it to your home ‘puter and then delete it from the server, in case you’re paranoid about backups.

Have you done a backup lately? Have you?

A lot of nifty information over on the Wordpress site:

 http://codex.wordpress.org/WordPress_Backups#Backup_Resources

This post is a work-in-progress. Have a favourite that isn’t listed here? Shoot me an email below and tell me about it.

Online (no download, platform independent) Applications

GifWorks.
For GIFs, animated or no.
http://www.gifworks.com/image_editor.html

On Your Windows Computer

Image Resizer
http://www.microsoft.com/windowsxp/downloads/powertoys/xppowertoys.mspx

My friend asked me to explain, to explain in 5 minutes or less, the difference between some of the different image file formats! I’ll give it a shot, bare-naked, like.

There’s a crapload of different formats for pictures, and they all save the picture differently. There’s two main kinds, raster and vector.

VECTOR IMAGES

A simple vector image (illustrator, flash type images) contains instructions like this:
“make a point on this white background at co-ords. 10.6″ X 9.4″. inscribe a circle of exactly 4″ radius. Fill this circle with hot pink. Done.”

The more complex the shapes, the bigger the instructions get

RASTER IMAGES (jpeg, gif, tiff, png, bmp)

Imagine a sheet of graph paper.

Now imagine that there’s an image on this graph paper, with each little square being one square dot of colour.

Okay, so a TIFF file, which doesn’t lose quality, goes through the image, one pixel at a time, starting at top left and reading along the line to the right, describing the pixels’ colour one at a time. For every. single. pixel. (row 8763, column 64499, rgb values thus and so)

BMP files do something like the above, as well.

GIF files only describe 256 colours max, and they encode in a tighter way, perfect for line art and cartoons and logos. They describe lines. They say “start here and draw white until you get to this pixel, then draw pink until here, then draw red until here”
You can make gif files encode even less colours, down to 2. this makes ‘em smaller and smaller.

Jpegs encode in a good way for making small files — but bad for quality if you set the quality too low. So, a jpeg at 100% quality will be a large clear file, the same one at 75% quality will be good for web stuff, at 40% quality will look like michael jackson’s nose — all broke up.
It does this by sorta waving in the direction of the image and saying “Oh this section here is kinda greenish, and that one’s pretty blue, oh who cares, really.”

_____________________________________

totally apart from all this, the image size (5″ X 7″ or 8″ x 10″ or…), and the resolution (dpi/lpi… dots per inch or lines per inch) make a big difference to what the final file size is gonna be.

So. format, resolution, file size, image size, color values… all make a difference. Crazy, no?

Factoid: The lovely, enormous images we take with our digital cameras are too big for displaying on the web. Here’s a few reasons why:

(1) Because we can’t see better than 72 or 90 dpi on our screens anyhow.

(2) Even with North America’s huge number of users on highspeed internet, who wants to wait an interminable time for a huge image file to download and display? And if you’re on dial-up or one of the godzillion people in the world who don’t access the internet through a great big fat pipe with a reliable connection, well, your 2.3 MB pic and the Second Coming are gonna be kind of neck and neck, know’m’sayin’?

(3) Space on your home computer is cheap and plentiful. Space on your hosted domain on a server connected to the internet… now that’s a little more expensive.

So what do we do? We shrink our files!

Best bet for “here, lookit this photo I took” websize is
– under 800 pixels as the larger dimension
– under 80% quality for jpgs, and
– under 120KB in size
(of course this is just a guideline — you should try it a few different ways and decide what suits you best)

I’ve attached three pics to illustrate what I’m going on about here.

The first one (below) is a quite shrunken screenshot (a picture of what I’m looking at on my computer monitor) of what one uploaded file would look like, if viewed at 100% size. This is on my big display 19″ monitor at a high resolution. Someone viewing at a more common lower resolution, and smaller monitor size will see only a corner of this corner of the image. The original image is 2,287 kilobytes.

beanscreenshot1.jpg

The second image is a resize of the original 2.3 MB image, at a reasonable size for many webgraphics. It’s a jpg at 75% quality, and is just about 500 pixels wide. It takes up 45kb of disk space, or about 2% of the space that the original does. The red square in the corner shows how much of this image showed on my monitor in the screenshot above.

beans1.jpg

The third image is my ideal, as I cropped in to get a closer view of these rather pretty beans, and then reduced the image in size and saved at 75% quality as a jpeg. This image is 615 pixels wide, and takes up 85KB of disk space. It fits my guidelines for size, and still shows off the subject of the photo. (This works for both pinto beans and human beans.)

beans2.jpg

While we try to keep backups of all files on the server, you are ultimately responsible for the back-ups of your files. Back-up modules are accessible through your CPanel, so if you’re running live or interactive content you’ll be able to do up-to-the-minute back-ups.

Here’s how:

________________

All of your domain options are accessible through your CPanel at: http://YourDomainName.com/cpanel with your username and password.

(These would have been sent to you when your account was set up.)

This URL will also take you there directly:

http://64.15.137.185:2082

(To see documentation/info on CPanel and its myriad functions: log in here: http://64.15.137.185:2082/docs/cpanel/index.html )

Step One

Log in and find the icon for Backup. Click it.

(Here’s a screenshot — picture of the Cpanel interface you’ll first see when you log in.)
techdonkey-how-to-back-up-1.jpg

Step Two

Decide what you’d like to back up.

(Here’s another screenshot — a picture of the Cpanel interface for “backup”)

techdonkey-backup.gif

Home DirectoryThis would be your static html pages and various images, plus your folder structure and other files. Click, and save it to your home computer.
Download a MySQL Database Backup

If you have live content, such as blogs, forums, galleries, and such, you’re probably running it using a database. The database is important, because it will typically contain every bit of web-entered information, such as all your blog text, dates, and comments.

If you aren’t showing a database name here, you don’t have an active database, so you don’t need to worry about this.

If you have a database (or two or three) listed, click the name of each one that shows. Save the resulting file to your home computer.

Aliases and Filters

Save these (if they exist) to preserve your server-resident mail filters, and info such as forwarders.
Full backup (advanced):

Note: If you generate a full backup, the backup will by default be created in your root directory on the web server, thus doubling the amount of space your account takes up. If you don’t feel comfortable immediately downloading your back up to your home computer via FTP or the File Manager, and then deleting this file off the server, please don’t click this one! Full backups include your entire folder structure, databases and aliases, plus any email on your server, but not Mailman mailing lists.

A Final Note

Back up frequently if you have a lot of changes and live content, and less so if you just have a static site that doesn’t change from month to month.

If any of this little instruction blurb needs further explaining, please contact me and I’ll do my best to help you.

-Elaine Miller

Scenario: You have a document online, but the online source has vanished, whether by server crash or perhaps having a hacked website. If you’ve recently visited your site on your machine with your browser, you may have a copy of your images and pages still inside your computer, in an often-hidden folder called your browser cache.

Here’s how to find the cache folder: (For any computer running Windows XP)

For Internet Explorer:

C:\Documents and Settings\YOURLOGONNAME\Local Settings\Temporary Internet Files

replace YOURLOGONNAME with, well, your very own logon name, whether it be PeBbleS or Betty, or WILMA.

Almost every win-xp running computer will have this path to Internet Explorer’s cache.

For Firefox:

Firefox is a wee bit more complicated because the filenames have no extension. But here goes:
C:\Documents and Settings\YOURLOGONAME\Local Settings\Application Data\Mozilla\Firefox\Profiles

Inside this folder, there may be one or two (or more) profile folders. Click on anything that looks good to you, and then click again on the cache folder inside.

The files marked _CACHE_001_ and so on probably won’t be helpful.

But the rest of the files, all named in a kind of gobbldeygook, will be. Open a browser window right next to the window showing your files. Drag and drop the gobbledegook files one at a time into the browser window. Examine the contents. Rinse, repeat.

Advanced students can run a bulk rename function on the files, and give them all .jpg extensions, then view the window using thumbnails. This will highlight any images right away, and you can keep them or throw them out, depending on what you’re trying to retrieve. Then another bulk-rename run, and give all remaining files a .txt extension, and you’ll be able to open gobs of files simultaneously in your favourite text editor.
If you can’t see the folders, your system has hidden them from you. In any Explorer window, click Tools –> Folder Options –> View and make sure the button next to “Show hidden files and folders” is checked. While you’re at it, UNcheck “Hide extensions for known types” and “Hide protected operating system files”, just for kicks.

Happy Hunting!


http://www.archive.org/web/web.php

Place your desired domain name in the search box and click “Take Me Back!”

The dates that show up are linked to a cache of that domain at that particular time and space. (It’s always humbling to look back upon one’s early coding skills, for instance)

This’ll be very text-only unless the same images are still on the original server, but the archive can still be useful in retreiving something you thought lost!

Some folks have lost some data recently, and would like to get it back. There’s some small hope — Google.com will create a cached version of the various pages it visits, and you can often find your missing web pages here!

Step 1

Go to google.com, and in the search box, type the domain name or complete URL of the site you’d like, preceded by “site:” and click the search button. Like so:

find your google cache

If you’re feeling adventurous, you can add a search term to narrow your results.

Step 2

Google will return a list of all the pages it has spidered from your site. Scroll until you find your little lost page, post, or document, and click the word “cached” — do NOT click the regular link. That “Cached” link will take you to a copy of the text that’s been saved to Google’s machine, and you’ll be able to save that page to your own computer and do with it as you wish.

Step 3

Repeat for every page you’re missing.

NOTE: This won’t work well for private site areas, or for sites that have opted out of the Google spidering process. Your mileage may vary!

Bad Behavior has blocked 81 access attempts in the last 7 days.