Hello,
Hopefully some one here will be able to help out as I’m pulling my hair out. I’m an Applescript novice at best.
I wrote the following script some years ago to do a very lo-tech backup system of files off our xserve to an external hard drive. It has worked fine for three years, but since upgrading the server software to 10.6 it has ceased to work, stopping with a time out error. “Backup” is the name of the external hard drive.
Any ideas? The first section (delete old folder) still works fine, it’s timing out after that, and never creates the new folder or does any copying.
Thanks so much in advance for any help you can give.
--Backup Script Version 3 30/6/08
set never_end to false
repeat until never_end is true
set time_now to time string of (current date)
if time_now contains "8:30:" and time_now contains "PM" then
--delete old folder
set backup_alias to "Backup:" as alias
tell application "Finder" to set full_list to get (name of folders of backup_alias)
repeat with i from 1 to number of items in full_list
if (item i of full_list as string) contains "backup" then
tell application "Finder" to move ("Backup:" & item i of full_list as alias) to trash
end if
end repeat
tell application "Finder" to empty trash
delay 1800
-- do backup
set new_folder to {"Backup "} & short date string of (current date) as string
tell application "Finder" to make new folder at "Backup:" with properties {name:new_folder}
set back_up to "Backup:" & new_folder as alias
with timeout of 36000 seconds
tell application "Finder" to copy folder "XServe:Server:Guidelines" to folder back_up
delay 300
tell application "Finder" to copy folder "XServe:Server:Admin" to folder back_up
delay 300
tell application "Finder" to copy folder "XServe:Server:Artwork" to folder back_up
delay 300
tell application "Finder" to copy folder "XServe:Server:Concept" to folder back_up
delay 300
end timeout
end if
delay 60
end repeat
Model: Xserve
Browser: Safari 533.19.4
Operating System: Mac OS X (10.6)