<div dir="ltr">Oh, absolutely my script has flaws in it.  I will never claim anything I create or use to not have any flaws. :)<br><br>The machines it runs on are strictly servers that rarely get shutdown though.  The only time that happens if if there's a power failure that lasts longer than 30 minutes (which has only happened once in the last 20 years or so of us being in this building.)  And it also e-mails me a detailed log file after it's done, so if there was a failure, I'd see it by morning and then I can trigger it again manually to get a good backup.  Can it be better, and aware of failed syncs?  Absolutely.<br>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Jan 23, 2013 at 8:25 AM, Kevin Korb <span dir="ltr"><<a href="mailto:kmk@sanitarium.net" target="_blank">kmk@sanitarium.net</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">-----BEGIN PGP SIGNED MESSAGE-----<br>
Hash: SHA1<br>
<br>
</div>I handle this by actually backing up to "backupname.incomplete".  Once<br>
the backup is complete I then rename it to<br>
"backupname.yyyy-mm-dd.HH-MM-SS".  That way all of the backups with<br>
date+time stamps in the name are completed backups and if a backup<br>
fails repeatedly that will not count multiple times against the number<br>
of backups I intend to keep.<br>
<div class="im"><br>
On 01/23/13 03:15, Voelker, Bernhard wrote:<br>
> Kevin Korb wrote:<br>
>> On 01/22/13 18:12, Kevin Korb wrote:<br>
>>> That is the old way that pre-dates --link-dest.  Instead of cp<br>
>>> -al daily.02 daily.01 you can do a mkdir daily.01 then an rsync<br>
>>> ... --link-dest=../daily.02 daily.01<br>
>>><br>
>>> Rsync then doesn't need any --delete and you don't bother<br>
>>> making any hard links that will eventually be replaced.  Plus<br>
>>> the linking happens while rsync is running so it is usually<br>
>>> much faster.<br>
><br>
>> Also, if you put dates and times in the file names instead of<br>
>> .01, .02, etc you don't have to do any mv's, you can easily tell<br>
>> when each backup was run, and ls can tell you which the newest<br>
>> and oldest are.<br>
><br>
> Please tell me if I'm wrong, but depending on the scenario, it has<br>
> one week point:<br>
><br>
> I'm using a similar script on some desktop PCs. The problem is,<br>
> that - due to the fact that it's a desktop PC - the backup can be<br>
> killed during a shutdown ... leaving the last backup uncomplete.<br>
> That's not a problem per se, but with the next backup, the missing<br>
> files are copied freshly from the source and thus exhausting<br>
> backup space. Therefore, the script I'm using rotates the snapshot<br>
> *after* a successful run of rsync.<br>
><br>
> Have a nice day, Berny<br>
><br>
<br>
</div><div class="im">- --<br>
~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~<br>
        Kevin Korb                      Phone:    <a href="tel:%28407%29%20252-6853" value="+14072526853">(407) 252-6853</a><br>
        Systems Administrator           Internet:<br>
        FutureQuest, Inc.               Kevin@FutureQuest.net  (work)<br>
        Orlando, Florida                <a href="mailto:kmk@sanitarium.net">kmk@sanitarium.net</a> (personal)<br>
        Web page:                       <a href="http://www.sanitarium.net/" target="_blank">http://www.sanitarium.net/</a><br>
        PGP public key available on web site.<br>
~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~<br>
-----BEGIN PGP SIGNATURE-----<br>
Version: GnuPG v2.0.19 (GNU/Linux)<br>
Comment: Using GnuPG with Thunderbird - <a href="http://www.enigmail.net/" target="_blank">http://www.enigmail.net/</a><br>
<br>
</div>iEYEARECAAYFAlEAAPwACgkQVKC1jlbQAQdLUgCfb6Kjgv9+sW37BdWx6UvxtsQb<br>
WQIAnRkF2ilrf9rVf6xt5zQGlb8GfTah<br>
=zhr+<br>
-----END PGP SIGNATURE-----<br>
<div class="HOEnZb"><div class="h5">--<br>
Please use reply-all for most replies to avoid omitting the mailing list.<br>
To unsubscribe or change options: <a href="https://lists.samba.org/mailman/listinfo/rsync" target="_blank">https://lists.samba.org/mailman/listinfo/rsync</a><br>
Before posting, read: <a href="http://www.catb.org/~esr/faqs/smart-questions.html" target="_blank">http://www.catb.org/~esr/faqs/smart-questions.html</a><br>
<br>
</div></div></blockquote></div><br></div>