Boston Linux & Unix (BLU) Home | Calendar | Mail Lists | List Archives | Desktop SIG | Hardware Hacking SIG
Wiki | Flickr | PicasaWeb | Video | Maps & Directions | Installfests | Keysignings
Linux Cafe | Meeting Notes | Blog | Linux Links | Bling | About BLU

BLU Discuss list archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Backup zip and split script for OS X



On Dec 20, 2009, at 7:37 PM, Chris O'Connell wrote:
> 
> But I have read a variety of information in the man pages that says there is
> a file split limitation of 2gb.  Can anyone offer any alternate
> suggestions?

Don't use zip for backups.  It does not retain ownerships or permissions.  Usually I recommend tar but on OS X you should use ditto to ensure that you also retain any resource forks that might be kicking around.  Ditto uses cpio archives by default.

 cd /Users
 ditto -c -z . - \
   | split -b 8192m - /Volumes/Seagate1TB/backup-`date.....`.cpgz.

To restore you need to catenate all the pieces together:

  cat backup-*.cpgz.* >> /path/to/staging.cpgz

and then extract with pax:

  cd /Users
  pax -z -r -f /path/to/staging.cpgz

--Rich P.








BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!



Boston Linux & Unix / webmaster@blu.org