August 2010 Archives

fair and balanced.

| 2 Comments
Reminded Luke that someone who didn't know us might suspect from his blog that we run an extremely unstable service!  That would be a travesty.  I suggested that he make a daily post: "nothing to report" or "doin' fine" or "10 days without a fatal accident" or something like that.

archaic unix lore.

| 1 Comment
So I've been working on stuff at home, and I want to backup stuff on a publicly accessible server.  Ordinarily, I use a tar pipe for the purpose:

$ ssh user@host "cd parentdir ; tar -cvf - sourcedir" | tar xvf -

Problem is, I'm trying to back up home directories, most of which are inaccessible to my user.  I can't log in as root, because I have root login via SSH disabled like a good sysadmin.  I might be able to use su, but I've never gotten that to work.  Sudo might as well not exist.  This is Solaris.

Normally, I ssh to the remote host and push the tar rather than pulling it, but the home machine is in NAT hell.  Setting up port forwarding sounds like work, and totally inelegant besides.   Luke suggested bouncing the tar through another machine, but yuck.  I mean, really.

Solution: make a fifo and use that.

On the source host:

# mkfifo /transfer
# chmod 666 /transfer
# cd /export ; tar cvf /transfer export

The tar process will begin, then pause while it waits for something to read from the fifo.  On the destination host:

$ ssh user@host cat /transfer | tar xvf -

Problem solved.  Don't forget, putting absolute paths in a tar can ruin your day.

About this Archive

This page is an archive of entries from August 2010 listed from newest to oldest.

March 2010 is the previous archive.

May 2011 is the next archive.

Find recent content on the main index or look in the archives to find all content.