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.


In reply to Re^2: Perl backup script by jpl
in thread Perl backup script by techjohnny

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.