August 26, 2008 ahydle

Solaris 10 SSH Migration

While migrating data between multiple servers I ran into a few interesting situations with SSH that I thought would be worth mentioning. If nothing else it will add some more documentation to this site.

Solaris tar vs. GNU tar

After using tar for years on Linux I always figured all tar’s were the same until I tried to untar an archive on Solaris. When I untar’ed a Linux tar archive on Solaris I ran into an error along with a @LongLink file in my directory. This was caused by incompatabilities between GNU tar and the default tar bundled in Solaris. Luckily, Sun thought of that and includes GNU tar with Solaris.

Here is a quick way to transfer file systems between two servers. In order to do this properly you may want to temporarily enable root in your sshd_config. Just thought it was handy 🙂

/usr/sfw/bin/gtar cf - ./dir1 | ssh root@fs0 "(cd /export/Corporate && /usr/sfw/bin/gtar xvpf -)"
, , , ,

Comments (6)

  1. Andrew

    I just double checked and you are right /usr/sfw/bin/gtart should work properly. Not sure why I did that.

  2. Andrew

    Good question. I actually dont remember why. I will double check when I get back from vaca.

  3. Andrew

    You are right, not sure why I used blastwave the first time through. I just updated the site. Thank You.

  4. Ben Audet

    On the source host, where you are executing the “tar” command, you should as well make sure you are running the GNU tar command, i.e.: /usr/sfw/bin/gtar . Thanks for sharing! 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *