RSync Files to a Unix/BSD Backup Device from your Mac Laptop

My photo-taking workflow while on vacation usually involves taking a lot of photos daily, dumping them to a laptop, processing, then backing them up once I have returned home.
Previously, I accomplished this manually using BeyondCompare for Windows, as that would run on Windows Home Server.
Since moving to ZFS-based storage, however, this is no longer an option as BeyondCompare only has a Linux client (nothing for Unix/BSD).
There are other ways to get around this:

  • SSHFS and Meld – Complicated, somewhat bloated, but great BeyondCompare alternative
  • *Commander Utilities – Midnight Commander derivatives can accomplish similar tasks using the ctrl+x,d shortcut
  • Rsync – typically installed by default, easy to script

I chose Rsync as I wanted something more automated, but I do find myself using Midnight Commander from time-to-time to simply “get things done” when syncing files other than my images.

Here’s how I did it:

rsync -a -e ssh /volumes/PICTURES/ 'username@mymac:/Volumes/BIGRAID/'

Let’s break this down into smaller pieces:

rsync – this is the command that will do our heavy lifting and file comparison

-a – archive mode

-e – specify an RSH replacement

ssh  – use SSH

/volumes/PICTURES/ – this specifies the “Volumes” folder on my Mac, and the “PICTURES” drive within it. Replace this with the location of your items to backup

 – note the use of single quotes here. We’re using these in case there are spaces in the folder names, and we could have done the same above.

username@mymac – We’re logging on to the host “mymac” with the username “username”. You’ll probably want to change these. I use a hostname here, but you could just as easily use an IP address if you use static IP addresses.

:/volumes/BIGRAID/ – the colon denotes a subfolder on the server we are backing up to, and /volumes/BIGRAID in this case refers to a ZFS pool called “BIGRAID”.

Do you have a similar backup strategy for BSD/Unix targets that you would like to share?

Copy Files From a Mac to Windows Using SCP

Whenever you start adding funny-flavored operating systems to a network, you eventually run into filesharing problems. Even if you only have a few machines, coming to a consensus on how to get files from point A to B can be quite taxing – especially if there’s work to be done.

Over the years I’ve tried FTP, Samba, NFS and a host of others. When configured well they work like a charm. However, when a new node joins the network (that shiny new Mac Pro of yours), things need to be reconfigured and can generally be a royal pain that´s why i always chose the best web hosting.

That has changed, though. We now have an acceptable solution that is free, easy to use and above all, secure. Introducing… SCP.

SCP has been around for a while now, and is gaining quite a bit of traction in the hosting world where it is (albeit slowly) starting to replace FTP for upload and download tasks. SCP stand for Secure Copy (CP being Copy on *nix variants). SCP works a lot like FTP in that you require an address to connect to, a username (login) and a password (we won’t get into stored keys today).

Now that we’ve decided what to try in our ad hoc network, how do we set it up? If you’re blessed with any variant of Linux or Unix, the work has been done for you already – the tools come with the operating system, and are generally found under the network tools in your fancy menus.

Fugu on OS X Server

It’s a different story on Apple Macs and PCs, though. For example, Tiger comes with an SCP server, but no client. Right, about the Mac server. In order to activate it in Panther, Tiger and even Leopard, head on over to the System Preferences pane, and choose the Sharing applet (the folder with the caution sign on it). Once it has opened, check the Remote Login checkbox. This will enable SSH, and in turn, SCP. We’re halfway there. You can connect to an SCP server by using the Terminal on a Mac, but from what I can tell most Mac users are frightfully scared of it. But that gives me the oppurtunity to tell you about one of my favorite applications – Fugu (japanese for blowfish – and sporting a suitably cute icon to boot). Fugu allows you to connect to an SCP server to both download and upload files. Fugu is quite easy to use, so we won’t get into that, but will save it for another time if need be (just like stored keys). Oh, and as the screenshot shows you, it works with Mac OS X Server 10.4.7 too! (as well as Leopard)

WinSCP Screenshot

In the PC world, WinSCP is Fugu’s sibling. You get an extremly easy to use interface, complete with drag and drop. Installation is a breeze, and best of all it’s free as in both beer and speech. Just like those soapbox ramblers. Getting a Windows SCP server is a bit more difficult, but currently exists in the form of BitVise WinSSHD. WinSSHD is slightly complicated, but most of the configuration is done during the installation procedure. They supply you with the needed variables, and one you have finished you will have set up an account you can use to test from your other workstations. The screenshot above was taken with the wonderful WinSnap – it comes highly recommended.
Let the cross-platform filesharing begin!

If you have any questions, or would like to suggest a topic for a future article, head on over to the blandname contact page and we’ll see what we can do!

Oh, and by the way, since you’ve noticed I always talk about virtualization, this certainly applies to getting files to and fro from your virtual machines in VMWare Server, Virtual Server (Virtual PC if need be) and Parallels – I have even found it to be faster than any other technique!

6 Things You’ll Love About Longhorn

Forget Windows Vista.

The real new, exciting operating system from Microsoft is on it’s way and is supposedly slated for January.

Here’s a shortlist of reasons why you should care and what to look for:

LLMNR – Have you ever had master WINS browser woes? Name resolution problems? Microsoft wants to make this a thing of the past. In my experience this has been one of the largest pains – when the master browser goes down you lose name resolution. LLMNR fixes that. I’m happy. Testing the current Windows Server Codename Longhorn on virtual networks has shown so far that it works as expected already. I’m still happy. Basically this is multicast DNS (mDNS). Follow the link for a nice wiki article that will surely convince you.

Core Server Mode – Longhorn has a new locked down mode meant for bare-bones brass tax servers. They call it Core. What this means to the regular Windows admin is that there are no more wizards. Heck, there’s no more standard graphical UI. You get a command-line shell (DON’T call this DOS, they’ll find you!) to play around with. Servers are configured via preconfiguration scripts, this shell, and remote administration tools. If this is as fast and secure as it is supposed to be, it’ll be gravy. What you DO get: DHCP server, DNS server, file server, active directory, read-only domain controller, cluster services, load balancing, and services for Unix. That’s right, services for Unix is there too.

Windows Server Core

Application Publishing – I covered application publishing in Longhorn previously, and it’s what I am most excited about, to be honest. Pick an application, fire up the wizard, make an RDP file and send away to clients (even older XP terminals) – it’s that easy. While this will take the bread out of a lot of app vendors hands, it also allows for a wealth of innovation and I simply can’t wait to see what happens here.

Remote Desktop Connection 6.0 – In the same vein, and under the Terminal Server umbrella, the Remote Desktop Connection client gets an update that adds some much-needed and oft-asked-for features. Namely: PnP redirection for media players and digicams, multiple monitor support (I’m talking to you, Bill), desktop theming, and single sign-on. Whew. I’ll have to get into this one later.

Sharepoint V3 – It’s bigger, badder, and better code for Sharepoint. Better integration with Office 2007, faster load times, more features (of course), and item-level access control. Not to mention RSS by default – that’s was the deal-closer for me. Nor more need for infinite emails sent via alerts – just use RSS! Much like Apple, Microsoft has become a fan of RSS and it’s good news all around.

IIS 7 – You’re laughing. I see you snickering. Yes IIS is used externally, and its market share is growing right now, funnily enough. In IIS 7.0 you get reduced attack surface through feature modules. This is marketing-speak that means you can disable IIS services you don’t need. You get easy replication using web configuration files. And lastly you get better admin tools. Well slightly better anyway. This isn’t Plesk, Ensim or CPanel, but it’ll have to do ’til those guys get around to supporting Longhorn.

That about sums up the good things I’ve seen and tested to date on my virtual machines (VMWare Server, Virtual Server R2 and Parallels). Feel free to chime in about what tickles your fancy or rattles your chains, I’m all ears.

Poll Results in: Ubuntu for the win!

Though we are just a small site at this point in time, we’re sure to grow and need to know and what direction. So we decided to run a poll for a few weeks to see what was garnering more interest from blandname readers.

The results are now in and it looks like Ubuntu is the current topic of choice, with Mac OS X 10.5 Leopard coming in behind.

Ubuntu Wins

It seems some of you have a good sense of humour because you added Windows Me. Some good suggestions were found in the addition of CentOS which we are currently writing an article for, and Gentoo linux, one of favorite operating systems to play around with.

In the coming months, we’ll try to touch on all of these topics, focusing more attention on the winner of course.

Feel free to leave suggestions for future polls or other topics you’d like us to cover – we’re here to help.

Parallels for Mac to support Vista and Leopard

I’ve been using Parallels Workstation on my beefy Windows test host alongside VMWare Server and Windows Virtual Server. Parallels, though a relatively new piece of software, is remarkably good.

Recently I received an email about the new Apple Mac version which adds a lot of features that have me very excited. I have been debating a MacBook Pro purchase, and this announcement just may be the tipping point.

So let’s hear them out on this spam, and have a look at why I’m so excited.

Big features to mention:

  • Support for new quad-processor Mac Pro towers outfitted with up to 3.5GB of RAM
  • This addition means that Parallels Desktop for Mac is now compatible with all Intel-powered Apple computers, which in addition to the Mac Pro includes the MacBook, MacBook Pro, iMac, and Mac Mini!
  • Compatibility with developer build of Mac OS X 10.5, code-named “Leopard”
  • Experimental support for Windows Vista

Bugs Fixed:

  • Solaris guest OS no longer hangs after suspend/resume
  • An improved Parallels Tools package
  • Full support for OpenBSD 3.8 as a guest operating system
  • G4U hard disk cloning tool now works in virtual machines

The new Parallels release candidate adds many exciting features including (but not limited to):

  • USB improvements — easily use multi interfaced and isochronous USB devices (including Windows Mobile 2005 and webcams)
  • Mac OS X performance improvements — optimize Mac OS X or guest OS performance by switching off the Mac cache function
  • Graphic performance improvements — enjoy faster, smoother video playback
  • Keyboard support improvements — use all of the keys on your Mac keyboard, such as the eject CD button, right-left and Shift/Ctrl/Alt (option)/Windows keys, in any virtual machine
  • Unicode path support improvements — name files and paths in national languages
  • Shared folders performance improvements — open folders and files faster, and transfer data across OSes with almost zero lag

read more at www.badcreditmobiles.net

Make A Solaris 10 DVD Image On Windows

Firstly, grab all of the image files from Sun

You’ll need a Sun ID, and you don’t need to use the Java download helper, but if you’re on a slow connection it will certainly help (if anything, it helps by queuing your downloads).

Once all of the files have been downloaded, you will need to extract them. I use WinRAR to do this, but the choice is yours.

Navigate to the folder you have downloaded the files to. Select all of the files, either by dragging a selection box, or by ctrl-clicking, or shift-clicking. Right-click, then click on “extract files here”. Wait a while (this is a full DVD image).

Once this process has completed we will need to concatenate the files together.

The next step is not required, but I find it will help with everyday computing as well so I have included it.

You’ll need to somehow run a command in the folder that you have all of the Solaris files in. I use the Microsoft PowerToy to do that. Download and install it.

(Or you can use many other ways to do the same thing if you wish – the choice is yours)

Then find the folder you have downloaded the files to and right-click it. You will be offered the option to “Run Program” from the context menu. Click that button and paste the following into the resulting window.

copy /b
"sol-10-u1-ga-x86-dvd-iso-a"
+"sol-10-u1-ga-x86-dvd-iso-b"
+"sol-10-u1-ga-x86-dvd-iso-c"
+"sol-10-u1-ga-x86-dvd-iso-d"
+"sol-10-u1-ga-x86-dvd-iso-e"
sol-10-GA-x86-dvd.iso

you’ll see (if your files are on the drive “D” and you use Windows XP):

Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
D:\sol-10-u1-ga-x86-dvd-iso-a
D:\sol-10-u1-ga-x86-dvd-iso-b
D:\sol-10-u1-ga-x86-dvd-iso-c
D:\sol-10-u1-ga-x86-dvd-iso-d
D:\sol-10-u1-ga-x86-dvd-iso-e
1 file(s) copied.

Voila! You can now burn the image using free software like IMGBurn, or commercial such as Nero, Roxio EasyCD, or Cheetah.

Dreamhost Stats Rewriting and Typo with .htaccess

If you run Ruby on Rails apps, or a Typo installation on Dreamhost, you may have noticed that you cannot access your stats page. Here’s the code that will get it running, quick and dirty, and have you poring over stats for HOURS!

You’ll want to login to your server using SSH, then edit the .htaccess file in your public folder, from within your home directory. Here’s how I did it as an example:

# pico /ruby.doesrails.com/public/.htacess

Cut and paste the following code:

# This is the stats rewrite rule for use with Dreamhost

RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} ^/stats/(.*)$ [OR]
RewriteCond %{REQUEST_URI} ^/failed_auth.html$
RewriteRule ^.*$ - [L]

(select the code, use CTRL+C on windows, or APPLE+C on a Mac, then to paste use SHIFT+INSERT on most SSH clients, or simply right-click and select paste from the menu)

You can put this anywhere in the .htacess file and it should work, as long as it is after the

RewriteEngine On

rule that already exists.