<div dir="ltr"><div>Inline</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Jul 17, 2022 at 9:50 AM Shlomo Solomon <<a href="mailto:shlomo.solomon@gmail.com">shlomo.solomon@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">I recently lost some files because of a bad disk - hardware problem.<br>
<br>
I do regular backups so I was not really worried, but I now see that I<br>
have a problem with my backup strategy so I'd like to know how others<br>
handle/prevent what happened to me.<br>
<br>
I backup files using rsync and I basically have 2 types of backups.<br>
<br>
My most important files are backed up every night. I do incremental<br>
backups using: rsync -aqrlvtogS --ignore-errors --backup<br>
I keep about 4 months of backups. So if a file is damaged, <br>
missing or accidentally deleted, I can find a good file - even if, for<br>
example I screwed up the file and only discovered the problem a few<br>
days later.<br>
<br>
BUT, all the rest of my files - music, videos, pictures, etc are backed<br>
up daily and weekly on 2 different physical drives using:<br>
rsync -qrlvtogS --delete --ignore-errors <br>
I use --delete to prevent accumulating garbage on my backup disks.<br>
<br>
So here's the problem: Because of a hardware problem, several files on<br>
one of my disks were lost. As a result, the daily backup script<br>
"thought" that those files should be deleted from the daily backup.<br>
Unfortunately, I did not notice the problem. A few days later, those<br>
same files were also deleted from the weekly backup. So they are lost.<br></blockquote><div><br></div><div>I would consider an external backup that's cheap and not really limited in terms of space - glacier or something similar. Drop a monthly archive there without --delete and even if some garbage accumulates, it's not a big deal. <br><br>It all really depends on the amount of data in question, if it's not insanely huge, you can simply buy some cheap drives and do the same thing. Tiered backups aren't anything new, it is best practice to have a set of fresh hot backups, like your dailies, a weekly or biweekly warm archive in case you need to pull out something older, and a cold archive that's essentially a big dump of ancient stuff on very cheap and very slow medium, used for emergencies. </div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
So on one hand, I need --delete to avoid keeping backups of old<br>
garbage, but on the other hand, the --delete option does not know if I<br>
deleted the file or if it's gone because of a hardware problem.<br></blockquote><div><br></div><div>For this, I would run a seperate infrequent backup without --delete, and dump it on the cold storage, just in case. <br><br>Another option, if you want to save space, would be to drop rsync and switch to something like backy2 or it's alternatives. </div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
<br>
<br>
-- <br>
Shlomo Solomon<br>
<a href="http://the-solomons.net" rel="noreferrer" target="_blank">http://the-solomons.net</a><br>
Claws Mail 3.17.5 - KDE Plasma 5.18.5 - Kubuntu 20.04<br>
<br>
_______________________________________________<br>
Linux-il mailing list<br>
<a href="mailto:Linux-il@cs.huji.ac.il" target="_blank">Linux-il@cs.huji.ac.il</a><br>
<a href="http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il" rel="noreferrer" target="_blank">http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il</a><br>
</blockquote></div></div>