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


Click here to return to the 'An AppleScript for real time backups with Path Finder' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
An AppleScript for real time backups with Path Finder
Authored by: e:leaf on Apr 12, '06 11:51:15PM

I have found a way to do it via rsync (after a bit of time in the man pages of course).

Here we go . . .


on adding folder items to this_folder after receiving added_items
	try
		tell application "Path Finder"
			if exists "/Volumes/path/to/backup/volume" then
				do shell script "/usr/bin/rsync -a --delete --delete-after /path/to/source/directory/ /Volumes/path/to backup/directory"
			end if
		end tell
	end try
end adding folder items to

Using rsync actually synchronizes the source and backup folder (the destination folder will look exactly like the source folder after the script runs) rathr than simply copying files from one folder to the next. You can also set up rsync to do a backup of any files which are deleted from the destination folder in the event that you want to replace an older version of your file by using the '--backup' and '--backup-dir=/path/to/backup/folder' verbs.

Now none of us have an excuse to not have regularly backed up files (atleast the important ones).



[ Reply to This | # ]