Carl Hutzler's Blog

Photography, Technology Musings, and other Completely Random Thoughts. Hey, it's free.

Archive for the 'Tips' Category

OS X Time Machine: Serious Flaw

timemachine

I have been using Time Machine to backup my user folder on my laptop for the last 6 months or so. Time Machine runs hourly and backs up my laptop to a network server (similar to Time Capsule). All has been running well…or so I thought!

Turns out that my Desktop Folder had some funky permissions on it and Time Machine was not able to read from that folder…hence it did not backup that folder. There was no error provided in my menu bar nor in the Time Machine system preference. Perhaps there is some error log in the console somewhere that shows the issue, but nothing to tell the user who thinks everything is just fine. Of course until you want something from that folder and it is not backed-up!

I fixed the issue by fixing the file permissions on the Desktop folder. But my faith in Time Machine is gone. Just be aware. Maybe someone from Apple will read this.

No comments

Cool Stop Motion Movie

I found a great little stop motion movie that I first saw when DSLR camera’s came out and were becoming popular ways to shoot this type of movie. I lost track of it but heard the soundtrack on Radio Paradise this evening and Googled the song writer to find it again.

No comments

WordPress: Notification of a Response to your Comment

So you post something on your blog and someone comes along and comments. Sometimes the comment is just a “Thank you” or something. No big deal. But sometimes it is a comment asking for some follow-up info. I have always wanted to be able to answer the question in the comment area with another comment so that future visitors could see the response (and that I do respond). But I also need to respond to the original commenter via email as they will likely forget to check back most of the time.

Today I found a plugin for WordPress which accomplishes this fairly nicely called, Subscripe To Comments by Mark Jaquith. When someone is leaving a comment, they have the option of subscribing to that post such that any additional comments will be sent to their email…including my response of course. And they can go back in and manage their subscription to that post later if they do not want the updates any longer.

And an even nicer little twist is that the blog owner can see who is subscribed to commets and on what post by visiting the TOOLS section of their WordPress Blog and clicking on SUBSCRIPTIONS.

No comments

Firefox’s Form Autofill Issue

picture-1

When you go to web pages with forms, most modern web browsers will try and help you fill in the form by remembering what you typed into a form in the past. So if you start typing your name into a field that is depicted as a “name” field, then the browser will offer up suggestions as you type. This is a great thing.

But once upon a time I typo’d my email address in a form….instead of cdh@carlhutzler.com I entered cdh@carlhutzer.com. I don’t recall what form it was for, but I think I realized it when I never got email from that site. No big deal, I just re-did the form on that site and went along my way.

But what happened was that Firefox remembered my typo. So now when I fill in forms with email addresses, I would get two suggestions for my email address…one correct and one typo. Worse yet, the typo one was the first choice. This has stung me a few times when I was in a hurry so today I searched for the fix.

Turns out Firefox stores form suggestions in a file called formhistory.sqlite located in /Users/someuser/Library/Application Support/Firefox/Profiles/someprofile.default/formhistory.sqlite

I opened the file in a text editor initially just to see if I could find the typo and it was there. Before I made any changes, I made a copy of the file (for me it was a 700KB file…and not something I could afford to f-up). After making a copy, I tried to make the correction by changing the text to the correct spelling of my email address. I figured it would simply have two “Correct” spellings after that change. But the edit I did made the form file not work anymore. Thank god I made a backup.

So I went to versiontracker.com and looked for anything in the Mac OS X area that allowed browsing and editing of SQLITE database files. I found MesaSQLite. Once I downloaded the software (shareware), I was able to open the formhistory file (even double-click to open) and search for the typo email address. I played with the table and field search settings till I found which one had the data I needed:

table=moz_formhistory
value=<my typo'd email address>

I edited (in my case deleted) the record and COMMITed the change. Put the changed formhistory file in place of the old file and restarted Firefox.

No more typo!

12 comments

ReadyNAS Rsync Backup with Options

I am doing more backups for clients these days. One issue I ran into was that the ReadyNAS’s web user interface does not provide many options for how an rsync job runs. For example, while you can control whether or not files are deleted on the remote machine, you can not control most other standard options. I needed to specify two options:

1) I needed rsync to run on an alternate port so that I could map that port to the right backup readynas machine at my home office (I have more than one now). Without the ability to specify ports I had no way to target the correct readynas machine behind my office firewall. Well, there are ways, but VPN and SSH solutions were not exactly what I wanted. I just wanted to specify –port=XXXX

2) I needed to constrict how much bandwidth the rsync backups could use. This was mostly because my clients have slower internet connections than I do and if I let rsync just run, it would eat up all the upload bandwidth at my client’s location (if the job ran late). While there are some controls for this in the QOS settings in the router at my client’s location (running DD-WRT), I thought the rsync option would work just fine. I just needed to be able to specify –bwlimit=50

I looked around a lot for a solution but could not find one. I even called Netgear and their support team did a great job understanding the issue and thinking about solutions with me. But in the end they admited they had no Web UI solution and that getting access to the unix shell and setting up a job in CRON was the only solution. So I set up a job in CRON and it has been running for several weeks without issue. Basically it is just a small shell script with a bunch of rsync jobs that run daily.

But my shell script was just adequate. I am not a unix programmer so some of the more complex things I wanted from my backup job were not in my dinky script. I did have it email me when it was complete, but I never new if it completed properly unless I manually looked at the logs each day (which I didn’t). And I had nothing in my script to prevent another backup from starting even if the previous day’s backup was still running…a real possibility. From looking at the backup jobs built into the readynas, I could see how they provided these and other options, but I did not fully understand how to add them to my script so I didn’t.

Then today I happened to stumble upon Ian Macdonald’s post about how he added a little PERL code to the ReadyNAS’s backup script generator (it generates the shell script that actually performs the backup). This addition let’s you use the ReadyNAS web UI to create jobs as you normally would. But when the jobs are executed, his perl script additions do a lookup in an external file to see what options to apply! Bingo!!

http://www.readynas.com/forum/viewtopic.php?f=31&t=19857&p=118320&hilit=readynasexclude+rsync#p118320

His code was fairly simple. It looked for a config file called /frontview/conf/rsync.conf. In that file his perl code would look for a matching source or destination for the job in question and apply options. Simple enough. The only downside (minor) is that the TEST CONNECTION button in the web UI does not use these options. So for me, connecting on a different port, I could not use the test button. No biggee….this is just a small inconvenience.

Now I can create jobs in the web UI and be assured that jobs will only run one at a time and also provide emails with the logs when they complete. And I have full control over what rsync options I want the jobs to run with. Cool!

No comments

Google Apps: Lost Administrator Password

Google Apps

One of my clients forgot their password a few days ago for their email address which is hosted on Google Apps. It just so happens that this account was also the admin account for the entire domain!

On top of this issue, for some reason the “I forgot my password” link was just telling us to “check with your domain admin” for assistance. While I was pretty sure I had checked the box allowing us to reset the admin password by sending an email to a secondary email address, this was not showing up.

Read more

7 comments

How to tie your shoe laces

My buddy Theoretical Ken just posted what might be the most useful blog post I have ever come across! How to tie your shoes so they don’t come undone, YET are easy to undo when you want to take them off!

Yes, you can do a double knot, but that is a pain to get undone. This simple modification on how to tie your shoes is easy to teach to a kid (Jake got it the first time) and easy for them to undo too.

This will be very useful to me when I go running with gators on top of my boots/shoes. It is such a pain to have to re-tie laces when they are under a gator.

My life is now complete. Come get me lord ;-)

4 comments

iTunes Synchonization and Consolidation

A few weeks ago, I borrowed a robotic DVD/CD duplication machine (made by Primera Technologies) from one of my clients. As of the first of the year, Primera released some software that would allow the machine to be used for CD ripping (instead of burning). I thought this was great and I could finally rip the rest of my 4000 CDs into iTunes. Over a period of 2 weeks or so, I ripped everything at a fairly high bit rate. Great! I was almost done….well, not quite.

So over the years, my wife and I have purchased music online, ripped books on tape, and accumulated a fairly large library of music that was in addition to our tangible CD collection. So now that I had the CD’s ripped, I needed to combine the libraries somehow. I knew that some of the music in our current iTunes library had been ripped from our CD collection originally so I could not just combine them straight away. So what I had was a big mess of stuff which if I just consolidated them in iTunes, would result in many duplicate songs.

What I did was a multi-step process which I think could be streamlined if I had some more time and/or was a bit stronger in Unix. But here it is if it helps someone with the same issue. One note: I thought about trying to use iTunes and the library file structure for this, but I could not find a way to do it due to the issue I had on my hands. I was trying to stay away from duplicate songs which iTunes does a poor job of managing unless you are actively ripping a CD where itunes does warn you. Too bad they don’t have this for moving files around.

Read more

No comments

Tip for Cell Phone as Only Phone – Skype!

We got rid of our home phone (landline) about 4 years ago now. We just decided the cell phones were more convenient and if we applied the cost of the landline towards the cell phone bill, we could make everything work out.

Anyway, now that I am self-employed and doing some technical support for my clients, I find one issue with the cell phone. Several times a month I need to talk to a technical support, sales, or customer service department. This can use up cell minutes quickly as they are usually during prime time and usually last 30 or more minutes.

A neat solution to this issue is SKYPE. What I learned recently is that even without a SKYPE-OUT account, you can make FREE! 1-800 (or other toll free 1-888 or 1-877, etc) calls. I don’t know why this is, but it is free. Since most of these calls are toll free numbers, using SKYPE means I don’t have to worry about eating away my minutes.

I also have a “pay as you go” SKYPE-OUT account which I use to pay for non-toll free calls. Some tech support is not a free call and SKYPE-OUT is very inexpensive at 4 cents for the call connection and just 2 cents per minute. Compared to my overage per minute fee on my cell (likely around 35-40 cents/min), this is attractive.

Of course you can also just do SKYPE PRO and get unlimited calls and no connection fee per call for just $3 a month. That is likely a good choice. But for now, I am just experimenting with the pay as I go plan.

Lastly….I also have a Phone as a Modem (PAM) plan with Sprint for an extra $40 a month. I use it to get on the Internet whenever I need to. But I also find that it is a very good connection for doing SKYPE as well. Even an older 1xRTT connection is plenty fast enough for SKYPE which only needs about 3-4 KBps. So I sometimes even use that instead of my minutes. Someday they may make some sort of network device that has SKYPE for calls….someday. I wonder if the software engineers can ever figure out how to do it. Must be hard ;-)

3 comments

Traffic Shaping and Off-site Backups

Wanted to add one more thing to the story on how to do off-site backups using RSYNC. Once you get the set-up running you may find that some of your back-ups run into the day time hours. This can interfere with the speed of your Internet access as the back-up will typically use 99% of the uplink pipe at your house. (Don’t worry about your friend’s house as their download link will hardly be affected by the traffic since downlinks are usually 5-10x faster).

If you uplink is saturated with RSYNC traffic, it will be difficult to get your mail, browse the web or related things. I mean these things will still work, but they will have a lot of latency. Even if you are just trying to DOWNload a file, it will be slow as the file transfer does require a small amount of uplink capacity for ACKs and similar traffic.

So we need a way to allow the rest of the machines on the internal network to have full use of the uplink path while still allowing the RSYNC backups to happen. We could just constrict the RSYNC traffic to a small percentage of the uplink path but it is actually just as easy to dynamically allow other hosts to use what they need, when they need it. In this way the other hosts have a priority over the rsync traffic. So when the other hosts are idle, rsync goes as fast as it can. But when I want to do some work, rsync takes a back seat to my traffic.

Luckily doing this with a DD-WRT flashed router is fairly simply. You go into the NAT/QOS tab and the QOS sub-tab and do all the settings in that area. Basically you have to tell the router what your uplink and downlink speeds are in the first place….what does your broadband company cap you at. For me, it is 1.5Mbps (bits per second) uplink and I think 8Mbps downlink. Check here for your speed if you don’t know it. You will want to enter about 90-95% of the max numbers.

Anyway, after you program these figures (as Kbps so divide by 1000), you move on to the other areas. The first thing I did was configure a new protocol called RSYNC on TCP port 873. I prioritized this as BULK which is the lowest priority. Then I added in a number of common protocols we use in the house which are pre-configured in the DD-WRT software. I made all of these the highest priority which is EXEMPT. I went one step further and fully exempted the MAC Address of my primary work machine from all traffic shaping (just in case I forgot a specific protocol).

After hitting apply, any NEW TCP connections will have the traffic shaping applied to them. Be aware that if you are doing this WHILE an RSYNC backup is ongoing, the changes you make will NOT affect the current TCP connection.

Below is a graph which shows the RSYNC backup traffic running at a max of about 1.66 Mbps. The dips in traffic are due to an FTP upload that I started and stopped and started again. Basically the FTP gets priority over the rsync when it needs it.

graph of lan traffic shaping

Below are my configs in DD-WRT (click for larger)

DD-WRT traffic shape

No comments

Next Page »