How to backup your iPhoto pictures and videos to a NAS w/ rsync

This is how I backup my iPhoto stuff. I know that Apple has tools to do this, but I don’t use TimeMachine and keep most of my backups on my NAS.

I also keep my iPhoto Library on an external drive (to save space on my local SSD drive).

This is the simple script that I run in the Terminal:

#!/bin/bash
    if [ -d /Volumes/Monster/Private/iphoto_pictures ]; then
    if [ -f lock ]; then
exit 1
    fi
      touch lock
rsync -av /Volumes/Fujin/iPhoto\ Library.photolibrary/ /Volumes/Monster/Private/iphoto_pictures/iPhoto\ Library
   rm -rf lock
     fi;

What I’m doing here is first off, checking to see if the NAS is mounted. In my case, my mount name is “Monster” and the directory were I put my pictures is /Private/iphoto_pictures, so I check to see if the directory exists. If it does, I proceed to check if a lock exists. The reason I create a lock is so that I don’t have more than 1 backup job running at once. I keep this script running in my crontab, so that if the NAS is mounted and there is no lock, it will call rsync to copy all of the files in my iPhoto library into the one on the NAS.

I’ve had no issues with restoring so far – to restore, just need to rsync the other way.

Hope this helps.

Wait … before you move to Tomato from DD-WRT!

If you’re reading this, it’s probably too late. You’re probably already running into this issue:

401

and it’s probably driving you nuts!

If you haven’t done the move yet, good. Telnet into the router and run:

nvram get http_username

and

nvram get http_passwd

The way that Tomato and DD-WRT store passwords usernames and passwords is different – DD-WRT stores them encrypted whereas Tomato doesn’t, so with this, you can use it to log into Tomato after you’ve done the move. I call it a move and would hate to call it an upgrade, because some hardcore DD-WRT users might be offended.

Now, if you haven’t done this already and are seeing the error, this will be interesting. With the ASUS router, I think I was able to just do a 30-30-30 reset and it took care of it. Unfortunately with Shibby’s implementation of Tomato, they don’t implement the reset button, so you can press the reset button until you’re blue in the face and it won’t do a thing. On other routers, you may need to press the SES/AOSS button. On the Netgear Nighthawk, it’s the WIFI on/off button. You can hold it down and it will start a password-less telnet daemon at port 233 if held for 20+ seconds. So, when you’re booted into Tomato (the web login will still say DD-WRT) and you can’t log in, hold the button down for 20+ seconds and then go to the command prompt and run:

telnet <router IP> 223

There, you should be able to run the 2 ‘nvram get’ commands and use that info to log into the router and do a reset from there.

Hope this helps!

Why I choose TomatoUSB over DD-WRT

I recently bought a Netgear Nighthawk R7000 for my home router. I figured it would be a good time to get a new router, so I was debating between this on and the ASUS (RT-AC68U). I chose the Nighthawk purely based on price. It was 10% off at Target. 🙂 When I shop for a router, I normally try to get open-source. The reason for this is so that I can hack it as I enjoy doing things like that and I like to use features that are not designed the original product. Why companies build routers and put their own firmware on it is beside me. I really wonder why they don’t just use the open-source stuff since it’s so good. If you look at my blog, you’ll see that I have run DD-WRT on my older routers as well.

The reason I decided to go with Tomato instead of DD-WRT is because of a couple of features that I like in Tomato. The first feature is the QOS transfer rates.

Screen Shot 2014-06-11 at 10.59.05 PM

I haven’t found where I can easily do this in DD-WRT. The reason I like this feature is because I can instantly know who is using up my bandwidth.

Another feature I like that unfortunately does not work on this router yet is A feature where I could see all of the URLs that I’ve visited and searches that I’ve done. I hope that Shibby fixes this in the 121 build.

Screen Shot 2014-06-11 at 11.01.41 PM

These are the two major reasons why I decided to use Tomato over DD-WRT. I’ve also run into issues with using the wireless bridge feature in DD-WRT where Tomato worked very easily.

I would love for some DD-WRT hardcore fans to debate with me. I’ve used DD-WRT firmware for a long time and just switched to Tomato very recently. The main reason I switched to Tomato was back in the days when I had the ASUS RT-N16 router. DD-WRT had Wi-Fi that kept dropping off almost daily and I had to find something better and Tomato was the answer at the time.

Please post your comments! Thanks!

P.S. Here‘s a good link on how to set up DD-WRT with a VPN.

 

 

NFS is better than CIFS (at least for streaming video) or How and why to use NFS instead of CIFS on Mac OS X

For the longest time, I thought that my wifi connection was just too slow. Trying to play a movie with VLC player was just painful! I was trying to play movies and it would buffer for a long time and while it was playing, would stop for a little while, pixelate, and play again. I just finished gave up on it for a long time. I bought a new router, a Netgear Nighthawk 802.11ac router that was supposed to be much faster. Unfortunately I didn’t look at my MacBook Pro specs and see that my wireless on the laptop didn’t support 802.11ac! No problem though – still keeping the router. The range on the router is much better than my old Belkin Play N600.

Just for the heck of it yesterday I decided that maybe NFS would be better than CIFS. I worked at Sun Microsystems for 4 1/2 years. I should’ve known this!

I think I tried using NFS on Mac a while back and it didn’t work and I just gave up. The error I got was this one:

Screen Shot 2014-06-09 at 12.35.19 PM

 

I’m glad I revisited this. Because of this error, I just figured that Finder didn’t mount NFS. Since Mac OS X does include showmount however, I thought maybe it does it via command line.

Doing a quick google search, I found that to mount NFS, because Linux wants the server to use ports <1024 and Mac OS X wants >1024, you need to use the ” -o resvport” option when doing the mount via command line.

sudo mount -t nfs -o resvport 192.168.0.11:/home/Monster /s

You don’t need to do it that way. Finder works just just fine. All you need to do is on the server side, add insecure as an option into /etc/exports like this:

/home/Monster *(rw,sync,no_subtree_check,insecure)

Then in Finder, you can use the familiar  ⌘K and give

nfs://192.168.0.11/home/Monster

Then, your network share should be mounted and you should have access to it. That said, you now are subject to POSIX file permissions.

Hope this helps!

Does the nightlight bother you on the Prince Lionheart diaper wipe warmer?

First off, we love our Prince Lionheart diaper wipe warmer. A friend of ours convinced us to buy one when he said, “How would you like it if someone put a wet towel to your butt in the middle of the night when you’re half asleep?”. So, we got one. That said though, our little one sometimes does get unhappy when it’s not available – i.e. when changing her outside or at a restaurant or a friend’s house.

A couple of issues I have with it though is 1) there’s no adjustable temperature. The wipes feel like they get cold really fast (once you take it out), but it’s still much better than wipes that aren’t warmed at all. 2) The nightlight keeps me awake at night.

I don’t know how I could hack it to adjust the temperature, but if you want to remove the nightlight, I can show you how. Just don’t do it the way I did!

So here are the steps:

The warmer opens up with just 4 Phillips screws. 2 of which are under a couple of the pads that keep the warmer propped up. Just remove the pads and remove the screws as shown in the picture.

When it opens up, you’ll see that the warmer is built very simply. It’s just a styrofoam insulated box with a hot plate and the little LED nightlight!

To remove the nightlight, all you need to do is snip one of the wires going to the nightlight. Just don’t do it where I did! The idiot in me for some reason thought the shrink tubing was just used to connect a couple of wires. Well, it was. The problem was, that there was a diode or resistor or something (I never took any electronics classes, so I don’t know!) in there that I cut in half! Now, unless I ever replace that component, I will probably never have the light working again.

One drawback to turning the light off is that you don’t know when the warmer is turned on or off. Since there’s no off switch, I guess you can assume that it’s on when it’s plugged in. Otherwise, it works as designed.

Here are some other pictures of what the warmer looks like on the inside. Any questions?