Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

10.4: Create simple backups with SSH and Spotlight System 10.4
Tiger only hintThis only works in 10.4, and requires that you have adequate space on an accessible SSH-capable machine (Linux, Unix or OS X, maybe Windows if you know how to set up SSH on it ... but I don't).

This script will use passwordless ssh and Spotlight to create backups of your key files. There are several things done here that seem clunky, especially with Spotlight. There are some great metadata tags that would be useful -- except that I have seen states in my own system where metadata are not properly generated at file creation time. I therefore went with the most basic tags possible (the ones that will be created).

No ".*" files are backed up, by the way -- Spotlight does not index them, and they are not, therefore, noticed. For help with the passwordless ssh, see the following: [robg adds: I haven't tested this one. The script is well documented, so read the comments in there for the detailed how-to. Remember to make the script executable with chmod a+x script_name, too.]
    •    
  • Currently 1.50 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (2 votes cast)
 
[8,135 views]  

10.4: Create simple backups with SSH and Spotlight | 6 comments | Create New Account
Click here to return to the '10.4: Create simple backups with SSH and Spotlight' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.4: Create simple backups with SSH and Spotlight
Authored by: luhmann on Oct 26, '05 07:31:47AM
This discussion has very good instructions for passwordless login using SSH keychain. I'm wondering about this script. Will it perserve all the OSX recourse forks that often get lost on UNIX systems?

[ Reply to This | # ]
10.4: Create simple backups with SSH and Spotlight
Authored by: ekc on Oct 26, '05 07:53:59AM
Will it perserve all the OSX recourse forks that often get lost on UNIX systems?

As it stands, I don't think so. Down at the bottom of the script, you need to change the parts that read ...'scp "%s"... to ...'scp -E "%s"....

[ Reply to This | # ]

10.4: Create simple backups with SSH and Spotlight
Authored by: JAPrufrock on Oct 27, '05 08:06:29AM

That'll work if both ends are OS X. In my case, they aren't.

The intent of the script is to preserve data and documents and mp3s and photos and stuff on a daily basis with low load. Apps and such will break. Sorry. :) They're much more replacable anyway.



[ Reply to This | # ]
10.4: Create simple backups with SSH and Spotlight
Authored by: axafluff on Oct 26, '05 08:55:30AM

I use the line below for syncbackups to my MacMini miniserver over ssh. Rsync preserves resource forks as of Tiger with the -E option. Rsync also has lots of fine-tuning options, see man rsync. Additional directories can be added as needed and files can be excluded with various options. Perhaps the script solves some other problem that eluded me when I looked at it, but the below scripts serves my simple backup needs well and the rsync algorithm is old and proven. I also use exchanged public keys like above.

rsync -avuzE -e ssh ~/Documents/ username@$server_ip:Documents/

Hope it's useful for someone!



[ Reply to This | # ]
ALERT!
Authored by: JAPrufrock on Oct 27, '05 08:33:52AM

The version I posted got mangled by the submission system or something - lots of the slashes went away or were turned into colons.

robg will be updating soon, hopefully. If your version has the string

.split('n')

anywhere, it's not up to date. :)

Sorry about that.



[ Reply to This | # ]
No more ALERT
Authored by: JAPrufrock on Oct 27, '05 08:58:14AM

All better now.



[ Reply to This | # ]