Archive for the 'Tips' Category
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!!
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 commentsGoogle Apps: Lost Administrator Password

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.
3 commentsHow 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 commentsiTunes 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.
No commentsTip 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 commentsTraffic 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.
Below are my configs in DD-WRT (click for larger)
No commentsBluetooth Dial Up Modem (Phone as Modem) Problems Mac OS 10.5 Leopard
When I initially upgraded from 10.4 to 10.5 I had no trouble continuing to use my Motorola V3m (Sprint) as a modem via bluetooth. But due to a hardware failure on my old MacBook Pro, I had a different experience the second time around.
This time, I had a brand new machine. It shipped with 10.4 and an upgrade disk to take you to 10.5. I did the 10.5 upgrade as a fresh install and then used the Migration Assistant to move my user directory, applications, network settings, etc from my old drive.
All seemed fine until I tried to pair my Motorola V3m again and set up my Mac to use the phone as a modem. After pairing, I tried the connection and kept getting connected to Sprint but then immediately disconnected with an error. The messages in my console were similar to this:
pppd[681] MPPE required, but MS-CHAP[v2] auth not performed.
I scoured the web and found a few people having similar issues when the upgraded to 10.5. I also saw a number of people saying they were doing just fine. I tried a few changes that people suggested to this modem script and that, but nothing seemed to work. The curious thing for me was that I knew I had used my phone as a modem under 10.5 with my old machine…..hmmm.
So I plugged my old hard drive (from the old machine) into my Mac via USB and told the Mac to boot from this drive. Even though the operating system was technically for a previous version of HW (Core Duo instead of Core2 Duo and a different graphics card), the drive booted the new machine just fine. I tried the dial-up connection to my phone and it worked just fine! So under 10.5 (actually 10.5.1 in this case) the dial-up worked without a problem So just to be sure I wasn’t crazy, I took screen shots of the bluetooth networking set-up and I booted back on the laptop’s internal drive and again tested the dial-up and it failed with the MPPE error. I compared the settins to my old drive and they all looked identical. I even compared the modem scripts and they were the same. Hmmm.
So I decided to completely re-install Leopard on the internal HDD of my new MBP. Once it was installed, I did not migrate any data and instead tried the bluetooth pairing to the phone and the dial-up modem to Sprint. It worked! I migrated my user data again from my old HDD but this time I made sure I did NOT migrate my network preferences. This time I would only migrate my data and applications.
My bluetooth as modem continues to work reliably under 10.5. Although I have not extensively tested the issue further, I believe the Migration Assistant has a small bug where in if you migrate network settings, it will somehow make your bluetooth as modem not work 100% of the time. One way to maybe prove this is if you are having this MPEE error, try creating another user account and setting up bluetooth dial-up modem under that account. I bet it will work. Not sure how to fix your primary account other than starting over with 10.5 and being careful with the migration assistant. But perhaps someone smarter will figure that out.
1 commentPhotographer Ken Rockwell
I read Ken’s site regularly and list him on my blogroll. His site has an interesting collection of camera equipment reviews and tips along with his own exquisite style of very saturated, colorful images like this one he recently took in Yosemite. Click to see a larger version on his page.
What I like most about his site is that he regularly gives tips on how he made various images. He has taught me several tricks with my Nikon DSLRs and flash attachments. And in this shot below, he showed how useful a graduated neutral density filter can be (wish I had one along with an 77mm –> 82mm step-up ring).
For those who don’t know what I am talking about, this is a glass filter that attaches to the front of the lens and has a grey area which fades into a clear area. For this shot Ken likely put the grey area on top where the sky was very bright and was able to preserve some detail in the shady stream area at the bottom. Otherwise he would have had to exposure for either the sky or the stream and the other one would have been completely dark or way over exposed.
Another way Ken could have done this was to bring a tripod along and do both of the exposures - one for the sky and one for the stream - on two separate frames and then combined them in Photoshop using the HDR (High Dynamic Range) feature. But Ken even said in another gallery that he hates carrying tripods. I agree.
Check out his other recent work from California’s Eastern Sierra.
Rip DVDs to iTunes Automatically for iPod, AppleTV, iPhone
First things first!
This is a tutorial on how to rip DVDs you own and not how to steal movies!
That said, there is a legitimate need to be able to take DVDs you own and turn them into files that can be streamed/played, installed on your iPod or iPhone, or used with an AppleTV or other media device. This is a tutorial on how I do it for one of my clients along with a script I customized to make the whole process easy.
The set-up I have for one of my clients is a central Mac Mini server (headless - no keyboard/monitor/mouse) which we use for the iTunes server. It runs iTunes all the time and does not do much of anything else. We have a number of AppleTV’s on the network and each of them is paired with the iTunes library on the Mac Mini server. This set-up allows my client to play/stream any music or movies in the iTunes library on any AppleTV. This works well for their purposes.
The issue I needed to solve for my client was to make it easy to rip all of their media/content into iTunes. Automating the music ripping was easy as iTunes has built in preferences for automating the ripping of music. Just go to iTunes preferences and tell it to rip a music CD when one is inserted in the Mac Mini and when complete, eject it. Done.
But what about DVD movies? Read more
3 commentsAl Gore says “Buy these things”
(see down below for Al’s recommendations)
1. Rylan started buying compact florescent bulbs. We use them as the old tungsten bulbs burn out. They are really nice. The only downsides are that they take 20 seconds to “warm up” to their full brightness and I don’t think you can use them on dimmers.
And these downsides are not terrible. The warm up phase is nice when waking up the kids in the morning….its not immediately bright when you switch on the recessed lighting in their room. And the dimmer thing is no big deal. We just keep tungstens in the lights that we dim. They tend to be lights we use less frequently anyway.
2. We don’t have any outdoor lights to speak of.
3. I have a heat pump and everything I understand says that a programmable thermostat is not recommended for a heat pump system.
4. I changed my furnace (blower) air filter from one of those electrostatic ones to just a huge filter (20 x 24 x 4″). Not only does it last for a whole year! but it also is more efficient from an air flow perspective. If you have one of those electrostatic air filters, you might look into it.
5. I guess I should get a blanket for my hot water heater. Home Depot, here we come :-)
No comments


