Never been to TextSnippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world (or not, you can keep them private!)

Rsyncing to StrongSpace (See related posts)

This is a handy script to synchronize a number of folders with StrongSpace (or any other server).

#!/usr/bin/ruby

# `ss` is the alias for my StrongSpace login.
# `home/novemberborn/` is the directory in which I want to store stuff.
REMOTE = 'ss:/home/novemberborn/'

def rsync local_path, remote_dir
   puts `rsync -azv #{local_path} #{REMOTE}#{remote_dir}/`
   puts "\n---\n"
end

# rsync 'local_directory_path', 'remote_directory_name'
rsync '~/Documents/', 'Documents'

Comments on this post

robbevan posts on Oct 10, 2005 at 13:35
If you're moving to Strongpace from .Mac, here's a way of replicating Backup 3's 'Personal Data and Settings' plan, using the script above:

rsync '~/Library/Application\ Support/AddressBook', ''
rsync '~/Library/Application\ Support/iCal', ''
rsync '~/Library/Cookies', ''
rsync '~/Library/Keychains', ''
rsync '~/Library/Preferences', ''
rsync '~/Library/Safari', ''

You need to create an account or log in to post comments to this site.


Related Posts