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!
-Stephan
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:
---------------------------------------
set volumeName to "backup2" ---thats the backup-hd connected to the server ---
set serverAdresse to "192.168.220.46"
set userName to "username of my server"
set passwort to "servers pw"
try
do shell script "mkdir " & quoted form of ("/Volumes/" & volumeName)
end try
-- Server mount
try
do shell script "mount_afp " & quoted form of ("afp://" & userName & ":" & passwort & "@" & serverAdresse & "/" & volumeName & "/") & " " & quoted form of ("/Volumes/" & volumeName & "/")
on error errstr
--display dialog errstr
end try
-------------------------------------------
with timeout of 3600 seconds
do shell script "rsync -a /Users/stephan/Documents/ /Volumes/backup2/stephan/ || echo -n"
end timeout
-------------------------------------------
Thanks for looking at this!
-Stephan