View Single Post
mattf
Member
 
Join Date: Feb 2005
Location: Devonshire - nearly twinned with Narnia
 
2005-11-28, 06:39

Quote:
Originally Posted by euain
Is OSX tar the gnu version or some Apple-rolled version? If it's gnu (and maybe otherwise) - you can probably set up some excludes using the -X command.
You can indeed use the -X switch. For instance, my backup script contains the following:
Code:
tar rvfX ~/backups/home.tar ~/scripts/exclude_files.txt ~/Documents/* >> ~/scripts/backup.log
This is because I have a 1.2GB VPC file in ~/Documents/Virtual\ PC\ List/ that I don't want to back up. The exclude_files.txt contains the lines:
Code:
# For some reason tar needs absolute paths here /Users/matt/Documents/Virtual PC List/*

Last edited by mattf : 2005-11-28 at 06:43. Reason: more than one line = lines
  quote