25
06
2009
Imagine you have to switch the mainboard of your Apple computer. More specific: the network card or even more specific the MAC address of your network card. Then your exisiting TimeMachine backup will no longer be recognized as valid. This is because of the fact that the Backup folder on the TimeMachine Volume is tagged with the MAC address of your computer. That should prevent you from accidently using TimeMachine backups from different computers. But will also bring you trouble if your MAC address changes for some reason (as in case of mainboard switch during maintenance).
Unfortunately there is no obvious way to tell TimeMachine to use an pre exisiting Backup. TimeMachine would simply start a new backup if you try to continously use the old Volume. The old Backup folder may be even moved to the Trash on that Volume. Obviously this is not what you want.
But when you try to move the original Backup out of Trash, you’ll notice that even the super user “root” doesn’t have the privileges to do that.
But don’t worry. You’re not all lost. What is causing you the trouble is the fact that the MAC address is somewhere tagged on the Backup folder and that Apple additionally uses ACLs (Access Control Lists) on the backup volume. These are basically some additional security settings which should prevent unauthorized or unwanted changes.
So the easiest way to get the Backup working again is to disable the ACLs on the volume, change the MAC address tag of the Backup folder and the re-enable the ACLs on the volume.
This can be done in the Terminal.app as superuser:
cd /Volumes/TimeMachineBackup
fsaclctl -p /Volumes/TimeMachineBackup -d
xattr -w com.apple.backupd.BackupMachineAddress 00:16:cb:90:62:0d `hostname`
fsaclctl -p /Volumes/TimeMachineBackup -e
After that your original Backup should be recognized by TimeMachine.
This tutorial was found here: CyberHQ NL
Comments : No Comments »
Categories : Uncategorized
Tags: ACL, Backup, timemachine
7
01
2009
If you don’t have MacOS X 10.5 (Leopard) but as well starving for a nice and easy backup then try this shell script. MacOS X provides some simple command line tools for doing a convinient backup out of the box. I wrote a little shell script which sports RSYNC to do regular backups and even archive deleted files for a certain time.
Simply modify your source and destination folder in this script and call it regularly. This can be done with cron. Your contrab entry should look something like this:
0 */2 * * * /Users/youraccount/pmt.sh > /dev/null 2>&1
This will start the script every full 2 hours. Should be sufficient.
#!/bin/bash
# poor man's timemachine backup script
# Author:
# $Date: 2009-01-07 13:46:08 +0100 (Wed, 07 Jan 2009) $
# $Author: fzurell $
# $Revision: 93 $
# $HeadURL: http://fzurell@svn.explain-it.org/trunk/tools/pmt.sh $
# this is where your backup will go
# hence the special character " " ... must be quoted with \
BACKUPDIR=/Volumes/Time\ Machine/pmt
# This is the folder where the Backup should start from
# it will be backed up recursivly
SOURCE=/Users/fzurell/Music
####################################################################
LANG=de_DE.UTF-8
WDAY=`date +%A`
MDAY=`date +%d`
# if you call this script without any parameter
# then deleted files will be archived for one week
# you can optionally choose to keep them one month
case $1 in
"woche")
BDAY=$WDAY
;;
"monat")
BDAY=$MDAY
;;
"--help")
echo "Usage: $0 [woche | monat]"
exit 10
;;
*)
BDAY=$WDAY
;;
esac
if [ ! -d "$BACKUPDIR" ]; then
exit 1
fi
/usr/bin/rsync -a -q --delete -b --backup-dir="$BACKUPDIR/$BDAY" "$SOURCE" "$BACKUPDIR/BACKUP"
if [ $? -eq 0 ]; then
say "Your Backup finished successfully."
else
say "Sorry, there went something wrong with your Backup."
fi
Comments : No Comments »
Categories : Geeky, Software
Tags: Backup, rsync, timemachine
14
12
2008
Comments : No Comments »
Categories : Software
Tags: Backup, podcast, Software
7
10
2008
Last weekend I reinstalled MacOS X Leopard on my MacBook Pro for it had some strange errors I couldn’t get rid of. Of course I did a Time Machine backups ahead to have my data safe during reinstallation. I didn’t chose to restore my personal account from a Time Machine backup during the installation as I wanted a clean and fresh system with all programs and settings setup up new and manually. This time I selected to create FileVault user account. This means my home folder is actually an encrypted image file. This image file will be descrypted and mounted as my home directory during login and gets automatically closed and encrypted when I log out.
This worked very well for the first hours. But then during manual installation of some programs and copying my backed up files a kernel panic occured with the grey screen of death. That’s the last thing you wanna see when you have a mounted encrypted image.
After reboot I still was able to login and everything looked OK. But my keychain was damaged. This wasn’t a big problem for the moment as there where only a few apps which made entries there. I repaired the broken keychain and everything was OK.
Then, after finishing my restore I tried to delete the old Time Machine backups from my external disks. This isn’t as easy as it seems. Just dragging it into the Trash bin and empty the Trash will take hours as the Backup consists of million of files. I tried that before….
This time I tried to delete the Backups.backupdb folder from the disk with simple Unix commands (rm -rf ). But this doesn’t work firsthand. Even as superuser I wasn’t able to delete the files. Always got a “no permission” error message. I then checked the usual suspects mds (Spotlight Metadata Service) and hidden file attributes (xattribs). But that didn’t helped.
Finally I connected the disk to another MacBook with the old Tiger 10.4 MacOS X and tried to erase the files over there. This worked well. So Tiger doesn’t care about special settings of these files and did it’s job.
After that I tried to start a fresh and clean backup with Time Machine again. But Time Machine told me that it couldn’t do a backup of a FileVault secured home folder while the user is logged in. This is logical but sad. As this is a laptop computer and I’m the only user I’m almost always logged in when this machine is on. And to extra log off to have a backup done is not really practical. So I decided to kick FileVault for a convinient Time Machine backup. This took a lot of space on my hard disk during the unencryption and about 2 hours.
But now everything is fresh and clean and even PictureSync is working properly again.
Comments : 1 Comment »
Categories : Geeky, Software
Tags: Backup, Geeky, Leopard, Software, Time Maschine