Applescript BACKUP-System with rsync

Discussion in 'Mac Programming' started by mjut, Oct 16, 2008.

  1. mjut macrumors newbie

    Oct 16, 2008
    Hi forum people,

    this is my first post. I am, unfortunately, not a programmer but got to the place were I have been able to set up a backup-system in our small network.

    It works absolutely fine - it connects to our server, mounts the backup-drive on the clients mac and does the syncing.

    But - if the Server is not running, the script makes a directory in the /Volumes/ folder on the clients mac! How can I tell the script to STOP the script and not copying files onto the harddisk?

    here is the script I am using:

    Thanks for looking at this!

  2. kpua macrumors 6502

    Jul 25, 2006
    Uh... delete this?

    do shell script "mkdir " & quoted form of ("/Volumes/" & volumeName)
    end try
    "mkdir" means "make directory"
  3. mjut thread starter macrumors newbie

    Oct 16, 2008
    Got it!

    that mkdr-thing is do make that script run-able for OS 10.4 - there were som issues with that.
    Now, i made a real simple version of that script:

    mount volume "afp://user-name:pass-word@ip-adress/backup2"
    with timeout of 3600 seconds
    	do shell script "rsync -a /Users/stephan/Documents/  /Volumes/backup2/stephan/ || echo -n"
    end timeout
    it works well with 10.5 and - guess what - in 10.4 as well!
    Thanks for the reply and sorry for bothering the forum with this. ;)

    Sometimes "just talking about it" helps!


Share This Page