Picture Backup with Rsync

July 30, 2006

snapshot6.pngUtilizing the Rsync setup I created earlier to backup the Documents folders of our laptops, I came up with a method to backup my newly organized picture collection.

The situation is as follows: My Ubuntu machine keeps the working copy of my photo collection and I would like to back up all the pictures as often as possible to the G3 PowerMac, which has an extra hard drive and is on all the time (its the webserver, printserver, MySQL server, etc).

To accomplish this, I set up passwordless authentication between these two machines, like in the other Rsync setup and then used this shell script on the Ubuntu box to get things moving:

#!/bin/sh
rsync -e “ssh” -rca –delete-after ~/PicasaDocuments/ username@192.168.1.x:/Volumes/back/pictureBackup -vv

/bin/date > ~/backup_script/log.txt

There’s not much difference between this and the previous shell script. This will build a list of the folders / files in the PicassaDocuments folder on my Ubuntu machine, and then match that list on the extra hard drive in the PowerMac (/Volumes/ is the location of all the mounted drives). the “–delete-after” means that if an item was deleted in the original folder, it will be deleted in the backed-up folder as well (not delete the originals after backing-up, like I feared it meant).

After this completes, it should write the date to log.txt in my home directory on the Ubuntu box.

Since both of these machines will be on most of the time, I decided to add this script to Cron to get it working every night. I used KCron (shown above), the KDE GUI to Crontab. Gnome has a Crontab editor too. I set it up to run this script every night at 11:15. After the initial backup of all the pictures, the process seems to run in 5 – 10 minutes. Its a bit taxing to the Ubuntu system, but it can handle it when nothing else is going on.

So with this system, I keep two copies of all my pictures on two different hard-drives. Not a bad deal.

Advertisements

Picasa on Linux

July 27, 2006

snapshot4.pngWell I finally got around to installing Picasa onto my Ubuntu box. Coming back from a 2 week vacation with a few hundred pictures got me interested in photo organization again. In my opinion, iPhoto is a dog. I wish this wasn’t true. I wish I could gloat over Windows users with the speed and ease of iPhoto, but I can’t. Each time I open that thing up I get frustrated. It organizes pictures in a convoluted date based system, it takes forever to start up, forever to scroll through pictures, and two forevers to do anything else.

I have avoided using iPhoto by trying out iView Media Pro for awhile. While it can organize photos in a much more systematic way, its still slow. Plus, every time I want to do something in that program, it takes me 30+ minutes to get it done. The UI is not very friendly to me, and options that I think should be obvious (like copying a picture to the desktop by dragging it there) aparently don’t exisit. Plus now that Microsoft has bought out iView, I don’t think this program is going to get any new exciting features any time soon.

And so I installed Picasa on Ubuntu. I found instructions which made the process trivial, so that was nice. I wish I could say that all my photo organization problems have been solved through Picasa, but alas, this is not the case. While I have seen Picasa work incredibly fast on very outdated Windows XP machines, on Linux on top of Wine, it remains sluggish and CPU intensive. However, this performance hit seemed to decrease after sitting there for awhile (I couldn’t tell you why). But while editing photos, I probably won’t be able to do much else. Picasa also seems to add extra folders to its viewer that it should be ignoring (the “originals” folders that appear after editing an image).

Even with the slowness, I think I will continue to use Picasa because its organization features are just that good. It takes the best of both worlds of sequential and event organization. The folders are arranged by date, and separated by year, but within this date system, you assign meaningful names to the folders. Plus all the image folders are stored at the same level. So instead of drilling down to specific days like you have to in iPhoto, i.e. 2006 >> 12 >> 25, you have folder names like “Christmas 06”. Plus you can tag your photos with keywords to help you find them later.

I know that iPhoto has some tagging features and the folder setup has gotten better, but it still doesn’t seem nearly as intuitive or easy to use as Picasa is. Plus, with 8,000+ photos, Picasa still moves faster than iPhoto on my iMac that has … 25 pictures.

Google: we’ll buy anything you want us to if you get a team of developers to make a Cocoa version of Picasa, I promise.

I also came up with a decent backup system and automatic-remote-picture-addition system that I will detail in the next few blogs.

Update: Aparently others have problems with iPhoto as well.  Not many solutions yet.


Gmail as a Recipe Organizer

July 26, 2006

logo1.pngMy wonderful wife (of 13 months and one day, today) has come up with the brilliant idea to use a Gmail account to save recipes she finds online.

She had been using Yum, but got frustrated with trying to format the recipe correctly and stopped using it. It would try to be smart and convert the ingredient measurements to standard abbreviations, but usually didn’t get it right, and just made more work for her.

Now with her Gmail Recipe Book, she can log in, copy and paste the recipe and send it to herself. Auto-magically she has the recipe saved for future cooking.

But with Gmails tagging system, she can organize her recipes into categories like ‘chicken’ or ‘beef’. Since you can add multiple tags to an email, she can put recipes into different sections.

In the future, she could create two tags: ‘eaten’ and ‘uneaten’ to further differentiate from those recipes she has tried, and those yet to come.

She also came up with a good rating system. After trying a recipe, she can reply to that recipe and input our thoughts in the reply. That way each time she looks at that recipe, she can see all the replies (reviews) that go with it. Perfect! And if she wants a visual cue to the ratings, we could always use one of the alt symbols: ◊,†,•,‡ etc.


Control Your Subversion: Tips for Setting up Subversion on the Mac

July 4, 2006

subversion_logo_hor-468x64.pngThis is just a little post to help me remember how I got this stuff working.

Subversion is a revision control system that is being developed to replace older similar systems. Revision control lets you update your projects in an iterative fashion and allows you to keep track of these changes. This is perfect for when you have a bunch of people working on the same thing and want an easy way that everyone can work on the same stuff without stepping on other peoples toes.

I have used version control systems on a Java application we developed as a team last semester, and I plan on using it soon to develop web applications, but it really could be used for almost anything: a big proposal, documents for a conference, anything that you might work on in a step-wise fashion.

Plus, it doesn’t have to be a group project to use Subversion. You can use it as an easy backup system so you can work on your stuff from any machine and use it in case you want to revert to an earlier version of something.

They have a free book about how to use / setup Subversion, and there is a lot of info out there on how to use it.

Client

If you have the server set up, using a client to check-in and check-out projects is easy. For Windows there is a client called tortoisesvn that comes highly recommended. I guess it integrates with Windows Explorer to make things easy. For Mac you can use a precompiled command-line version (this one is the most popular and put out by Martin Ott of SubEthaEdit fame) or search for a GUI version. My favorite so far has been ZigVersion. SvnX is also recommended, but froze up when trying to connect to my server (probably because I was initially typing the location wrong).

Server

This is the tricky part. The easiest way to install it on a Mac that I’ve found is using Darwinports and this tutorial. I followed it excatly without any issues. Darwinports is so handy, everyone should have it installed by now. Then I used this section of the book to add basic authentication to my Subversion repository.

New Repository
Now to add a new repository I simply use:

sudo mkdir reposName

sudo svnadmin create –fs-type fsfs reposName

make template and import

cd ~

mkdir svn-template

cd svn-template

mkdir trunk branches tags

Import your template directory into the “reposName” repository using

svn import .http://localhost/svnrepo/reposName -m “Initial import.”

And you should be ready to go. Here’s a list of commands from the book commonly used in messing with the repository:

 

  • Update your working copy

     

    • svn update
  • Make changes

     

    • svn add
    • svn delete
    • svn copy
    • svn move
  • Examine your changes

     

    • svn status
    • svn diff
    • svn revert
  • Merge others’ changes into your working copy

     

    • svn update
    • svn resolved
  • Commit your changes

     

    • svn commit

So that brings together most of what you would need to set up a Subversion server on a Mac, and mess with it. Hope this can help somebody