Re: Truncated archive/backup reparation
Scott Ritchie <[email protected]> Tue, 11 Mar 2025 21:49:57 +0000
| Newsgroups | gmane.comp.sysutils.backup.dar.support |
|---|---|
| Message-ID | <CAO1VBV3+6x8RH4jWw_40pdGmuMHEF2aOiu+H2pEoLhdYX+1jRQ@mail.gmail.com> |
--===============4403370315859398490== Content-Type: multipart/alternative; boundary="0000000000008369af0630181243" --0000000000008369af0630181243 Content-Type: text/plain; charset="UTF-8" Hi Dennis, Thanks for the quick response, and for confirming that the behaviour I am seeing is actually a bug and not user error on my part! Regarding the new repaired backup that is created by -y, am I right in understanding this would create a copy of all the slice data from the truncated archive? I'm in the process of attempting to do a backup of several hundred TBs, so ideally would like to be able to resume backing up without duplicating all the existing backup if i need to repair a truncated archive during the process. Is there an alternative mechanism by which the repair process can read through a truncated archive to create an additional file with the missing catalogue data at the end, from which a new incremental backup can be run to continue the backup from where the truncated one left off? Best, Scott On Tue, 11 Mar 2025 at 18:27, Denis Corbin <[email protected]> wrote: > On 11/03/2025 13:40, Scott Ritchie wrote: > > Hi, > > Hi Scott, > > > > > I'm trying to understand how to use the -y/--add-catalogue command to > > repair a truncated archive, however, unfortunately have not been > > successful in my own attempts after reading the various documentation/ > > tutorials/man page. > > > > First, I create a test backup where I simulate a power fault/computer > > reboot part way through by sending the SIGKILL signal to the process: > > > > dar -c path/to/backup/backup_slice -s 1G -R folder/to/backup -g subfolder > > > > Let's say I am creating a backup of 10GB of data, and I send the SIGKILL > > signal part way through the creation of slice 4 to simulate a power > > failure / computer reboot. > > > > My understanding is the -y command should be able to recover (and > > continue?) with this backup. > > The truncated archive lacks the catalogue at its end to be fully useful, > the -y option *creates* a second backup while sequentially reading and > gathering the metadata present along the source archive to create the > table of content / catalog at the end of the new backup. > > Then you can use this repaired backup as reference in a differential > backup process to continue the backup. > > And also that's up to you to decide whether to delete the truncated > backup. Why not modifying the original backup? By precaution, for > example what if, during the repairing process, an new power outage > occurs... or you just hit a bug? And also some media may be read-only > like CD/DVD-R/RAM... > > But if you really want at the end a single full backup you can convert a > differential backup to a full backup, but this is yet a data copy...: > > http://dar.linux.free.fr/doc/FAQ.html#full-from-diff > > > > To do so, I run: > > > > dar -y path/to/cont_backup/backup_slice -A path/to/backup/backup_slice - > > s 1G -R folder/to/backup > > > > After reading through the incomplete archive, dar then tells me the next > > backup slice (in this case backup_slice.5.dar) is required for further > > operation, and asks me to provide this file. However, this file > > obviously does not exist, since the initial backup was interrupted > > during slice 4. > > > > When I hit ESC to tell dar I will not provide the file, dar outputs a > > message that it failed reading data CRC for the last file in the > > incomplete slice, and that the file may be damaged and will be marked as > > dirty, before crashing with a segmentation fault. > > I could reproduce this bug/behavior, and will investigate this. The > operations succeeds without slicing, but fails with slicing. For the > rest, what you did are the expected actions. > > > > > I'm clearly missing something here, but I'm not sure what. I'd be > > grateful if someone on the mailing list could clarify, or provide a > > working example? > > sure, first I'll fixe the bug you reported :) > > > > > The version of dar I'm running is 2.7.16 > > > > Kind Regards, > > > > Scott Ritchie > > > > Cheers, > Denis > --0000000000008369af0630181243 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr">Hi Dennis,<br><br>Thanks for the quick response, and for c= onfirming that the behaviour I am seeing is actually a bug and not user err= or on my part!<div><br></div><div>Regarding the new repaired backup that is= created by -y, am I right in understanding this would create a copy of all= the slice data from the truncated archive? I'm in the process of attem= pting to do a backup of several hundred TBs, so ideally would like to be ab= le to resume backing up without duplicating all the existing backup if i ne= ed to repair a truncated archive during the process. Is there an alternativ= e mechanism by which the repair process can read through a truncated archiv= e to create an additional file with the missing catalogue data at the end, = from which a new incremental backup can be run to continue the backup from = where the truncated one left off?=C2=A0</div><div><br></div><div>Best,</div= ><div><br>Scott=C2=A0=C2=A0</div><div><br></div></div><br><div class=3D"gma= il_quote gmail_quote_container"><div dir=3D"ltr" class=3D"gmail_attr">On Tu= e, 11 Mar 2025 at 18:27, Denis Corbin <<a href=3D"mailto:dar.linux@free.= fr">[email protected]</a>> wrote:<br></div><blockquote class=3D"gmail_qu= ote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,20= 4);padding-left:1ex">On 11/03/2025 13:40, Scott Ritchie wrote:<br> > Hi,<br> <br> Hi Scott,<br> <br> > <br> > I'm trying to understand how to use the=C2=A0-y/--add-catalogue co= mmand to <br> > repair a truncated archive, however, unfortunately have not been <br> > successful in my own attempts after reading the various documentation/= <br> > tutorials/man page.<br> > <br> > First, I create a test backup where I simulate a power fault/computer = <br> > reboot part way through=C2=A0by sending the SIGKILL signal to the proc= ess:<br> > <br> > dar -c path/to/backup/backup_slice -s 1G -R folder/to/backup -g subfol= der<br> > <br> > Let's say I am creating a backup of 10GB of data, and I send the S= IGKILL <br> > signal part way through the creation of slice 4 to simulate a power <b= r> > failure / computer reboot.<br> > <br> > My understanding is the -y command should be able to recover (and <br> > continue?) with this backup.<br> <br> The truncated archive lacks the catalogue at its end to be fully useful, <b= r> the -y option *creates* a second backup while sequentially reading and <br> gathering the metadata present along the source archive to create the <br> table of content / catalog at the end of the new backup.<br> <br> Then you can use this repaired backup as reference in a differential <br> backup process to continue the backup.<br> <br> And also that's up to you to decide whether to delete the truncated <br= > backup. Why not modifying the original backup? By precaution, for <br> example what if, during the repairing process, an new power outage <br> occurs... or you just hit a bug? And also some media may be read-only <br> like CD/DVD-R/RAM...<br> <br> But if you really want at the end a single full backup you can convert a <b= r> differential backup to a full backup, but this is yet a data copy...:<br> <br> <a href=3D"http://dar.linux.free.fr/doc/FAQ.html#full-from-diff" rel=3D"nor= eferrer" target=3D"_blank">http://dar.linux.free.fr/doc/FAQ.html#full-from-= diff</a><br> <br> <br> > To do so, I run:<br> > <br> > dar -y path/to/cont_backup/backup_slice -A path/to/backup/backup_slice= - <br> > s 1G -R folder/to/backup<br> > <br> > After reading through the incomplete archive, dar then tells me the ne= xt <br> > backup slice (in this case backup_slice.5.dar) is required for further= <br> > operation, and asks me to provide this file. However, this file <br> > obviously does not exist, since the initial backup was interrupted <br= > > during slice 4.<br> > <br> > When I hit ESC to tell dar I will not provide the file, dar outputs a = <br> > message that it failed reading data CRC for the last file in the <br> > incomplete slice, and that the file may be damaged and will be marked = as <br> > dirty, before crashing with a segmentation fault.<br> <br> I could reproduce this bug/behavior, and will investigate this. The <br> operations succeeds without slicing, but fails with slicing. For the <br> rest, what you did are the expected actions.<br> <br> > <br> > I'm clearly missing something here, but I'm not sure what. I&#= 39;d be <br> > grateful if someone on the mailing list could clarify, or provide a <b= r> > working example?<br> <br> sure, first I'll fixe the bug you reported :)<br> <br> > <br> > The version of dar I'm running is 2.7.16<br> > <br> > Kind Regards,<br> > <br> > Scott Ritchie<br> > <br> <br> Cheers,<br> Denis<br> </blockquote></div> --0000000000008369af0630181243-- --===============4403370315859398490== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline --===============4403370315859398490==--