Frankie's Blog
    follow me on Twitter

    11.07.2009

    Finally managed to get the netbook onto my rsnapshot backup scheme. As I talked about in this post, there are issues trying to backup machines with rsnapshot that use WOL or are wireless netbooks that are sometimes on and sometimes not.

    So, I wrote a script that constantly polls for a machine and backs it up if it is one the network (detailed in the linked post above).

    But now... a new challenge. This netbook runs windows... and it is wireless so WOL is not really an option... AND.. it is XP home edition, so the samba sharing is not really what I would like. This means I need a rsync server on the windows netbook.

    Downloaded and installed cwrsync server. Read through the documentation and this by itself just looks like a gigantic security hole, especially for a travelling netbook. So, I also installed copssh, an ssh server for windows, and then did the following:

    Step 1: Install copssh and cwrsync server
    Step 2: Configure cwrsync to only allow hosts "127.0.0.1" which is localhost
    Step 3: Configure ssh keys for key based login
    Step 4: Change copssh to run on non-standard ssh port
    Step 5: Configure .ssh/config to specify the username and port to use when connecting
    Step 6: Modify the rsnapshot script I presented in the linked post to open up an ssh tunnel before running rsnapshot, and then to kill the tunnel afterwards
    Step 7: Create an rsnapshot configuration file but specify the host as "localhost" since the tunnel will provide the mechanism to the netbook

    Ultimately, this seems to work pretty nice. When I catch the netbook powered on and on the network, and it hasn't been backed up recently, I back it up through an encrypted ssh tunnel. The rsync is protected by the windows firewall and the host blocking line. The ssh server is protected by running on a non-standard port, by having the nonstandard port firewall entry in Windows restricted to the two hosts I might ssh from, and using key based login. Lastly, all the transmitted info is encrypted.

    For those interested, here is the mods to the previous script I presented:

    rsnapshot_wrapper_some_machine.csh:

    ... previous script stuff ...

    ping -qnc 1 some_machine > /dev/null
    if ($?) then
    # If it has been more than a couple of days, alert the admin
    if ( $time_since_last_success > $warn_secs ) then
    echo "some_machine failed. Consider manual run"
    echo "some_machine failed. Consider manual run" >>/var/log/rsnapshot
    else
    echo "some_machine not awake. Exiting..." >> /var/log/rsnapshot
    endif
    else
    echo "Found some_machine... Attempting backup..." >> /var/log/rsnapshot
    cd -

    # Kill any old zombie tunnels
    ps ax |grep "ssh" |grep "somehost |awk '{print $1}' |xargs -i kill {}

    # Establish the tunnel
    ssh -f -N -L 873:localhost:873 user@some_machine

    # Run the rsnapshot job
    rsnapshot -c /etc/rsnapshot.conf.some_machine $1

    # Kill the tunnel
    ps ax |grep "ssh" |grep "somehost" |awk '{print $1}' |xargs -i kill {}

    ... rest of script ...


    Seems to be working!

    Labels: , , ,

    5.31.2009

    Neo has been wanting a cell phone. Mom and Dad are not ready for him to be walking around with a cell phone just yet.

    But what is a geeky dad to do when he gets this sort of request? I decided to use a VoIP phone solution with a Gizmo account and a fun way to show when he had messages waiting. I wrote about my solution in this project page.

    Labels: , , ,

    11.02.2008

    well, managed to fix the kitchen faucet ($1.97 for o-rings) rather than buying a new one ($89.99). Scratch one item off the list. 934 left to go.

    Labels:

    6.02.2008

    Worked on trying to get a couple of my windows machines go to sleep when not being used and have the file server automatically wake them up when doing backups or virus scans. Hopefully this will save considerable power. Figured out how to get automount to work for the samba shares (mainly just setting up /etc/auto.misc). My only problem now is that my rsnapshot backup utility lets me run a script before running the entire backup, but not before each host. Changed my preexec script this morning to not only wake up the machines, but to also cd into the directories so that rsnapshot would see them as existing. Hopefully this will work better tonight.

    I'm also having problems with my Dell Dimension 9150 staying asleep. I guess I'll just have to keep fiddling with settings.

    Also, made my way into the garage for a bit to try and set up the old software for P.E.A.R.T. from long ago. Let's just say we weren't exactly creating a commecial software product!! After I get the software working, I still need to get a drum set, and a bunch of mic stands.

    Labels: , ,

    4.20.2008

    With the economic stimulus checks due to arrive soon, I thought I would just share some of my thoughts on how people might use the money.

    I know many people believe that this money is there money to begin with and can do anything they want with it. I just share these points because I believe they highlight areas where people can use the money and achieve some of the things that the money is meant to provide.

    I call this Frankie's Pledge. It is basically just a pledge to spend your economic stimulus money in one or more of the following ways:


    • Education/Self-employment (investing in yourself)

      This is never a bad investment, no matter whose money it is.

    • Paying down debt

      As Americans, we have learned to live well beyond our means. As I heard one blues singer put it, we are "Victims of Comfort". Paying down debt helps everyone.

    • Energy efficiency upgrades (home, car, office)

      We obviously can do more to help our economy (and our national security at the same time) by lessening our dependence on oil and non-renewable resources. Consider some of the many upgrades to your home to lower energy usage and utility bills.

    • Services or construction that utilizes local labor

      Utilizing local labor and resources, instead of buying a piece of electronics or a toy made in China, is obviously a much better way to invest in America and your community. Also, new additions such as new insulated windows, or more insulation in your attic, is a great way to use local resources, and lower energy use at the same time.

    • American charities

      Obviously another great use of the resources, especially if it contributes in some way to allowing more people to work, or more small businesses to function.


    Take the pledge. Don't go buy a new TV. Invest the money. Invest in your country.

    Labels: , , ,

    9.16.2007

    Got a few things done yesterday. Washed both of the cars. Cleaned my gun. Sprayed for bugs.

    We have a spider situation in our yard that is now a little out of control. It looks like spider-man lives in our backyard. I sprayed with 3 bottles of 50% Malathion. I think this will kill tons of bugs, but I don't think it will hurt the spiders at all. I confirmed that this morning... most spiders had completely rebuilt their webs somewhere else, and the huge banana spider up in the tree just went right back to her web.

    So, after some research this morning on pesticides that do kill spiders, I decided to buy some of this stuff. It is called "Demon WP" and it is one of the most common pesticides used by professional bug people. It is labeled "Professional Use Only" and is not sold in some states, which means... I'm excited. I bought a huge 1 pound jar of this stuff which makes about 50 gallons. I think I'm going to dress up like John Goodman (the exterminator in Arachnophobia) once I get this stuff in :)

    Labels: ,



    Archives

    Atom news feed RSS news feed


    Last Modified: 02.05.10    Powered by Blogger