Re: Par2 run twice
Trevisi Roberto <[email protected]> Sat, 22 Feb 2025 16:53:50 +0100
| Newsgroups | gmane.comp.sysutils.backup.dar.support |
|---|---|
| Message-ID | <CAGBoE9SNsb1hMtrQ57hD2K0tSCi=RfmOVCiuV4RpSKOTJVbSDA@mail.gmail.com> |
--===============4997129609621442378== Content-Type: multipart/alternative; boundary="000000000000219c4a062ebd1f77" --000000000000219c4a062ebd1f77 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Denis Confirm =F0=9F=91=8D Regards Roberto Il giorno sab 22 feb 2025 alle ore 14:22 Denis Corbin <[email protected]> ha scritto: > Hi Roberto, > > I was surprised to be able to reproduce the problem you observe, while I > use par2 very often with dar. > > The problem comes from the fact you explicitely include /etc/darrc (-B > /etc/darrc), while it is read by default (unless you give -N option). > > As such, the par2 target (as well as the compress-exclussion target) is > executed twice : > - once in the included by default /etc/darrc > - once in the -B included /etc/darrc > > for compress-exclusion this should not bring much problem (eventually a > very little performance penalty as the file filter is twice larger than > necessary) but for par2 this leads to the problem you report: the second > time par2 complains the file already exist. > > Solutions : > - either add -N option for the /etc/darrc not to be included by default > - or do not explicitely add -B /etc/darrc in you command > > Regards, > Denis > > > On 22/02/2025 13:49, Trevisi Roberto wrote: > > Hi, I'm using par2 with DAR Disk Archiver > > it is the first time I included it in DAR backup process > > > > The dar command is: > > # backup command > > /usr/bin/env dar_static -vm -vd -vf -z -D -R / -c "$FILE" -B /etc/darrc= \ > > par2 compress-exclusion -P boot/efi -P dev -P proc -P run \ > > -P sys -P tmp -P var/tmp -P var/cache -P root+/.cache \ > > -P home/user/.cache -P home/user/snap/firefox/common/.cache \ > > -P media -P cdrom -P mnt -P lost+found > > > > The error is: > > Closing archive low layer... > > creating PAR file for file /mnt/backup/backup/host/ubuntu24.04/ > > full_backup/live/2025-02-22_live-backup_ubuntu-24.04_host_full.1.dar ..= . > > > > Block size: 6346252 > > Source file count: 1 > > Source block count: 2000 > > Recovery block count: 40 > > Recovery file count: 1 > > > > Opening: 2025-02-22_live-backup_ubuntu-24.04_host_full.1.dar > > Computing Reed Solomon matrix. > > Constructing: done. > > Wrote 134217600 bytes to disk > > Wrote 119632480 bytes to disk > > Writing recovery packets > > Writing verification packets > > Done > > creating PAR file for file /mnt/backup/backup/host/ubuntu24.04/ > > full_backup/live/2025-02-22_live-backup_ubuntu-24.04_host_full.1.dar ..= . > > > > Block size: 6346252 > > Source file count: 1 > > Source block count: 2000 > > Recovery block count: 40 > > Recovery file count: 1 > > > > Could not create "/mnt/backup/backup/host/ubuntu24.04/full_backup/ > > live/2025-02-22_live-backup_ubuntu-24.04_host_full.1.dar.vol00+40.par2"= : > > File already exists. > > Error during user command line execution: execution of [ /usr/share/doc= / > > dar/examples/dar_par_create.duc "/mnt/backup/backup/host/ubuntu24.04/ > > full_backup/live" "2025-02-22_live-backup_ubuntu-24.04_host_full" 1 dar > > last_slice 2 ; /usr/share/doc/dar/examples/dar_par_create.duc "/mnt/ > > backup/backup/host/ubuntu24.04/full_backup/live" "2025-02-22_live- > > backup_ubuntu-24.04_host_full" 1 dar last_slice 2 ] returned error code= : > > 1536 . > > Retry command-line ? [return =3D YES | Esc =3D NO] > > > > > > files in backup dir are: > > $ ls -l > > total 12684708 > > -rwxrwxrwx 1 root root 35354169 Feb 22 09:45 2025-02-22_boot- > > efi_host.tar.gz > > -rwxrwxrwx 1 root root 7139472 Mar 31 2024 2025-02-22_dar_static > > -rwxrwxrwx 1 root root 12692503368 Feb 22 09:37 2025-02-22_live- > > backup_ubuntu-24.04_host_full.1.dar > > -rwxrwxrwx 1 root root 40452 Feb 22 09:40 2025-02-22_live- > > backup_ubuntu-24.04_host_full.1.dar.par2 > > -rwxrwxrwx 1 root root 254094992 Feb 22 09:40 2025-02-22_live- > > backup_ubuntu-24.04_host_full.1.dar.vol00+40.par2 > > > > > > par2 is called by /etc/darrc: > > par2: > > -B "/usr/share/doc/dar/examples/dar_par.dcf" > > > > The file /usr/share/doc/dar/examples/dar_par.dcf: > > # configuration file for dar to have Parchive integrated > > # with DAR > > # to be passed to dar as argument of -B option (-B dar_par.dcf) > > # either directly on command line or through $HOME/.darrc or /etc/darrc > > # file > > > > create: > > -E '/usr/share/doc/dar/examples/dar_par_create.duc "%p" "%b" %= N > > %e %c 2' > > # 2 stands for 2% of redundancy > > # adjust it to your needs > > > > test: > > -E '/usr/share/doc/dar/examples/dar_par_test.duc "%p" "%b" %N > > %e %c' > > > > # note that you may need to set the path to dar_par_test.duc > > # and dar_par_create.duc, at dar/libdar installation, /usr/share/doc/ > > dar/examples > > # is substitued by the path where these are installed to > > > > # fix from Sergey Feo > > default: > > -E "echo Warning: dar_par.dcf will not be used in this operation. Pleas= e > > review command line options. -c or -t should be used before - > > B ...dar_par.dcf" > > > > > > The file /usr/share/doc/dar/examples/dar_par_test.duc: > > #!/bin/sh > > ### > > # > > # this script is to be launched on dar command line when creating an > > archive with -s option (slicing) > > # you need to run this script from dar, adding the following argument o= n > > command-line > > # > > # -E "dar_par_create.duc %p %b %N %e %c 20" > > # > > # note that 20 means 20% of redundancy, tune it to your needs > > # > > ### > > # > > # if you prefer you can also add the line above in your the $HOME/.darr= c > > file > > # under the create: conditional statement (see dar man page) > > # > > ### > > # > > # usage par_script slice.basename slice.number extension level > > # generates a Parchive redundancy file from the slice file > > # > > ### > > > > if [ "$1" =3D "" -a "$2" =3D "" -a "$3" =3D "" -a "$4" =3D "" -a "$6" = =3D "" ]; > then > > echo "usage: $0 <path> <basename> <slice number> <extension> > > <context(not used)> <redundancy ratio (%)>" > > echo "$0 builds Parchive redundancy file for the given slice" > > exit 1 > > fi > > > > # change according to you need > > PAR=3Dpar2 > > > > echo "creating PAR file for file $1/$2.$3.dar ..." > > > > exec $PAR c -r$6 -n1 "$1/$2.$3.$4" > > # script returned code it those of par > > > > > > > > Have you any solution ? > > > > Thanks in advance > > > > --000000000000219c4a062ebd1f77 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr">Hi Denis<div><br></div><div>Confirm=C2=A0=F0=9F=91=8D</div= ><div><br></div><div>Regards</div><div>Roberto</div></div><br><div class=3D= "gmail_quote gmail_quote_container"><div dir=3D"ltr" class=3D"gmail_attr">I= l giorno sab 22 feb 2025 alle ore 14:22 Denis Corbin <<a href=3D"mailto:= [email protected]">[email protected]</a>> ha scritto:<br></div><blockquo= te class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px = solid rgb(204,204,204);padding-left:1ex">Hi Roberto,<br> <br> I was surprised to be able to reproduce the problem you observe, while I <b= r> use par2 very often with dar.<br> <br> The problem comes from the fact you explicitely include /etc/darrc (-B <br> /etc/darrc), while it is read by default (unless you give -N option).<br> <br> As such, the par2 target (as well as the compress-exclussion target) is <br= > executed twice :<br> - once in the included by default /etc/darrc<br> - once in the -B included /etc/darrc<br> <br> for compress-exclusion this should not bring much problem (eventually a <br= > very little performance penalty as the file filter is twice larger than <br= > necessary) but for par2 this leads to the problem you report: the second <b= r> time par2 complains the file already exist.<br> <br> Solutions :<br> - either add -N option for the /etc/darrc not to be included by default<br> - or do not explicitely add -B /etc/darrc in you command<br> <br> Regards,<br> Denis<br> <br> <br> On 22/02/2025 13:49, Trevisi Roberto wrote:<br> > Hi, I'm using par2 with DAR Disk Archiver<br> > it is the first time I included it in DAR backup process<br> > <br> > The dar command is:<br> > # backup command<br> > /usr/bin/env dar_static -vm -vd -vf -z -D -R / -c "$FILE" -B= /etc/darrc \<br> >=C2=A0 =C2=A0 =C2=A0par2 compress-exclusion -P boot/efi -P dev -P proc = -P run \<br> >=C2=A0 =C2=A0 =C2=A0-P sys -P tmp -P var/tmp -P var/cache -P root+/.cac= he \<br> >=C2=A0 =C2=A0 =C2=A0-P home/user/.cache -P home/user/snap/firefox/commo= n/.cache \<br> >=C2=A0 =C2=A0 =C2=A0-P media -P cdrom -P mnt -P lost+found<br> > <br> > The error is:<br> > Closing archive low layer...<br> > creating PAR file for file /mnt/backup/backup/host/ubuntu24.04/ <br> > full_backup/live/2025-02-22_live-backup_ubuntu-24.04_host_full.1.dar .= ..<br> > <br> > Block size: 6346252<br> > Source file count: 1<br> > Source block count: 2000<br> > Recovery block count: 40<br> > Recovery file count: 1<br> > <br> > Opening: 2025-02-22_live-backup_ubuntu-24.04_host_full.1.dar<br> > Computing Reed Solomon matrix.<br> > Constructing: done.<br> > Wrote 134217600 bytes to disk<br> > Wrote 119632480 bytes to disk<br> > Writing recovery packets<br> > Writing verification packets<br> > Done<br> > creating PAR file for file /mnt/backup/backup/host/ubuntu24.04/ <br> > full_backup/live/2025-02-22_live-backup_ubuntu-24.04_host_full.1.dar .= ..<br> > <br> > Block size: 6346252<br> > Source file count: 1<br> > Source block count: 2000<br> > Recovery block count: 40<br> > Recovery file count: 1<br> > <br> > Could not create "/mnt/backup/backup/host/ubuntu24.04/full_backup= / <br> > live/2025-02-22_live-backup_ubuntu-24.04_host_full.1.dar.vol00+40.par2= ": <br> > File already exists.<br> > Error during user command line execution: execution of [ /usr/share/do= c/ <br> > dar/examples/dar_par_create.duc "/mnt/backup/backup/host/ubuntu24= .04/ <br> > full_backup/live" "2025-02-22_live-backup_ubuntu-24.04_host_= full" 1 dar <br> > last_slice 2 ; /usr/share/doc/dar/examples/dar_par_create.duc "/m= nt/ <br> > backup/backup/host/ubuntu24.04/full_backup/live" "2025-02-22= _live- <br> > backup_ubuntu-24.04_host_full" 1 dar last_slice 2 ] returned erro= r code: <br> > 1536 .<br> > Retry command-line ? [return =3D YES | Esc =3D NO]<br> > <br> > <br> > files in backup dir are:<br> > $ ls -l<br> > total 12684708<br> > -rwxrwxrwx 1 root root =C2=A0 =C2=A035354169 Feb 22 09:45 2025-02-22_b= oot- <br> > efi_host.tar.gz<br> > -rwxrwxrwx 1 root root =C2=A0 =C2=A0 7139472 Mar 31 =C2=A02024 2025-02= -22_dar_static<br> > -rwxrwxrwx 1 root root 12692503368 Feb 22 09:37 2025-02-22_live- <br> > backup_ubuntu-24.04_host_full.1.dar<br> > -rwxrwxrwx 1 root root =C2=A0 =C2=A0 =C2=A0 40452 Feb 22 09:40 2025-02= -22_live- <br> > backup_ubuntu-24.04_host_full.1.dar.par2<br> > -rwxrwxrwx 1 root root =C2=A0 254094992 Feb 22 09:40 2025-02-22_live- = <br> > backup_ubuntu-24.04_host_full.1.dar.vol00+40.par2<br> > <br> > <br> > par2 is called by /etc/darrc:<br> > par2:<br> >=C2=A0 =C2=A0 -B "/usr/share/doc/dar/examples/dar_par.dcf"<br= > > <br> > The file=C2=A0/usr/share/doc/dar/examples/dar_par.dcf:<br> > # configuration file for dar to have Parchive integrated<br> > # with DAR<br> > # to be passed to dar as argument of -B option (-B dar_par.dcf)<br> > # either directly on command line or through $HOME/.darrc or /etc/darr= c<br> > # file<br> > <br> > create:<br> >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 -E '/usr/share/doc/dar/examples/= dar_par_create.duc "%p" "%b" %N <br> > %e %c 2'<br> > # 2 stands for 2% of redundancy<br> > # adjust it to your needs<br> > <br> > test:<br> >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 -E '/usr/share/doc/dar/examples/= dar_par_test.duc "%p" "%b" %N <br> > %e %c'<br> > <br> > # note that you may need to set the path to dar_par_test.duc<br> > # and dar_par_create.duc, at dar/libdar installation, /usr/share/doc/ = <br> > dar/examples<br> > # is substitued by the path where these are installed to<br> > <br> > # fix from Sergey Feo<br> > default:<br> > -E "echo Warning: dar_par.dcf will not be used in this operation.= Please <br> > review command line options. -c or -t should be used before - <br> > B ...dar_par.dcf"<br> > <br> > <br> > The file=C2=A0/usr/share/doc/dar/examples/dar_par_test.duc:<br> > #!/bin/sh<br> > ###<br> > #<br> > # this script is to be launched on dar command line when creating an <= br> > archive with -s option (slicing)<br> > # you need to run this script from dar, adding the following argument = on <br> > command-line<br> > #<br> > # =C2=A0 =C2=A0 -E "dar_par_create.duc %p %b %N %e %c 20"<br= > > #<br> > # note that 20 means 20% of redundancy, tune it to your needs<br> > #<br> > ###<br> > #<br> > # if you prefer you can also add the line above in your the $HOME/.dar= rc <br> > file<br> > # under the create: conditional statement (see dar man page)<br> > #<br> > ###<br> > #<br> > # usage par_script slice.basename slice.number extension level<br> > # generates a Parchive redundancy file from the slice file<br> > #<br> > ###<br> > <br> > if [ "$1" =3D "" -a "$2" =3D ""= ; -a "$3" =3D "" -a "$4" =3D "" -a = "$6" =3D "" ]; then<br> >=C2=A0 =C2=A0 echo "usage: $0 <path> <basename> <sl= ice number> <extension> <br> > <context(not used)> <redundancy ratio (%)>"<br> >=C2=A0 =C2=A0 echo "$0 builds Parchive redundancy file for the giv= en slice"<br> >=C2=A0 =C2=A0 exit 1<br> > fi<br> > <br> > # change according to you need<br> > PAR=3Dpar2<br> > <br> > echo "creating PAR file for file $1/$2.$3.dar ..."<br> > <br> > exec $PAR c -r$6 -n1 "$1/$2.$3.$4"<br> > # script returned code it those of par<br> > <br> > <br> > <br> > Have you any solution ?<br> > <br> > Thanks in advance<br> > <br> <br> </blockquote></div> --000000000000219c4a062ebd1f77-- --===============4997129609621442378== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline --===============4997129609621442378==--