Sunday, October 16, 2011

MAC backup using a single command line

Performing Backups in MAC without using TIMEMACHINE is a kids game.
Whad to you need?
- External hard drive or even a USB pen drive (for the most important information) In addition, you may even think to encrypt your backups by using the free TrueCrypt software.
- Use the rsync command, which stands for remote sync. rsync utility is used to synchronize the files and directories from one location to another in an effective way. rsync is shipped with the MAC unix kernel. Just perform the following command on the terminal
$ rsync options source destination 
$ rsync -avz --delete /Volumes/Macintosh\ HD/Users/ferreiro/Documents/data /Volumes/JF-MAC/MAC-Backup/data
The options used are:
-a   Archive mode. Preserve timestamps, users, permissions, etc
-v   Verbose mode
-z    Enable compression
--delete option deletes files that are not there in source directory (keep perfect match between source and destination)

1 comment:

Jose Ferreiro said...

If you want to restore the whole backup, you could do:

rsync -aP /path/to/backup/folder/ /path/to/restore