Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Better than mere rsync...' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Better than mere rsync...
Authored by: greebly on May 18, '04 12:45:43PM

If you're a die-hard UNIX head, there's a fantastic bit of python scriptwork called rdiff-backup. Why do I make the "die-hard UNIX head" proviso? There's a bit of console work and compiling to do if you want to install this. Adventurous non-UNIX people are welcome to try it out (learn something new)! I'd be happy to help, if you're interested. Once's it's installed it's easier than easy to use:

$ rdiff-backup /Users /Path/to/other/directory/Users

Typing this at a command prompt as root (or putting sudo in front) will backup and mirror /Users to the destination folder. Running it again in say 24 hours will bring the mirror up-to-date with any changes, and it will move changed files to an increment directory.

It's like rsync in that it keeps a mirror of whatever directory you tell it to backup, but it also keeps "diffs" of the changes, like an incremental backup. I have an NFS server in my basement, and I have a cron job backing up the /Users folder every night, for each of my Macs. I can also have it remove the incrementals older than 21 days (any time amount is possible).

It has backup and restore capabilities. I used to back up to an old tape drive, but with disk space so cheap, it's easier and cheaper to just use disks. I can restore to an earlier version of a file if something happens.

I haven't tried to mirror a whole disk, so I don't know if such a thing were bootable, but I imagine it wouldn't be hard to make it so.

Long story short, the only sure way to protect against file deletions is to keep backups. I have a .Mac account, but find that Apple's Backup utility doesn't do it for me. I like having incremental backups and a live mirror on a hard disk, networked or otherwise.

Note: (It's necessary for the destination folder to exist before running the script and it's useful to have the same name and permissions as the source, eg. /Users permissions are drwxrwxr-t (1775 in Octal), so you would want /Path/to/other/directory/Users [just the Users folder] to have the same permissions. This would make a full restore as easy as just clicking and dragging or a cp -Rp).

2nd Note: If anyone is interested in helping me, I think it would be rather easy to make an AppleScript wrapper for this, where backups and restores and such would become more accessible to Joe User. Let me know.

---
--++-- Aaron Mildenstein --++--

Do not meddle in the affairs of Dragons,
for you are crunchy, and taste good with ketchup.

[ Reply to This | # ]