in reply to Re: Perl backup script
in thread Perl backup script
The most important thing you can do about backups is to think hard about the "threat model" you are worried about. The #1 reason I want backups is accidental removal or destruction of a file or files I am actively modifying. The #2 reason is loss of an entire disk. The best defense against #1 losses is a good version control system. I recommend git, but there are many others. What version control systems do well, and tar/rsync do poorly, is keeping a comprehensive history of the changes you make, and calling attention to changes you might not have realized you made. And you decide the appropriate moments at which to commit changes. tar/rsync may catch a file in the process of changing, when a backup is worthless.
With a good version control system protecting against #1 errors, tar or rsync can focus on #2 errors. I back up entire file systems, and I back them up to different drives on different days. The first time you rsync an entire file system, it takes a long time. Thereafter, it is remarkably good at detecting what has changed, and updating those things quickly. Losing an entire building (fire, flood, earthquake, etc) can destroy all your backups. Here, again, I find git to be useful. I can clone a work project on my home machine, and do occasional "pulls" to keep an offsite copy of what is most important.
|
|---|