New To Mac-Forums?

Welcome to our community! Join the discussion today by registering your FREE account. If you have any problems with the registration process, please contact us!

Get your questions answered by community gurus Advice and insight from world-class Apple enthusiasts Exclusive access to members-only contests, giveaways and deals

Join today!

 
Start a Discussion
 

Mac-Forums Brief

Subscribe to Mac-Forums Brief to receive special offers from Mac-Forums partners and sponsors

Join the conversation RSS
OS X - Development and Darwin Discussion and questions about development for Mac OS X.

MacAddict Backup Script


Post Reply New Thread Subscribe

 
Thread Tools
sevenhelmet

 
sevenhelmet's Avatar
 
Member Since: May 12, 2005
Location: Ridgecrest, CA
Posts: 539
sevenhelmet is on a distinguished road
Mac Specs: Aluminum Macbook 2.4Ghz; Powermac G5 2.3Ghz dual

sevenhelmet is offline
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?

"Luck favors the prepared"
QUOTE Thanks
rman

 
rman's Avatar
 
Member Since: Dec 24, 2002
Location: Los Angeles, California
Posts: 12,591
rman has much to be proud ofrman has much to be proud ofrman has much to be proud ofrman has much to be proud ofrman has much to be proud ofrman has much to be proud ofrman has much to be proud ofrman has much to be proud ofrman has much to be proud ofrman has much to be proud of
Mac Specs: 2 x 3.0GHz Quad-Core, 6GB OS X 10.6.8 | 15in MacBook Pro 2.2GHz OS X 10.6.8 | 64GB iPad 2 WiFi

rman is offline
You can put in the / as the path, but you are going to run into permissions problem.

Life isn't about waiting for the storm to pass, It's about learning to dance in the rain!
QUOTE Thanks
PowerBookG4

 
PowerBookG4's Avatar
 
Member Since: Jan 08, 2005
Location: New Jersey
Posts: 6,190
PowerBookG4 has much to be proud ofPowerBookG4 has much to be proud ofPowerBookG4 has much to be proud ofPowerBookG4 has much to be proud ofPowerBookG4 has much to be proud ofPowerBookG4 has much to be proud ofPowerBookG4 has much to be proud ofPowerBookG4 has much to be proud ofPowerBookG4 has much to be proud ofPowerBookG4 has much to be proud of
Mac Specs: Mac Pro 8x3.0ghz 12gb ram 8800GT , MBP 2.16 2GB Ram 17 inch.

PowerBookG4 is offline
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.

My Website
Blog
I love my hosting company!
I was on the M-F honor roll for Febuary:2006
QUOTE Thanks
sevenhelmet

 
sevenhelmet's Avatar
 
Member Since: May 12, 2005
Location: Ridgecrest, CA
Posts: 539
sevenhelmet is on a distinguished road
Mac Specs: Aluminum Macbook 2.4Ghz; Powermac G5 2.3Ghz dual

sevenhelmet is offline
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

"Luck favors the prepared"
QUOTE Thanks
rman

 
rman's Avatar
 
Member Since: Dec 24, 2002
Location: Los Angeles, California
Posts: 12,591
rman has much to be proud ofrman has much to be proud ofrman has much to be proud ofrman has much to be proud ofrman has much to be proud ofrman has much to be proud ofrman has much to be proud ofrman has much to be proud ofrman has much to be proud ofrman has much to be proud of
Mac Specs: 2 x 3.0GHz Quad-Core, 6GB OS X 10.6.8 | 15in MacBook Pro 2.2GHz OS X 10.6.8 | 64GB iPad 2 WiFi

rman is offline
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.

Life isn't about waiting for the storm to pass, It's about learning to dance in the rain!
QUOTE Thanks
bigpixl
Guest
 
Posts: n/a

If you switch the permissions on the drive with Get Info and/or use /Volumes/"local drive", you should be fine. Maybe?
QUOTE Thanks
bigpixl
Guest
 
Posts: n/a

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.
QUOTE Thanks
jamestuttard
Guest
 
Posts: n/a

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.
QUOTE Thanks

Post Reply New Thread Subscribe


« Differences between Darwin and RedHat Fedora? | Compiler ... »
Thread Tools

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread
Thread Starter
Forum
Replies
Last Post
Scheduled Backup With Dejavu - Cannot backup mogwai OS X - Development and Darwin 1 09-28-2005 10:36 PM
good backup program? supenguin OS X - Apps and Games 0 07-15-2005 12:05 PM
Entourage Backup scottatron OS X - Apps and Games 0 02-23-2005 10:43 PM
Ooops - dragged a script to the Finder!! kjellquist OS X - Operating System 1 03-15-2004 06:46 PM
Backup data to CD via the command line gatorparrots OS X - Development and Darwin 2 11-25-2003 10:00 PM

All times are GMT -4. The time now is 12:34 PM.

Powered by vBulletin
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
X

Welcome to Mac-Forums.com

Create your username to jump into the discussion!

New members like you have made this community the ultimate source for your Mac since 2003!


(4 digit year)

Already a member?