Archiving vs. backup...Please explain - ehMac.ca
Facebook
Twitter
YouTube
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read


Reply
 
LinkBack Thread Tools Display Modes
Old Mar 8th, 2005, 11:46 AM   #1
Full Citizen
 
thejst's Avatar
 
Join Date: Feb 2005
Location: Winnipeg, Canada
Posts: 979
Send a message via AIM to thejst
Archiving vs. backup...Please explain

I need to know the difference between archiving and backup (I think I have been archiving but really should be backing up...) and how to effectively backup my system with os x. I have an external drive casing- I usually just drop important files onto that...
How do I back up my system though?
thanks
James
__________________
MacBook Pro C2D. It Rules.
thejst is offline   Reply With Quote
Sponsored Links
Advertisement
 
Old Mar 8th, 2005, 05:35 PM   #2
Full Citizen
 
dthompson101's Avatar
 
Join Date: Jan 2001
Location: Toronto, ON, CA
Posts: 778
Send a message via AIM to dthompson101
Backup is a mode in that you might only want to do once in a while in order to ensure you have a "recent" copy of your data stored securely to a remote hard drive, cd-rom, DVD, etc. This might only be done once a month, quarterly, or at your own need.

Archiving is more a way in which you will have multiple copies of the data which is taken offsite and is done more regularly (say nightly) with incremental backups in which you are able to move back a couple of days/weeks/months/years in order to retrieve data...

Quick and dirty explanation

Here is a script I wrote that will backup your whole (entire) hard drive. Copy and paste the data into a new text edit document, call it clone_boot.sh and in order to run it, open a terminal session, cd to the location of the file: cd ~/Desktop and type: sudo sh clone_boot.sh

Copy below this line:
--------------------------------------------------------------------
#!/bin/sh

# This script deletes the second volume nightly and copies
# the entire contents to the boot system onto the second drive

# Script written by David Thompson of Digital Transitions
# email: solutions@digitaltransitions.ca | phone: (416) 833-3944
# Offering solutions and support for: Corporate : Education : Non-Profit

################################################## #######################################
# ***** IMPORTANT ***** IMPORTANT ***** IMPORTANT ***** IMPORTANT ***** IMPORTANT ***** #
# Change all instances of SECOND_DISK below with your second hard disks name #
################################################## #######################################

bless -folder /System/Library/CoreServices -bootinfo /usr/standalone/ppc/bootx.bootinfo

# Use Disk Utility to format the second volume
diskutil repairPermissions /
diskutil eraseVolume "Journaled HFS+" SECOND_DISK /Volumes/SECOND_DISK

# Use Apple Software Restore to make an entire image dump of the boot system
asr -source / -target /Volumes/SECOND_DISK

# Use the bless command to make the external volume bootable in case of emergency
bless -folder /Volumes/SECOND_DISK/System/Library/CoreServices -bootinfo /Volumes/SECOND_DISK/usr/standalone/ppc/bootx.bootinfo

exit 0
--------------------------------------------------------------------
Copy above this line
__________________
_________________________________________________
Digital Transitions
David Thompson

david@digitaltransitions.ca
(416) 833-3944

Apple Consultants Network
ACSA (v10.5) - ACTC (v10.5) - Xsan Admin (v1.1)

Specializing in Systems Administration, Integration, and Windows migration
dthompson101 is offline   Reply With Quote
Old Mar 8th, 2005, 07:53 PM   #3
Full Citizen
 
thejst's Avatar
 
Join Date: Feb 2005
Location: Winnipeg, Canada
Posts: 979
Send a message via AIM to thejst
Thank you very much, David...
This looks daunting, but I'll give it a shot.
James
__________________
MacBook Pro C2D. It Rules.
thejst is offline   Reply With Quote
Old Mar 8th, 2005, 08:40 PM   #4
Assured Advertiser
Honourable Citizen
 
MacDoc's Avatar
 
Join Date: Nov 2001
Location: Planet Earth.....on FASTER boil :-(
Posts: 30,836
Or use Carbon Copy Cloner or SuperDuper.
Much MUCH easier.
__________________
In Australia and the web site is out of date.
Lots of good deals on Retinas, previous high end MacPros and current MacPro 6 core bundles in stock. macdoc@macdoc.com
MacDoc is offline   Reply With Quote
Old Mar 8th, 2005, 10:29 PM   #5
Full Citizen
 
dthompson101's Avatar
 
Join Date: Jan 2001
Location: Toronto, ON, CA
Posts: 778
Send a message via AIM to dthompson101
Yeah, MacDoc is right, CCC is much easier, however it should be noted that CCC is no longer being supported as far as I know as it seems to be moving towards Netrestore now which is based on network image restoring over single clone to clone disks as CCC does, however netrestore does this as well.

Just an FYI out there for everyone to think about.

The script is not really "THAT" daunting, I can make it easier if you want so you can double click on the icon on your desktop, input your password and away you go...but yes CCC is still easier as it has a GUI :-)
__________________
_________________________________________________
Digital Transitions
David Thompson

david@digitaltransitions.ca
(416) 833-3944

Apple Consultants Network
ACSA (v10.5) - ACTC (v10.5) - Xsan Admin (v1.1)

Specializing in Systems Administration, Integration, and Windows migration
dthompson101 is offline   Reply With Quote
Old Mar 9th, 2005, 09:00 AM   #6
kps
Tritium Glow
 
kps's Avatar
 
Join Date: May 2003
Location: North of the Mullet Line
Posts: 7,141
Thanks for the script, dthompson.

I'm not profficient at shell scripting, so if you don't mind let me ask a few questions about your script...

1. does it need any specific permissions and ownership? or will 755 and the admin UID be ok

2. for obvious reasons you "hashed" out the !/bin/sh at the top...to make the script run, that has to be un-hashed...correct?

3. what does the first bless command do exactly? Isn't that already a 'blessed' system?

4. Can asr -source / be changed to asr -source /Users/user_name and eliminate the two bless commands to just backup the user directory or is there a better command.

5. If I wanted to add this to /etc/crontab would I need to change ownership to root (UID 0)?
__________________
kps is offline   Reply With Quote
Old Mar 9th, 2005, 09:41 AM   #7
Assured Advertiser
Honourable Citizen
 
MacDoc's Avatar
 
Join Date: Nov 2001
Location: Planet Earth.....on FASTER boil :-(
Posts: 30,836
The CCC site is active and current so I see no reason that CCC is not being supported - net restore is useful but for different reasons.
SuperDuper is getting a lot of raves but it does cost.
__________________
In Australia and the web site is out of date.
Lots of good deals on Retinas, previous high end MacPros and current MacPro 6 core bundles in stock. macdoc@macdoc.com
MacDoc is offline   Reply With Quote
Old Mar 9th, 2005, 03:22 PM   #8
Full Citizen
 
dthompson101's Avatar
 
Join Date: Jan 2001
Location: Toronto, ON, CA
Posts: 778
Send a message via AIM to dthompson101
Quote:
1. does it need any specific permissions and ownership? or will 755 and the admin UID be ok

--> 755 will work fine with the owner as admin, yourself, or whoever. Ideally when you run the script, you will type in sudo sh /path/to/script. The "sudo" command is so that you gain access to run the command as the root user (Super User DO)
--------------------------------------------------------------------
Quote:
2. for obvious reasons you "hashed" out the !/bin/sh at the top...to make the script run, that has to be un-hashed...correct?

--> No, this is just a script that has been built in the sh environment so anyone modifying it will no not to use a differnt shell variable language (zsh, tcsh, bash) etc. Leave it commented out
--------------------------------------------------------------------
Quote:
3. what does the first bless command do exactly? Isn't that already a 'blessed' system?

--> Indeed the boot system is blessed, however this has to do more with the other drive in which you are copying the data to. If diskutil tries to format a blessed system, it will fail and exit the process. Blessing the boot system gives the diskutil the ability to format your external or drive in which you want to copy the data to
--------------------------------------------------------------------
Quote:
4. Can asr -source / be changed to asr -source /Users/user_name and eliminate the two bless commands to just backup the user directory or is there a better command.

--> No ASR runs only as full image dumps from one drive to the next. If you want to do an individual file or folder, I would suggest using the "ditto" command and or if you are really really in the mood for fun, use the rsync command. There is a modified version of
rsyncx located on my site from the link if you want to play with it. RsyncX maintains the Mac OS's resource forks.

If you just want to make copies of your home directory, you can do one of 2 things here that are easy:
ditto ~/ /path/to/backup/drive/username
or
ditto -rsrc -c -k ~/ /path/to/backup/drive/username.$(date +%m.%d.%y).zip

The last ditto will create a compressed zipped file (CPIO) with your username.03.08.2005.zip so you know what date you backed up your home directory on. This can be very good for incremental archiving. It's sort of the same thing as choosing "Create Archive" from the finder in 10.3.X

The ditto command retains all permissions, ownerships, and resource forks from all the files being copied.
--------------------------------------------------------------------
Quote:
5. If I wanted to add this to /etc/crontab would I need to change ownership to root (UID 0)?

--> No you would not need to change anything like that if you wanted to add a crontab entry. You can do this by issuing the following setup (I will let you choose your editor of choice; pico, vi, emacs, text edit) to edit the crontab in the /etc directory

00 2 * * 6 root sh /path/to/clone_script.sh

This will run your script at 2:00 A.M. every saturday night and will run the script as root and will give the script access to all privileges as the root user.


*** OR you could take the script "clone_script.sh" and have it run automatically within the daily, weekly, or monthly periodics by changing the name to something like 700.daily, 700.weekly, 700.monthly and moving it into one of their respective folders in:
/etc/periodic/daily/700.daily
/etc/periodic/weekly/700.weekly
/etc/periodic/monthly/700.monthly

But then you are at the mercy of the crontab time that it runs on
--------------------------------------------------------------------
--> MacDoc is right though. If you have any qualms about scripting there are lots of GUI apps that can do what you need them to do.

You can screw up a lot from the CLI, however you can greatly improve the end result with scripting as well. CCC is really just an Applescript GUI for the following CLI commands:
ditto, diskutil, rm -rf, hdiutil, asr, bless <-- for the most part I believe
__________________
_________________________________________________
Digital Transitions
David Thompson

david@digitaltransitions.ca
(416) 833-3944

Apple Consultants Network
ACSA (v10.5) - ACTC (v10.5) - Xsan Admin (v1.1)

Specializing in Systems Administration, Integration, and Windows migration

Last edited by dthompson101; Mar 9th, 2005 at 03:48 PM.
dthompson101 is offline   Reply With Quote
Old Mar 9th, 2005, 07:24 PM   #9
kps
Tritium Glow
 
kps's Avatar
 
Join Date: May 2003
Location: North of the Mullet Line
Posts: 7,141
Great! Thanks!

I'm reasonably experienced with the CLI, but I'm not a 'scripter' or a unix guru. I know enough to be dangerous....but where would the fun be without a little bit of risk and danger.

WOW! rsyncx looks amazing. The GUI version has some superb features sets.

Thanks again.
__________________

Last edited by kps; Mar 9th, 2005 at 07:38 PM. Reason: added rsyncx note.
kps is offline   Reply With Quote
Old Mar 9th, 2005, 08:26 PM   #10
Full Citizen
 
dthompson101's Avatar
 
Join Date: Jan 2001
Location: Toronto, ON, CA
Posts: 778
Send a message via AIM to dthompson101
Your Welcome. rsync from the CLI is muh more indepth and has many more capabilities. Use RsyncX, build some secure SSH keys for authorization and pipe that script through ssh and you have yourself a full incremental backup of data across your LAN, WAN, or internet. Solid solution for FREE!!!
__________________
_________________________________________________
Digital Transitions
David Thompson

david@digitaltransitions.ca
(416) 833-3944

Apple Consultants Network
ACSA (v10.5) - ACTC (v10.5) - Xsan Admin (v1.1)

Specializing in Systems Administration, Integration, and Windows migration
dthompson101 is offline   Reply With Quote
Reply

Thread Tools
Display Modes

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 Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
My Accountant can't open my Virtual PC Quickbooks backup Performa Mac, iPhone, iPad and iPod Help & Troubleshooting 5 Oct 19th, 2005 10:59 PM
Backup - messed up!! arghhhhhhh!! southside Mac, iPhone, iPad and iPod Help & Troubleshooting 0 May 10th, 2004 08:30 PM
Backup Disaster monokitty Mac, iPhone, iPad and iPod Help & Troubleshooting 2 Oct 27th, 2003 04:07 PM
Backup reminder.....near miss MacDoc Anything Mac 7 Jul 30th, 2003 05:26 PM
Backup 1.2.1 out... Neil Yates Anything Mac 2 Nov 14th, 2002 09:37 PM


All times are GMT -4. The time now is 06:31 PM.



Copyright 1999 - 2012, ehMac.ca All rights reserved. ehMac is not affiliated with Apple Inc. Mac, iPod, iTunes, iPhone, Apple TV are trademarks of Apple Inc. Content Relevant URLs by vBSEO 3.6.0 RC 2

Tribe.ca: Urban living in Toronto!