MacAddict Backup Script

Joined
May 12, 2005
Messages
555
Reaction score
8
Points
18
Location
Ridgecrest, CA
Your Mac's Specs
rMBP (Mid-2015), 2.8 Ghz i7, 16GB DDR3, AMD M370X Gfx, 1 TB SSD
In the August 2005 issue of MacAddict Magazine, on page 60, they have a walk-through of a backup script. I adapted this program to backup my "Users" folder as most of my data is stored there. The program runs fine, and is backing up my data as I type this.

However, I was wondering how to adapt the script to backup my entire internal hard drive to the external in case the worst happens... What UNIX path should I enter in the script to backup my entire hard drive? Are there any other issues I will have to work around? (such as program permissions, etc.)

Is anybody else here familiar with the script I am referring to?
 

rman


Retired Staff
Joined
Dec 24, 2002
Messages
12,637
Reaction score
168
Points
63
Location
Los Angeles, California
Your Mac's Specs
14in MacBook Pro M1 Max 32GB 2TB
You can put in the / as the path, but you are going to run into permissions problem.
 
Joined
Jan 8, 2005
Messages
6,188
Reaction score
254
Points
83
Location
New Jersey
Your Mac's Specs
Mac Pro 8x3.0ghz 12gb ram 8800GT , MBP 2.16 2GB Ram 17 inch.
as rman said you can put the / in the path, but I am unsure what you are talking about ... what script is this? do you have a copy of it, I am curious.
 
OP
sevenhelmet
Joined
May 12, 2005
Messages
555
Reaction score
8
Points
18
Location
Ridgecrest, CA
Your Mac's Specs
rMBP (Mid-2015), 2.8 Ghz i7, 16GB DDR3, AMD M370X Gfx, 1 TB SSD
OK, I tried putting in / as the path, and ran into a permissions problem as both said. How can I work around this permissions problem to back up my whole HD? (It's not a big deal- I just thought I could learn something here!)

Here's the script:

-- MacAddict's Ultimate Backup Script
-- THIS SETS UP THE FOLDER ACTION
on adding folder items to this_folder after receiving these_items

-- YO MAC ADDICTS!!!!!
-- SET UP YOUR INFO HERE!!!!!
set External_Drive to "G5_PM_BACKUP"
set Stuff_To_Backup to "/Users/"
set Backup_Folder to "/Volumes/G5_PM_BACKUP/"
-- YO MAC ADDICTS!!!!!!
-- STOP MESSING WITH OUR SCRIPT!!!!!!!!

-- NOTHING BELOW THIS LINE SHOULD BE CHANGED
-- THIS SETS THE RSYNC SYNTAX WE NEED FOR THE COPYING
set My_Rsync to ("rsync -a " & Stuff_To_Backup & space & Backup_Folder) as string

tell application "Finder"

-- CHECK FOR THE BACKUP DRIVE BEFORE PROCEEDING
if disk External_Drive exists then
-- ASK THE USER FOR PERMISSION TO BACKUP
display dialog "Hey boss, would you like to backup now?"
-- CALL THE TERMINAL TO RUN RSYNC FOR THE ACTUAL COPYING
tell application "Terminal"
activate
do script My_Rsync
end tell
end if
end tell
end adding folder items to
 

rman


Retired Staff
Joined
Dec 24, 2002
Messages
12,637
Reaction score
168
Points
63
Location
Los Angeles, California
Your Mac's Specs
14in MacBook Pro M1 Max 32GB 2TB
I believe the easiest was to get a complete sysyem back up. Is to use Carbon Copy Cloner. You can read about it at the provided link.
 
B

bigpixl

Guest
If you switch the permissions on the drive with Get Info and/or use /Volumes/"local drive", you should be fine. Maybe?
 
B

bigpixl

Guest
instead of doing rsync -a /path/ /path/ do sudo rsync /path/ /path/. UNIX will ask for a password, which will give rsync root access. This will ensure everything gets grabbed.
 
J

jamestuttard

Guest
hey! I was looking for a backup script and man yours is perfect! thanks!
first time i've played with applescript.

I love this platform.
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top