Par2 run twice
Trevisi Roberto <[email protected]> Sat, 22 Feb 2025 13:49:24 +0100
| Newsgroups | gmane.comp.sysutils.backup.dar.support |
|---|---|
| Message-ID | <CAGBoE9RECcUGJduACgGw7jwrSfxMB6_nH5k+YpXTLQz9HcFkKg@mail.gmail.com> |
--===============0999559056305338349==
Content-Type: multipart/alternative; boundary="0000000000008c8e5d062eba8bfe"
--0000000000008c8e5d062eba8bfe
Content-Type: text/plain; charset="UTF-8"
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 = YES | Esc = 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. Please
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 on
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/.darrc
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" = "" -a "$2" = "" -a "$3" = "" -a "$4" = "" -a "$6" = "" ]; 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=par2
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
--0000000000008c8e5d062eba8bfe
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr">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:<=
div># backup command<br>/usr/bin/env dar_static -vm -vd -vf -z -D -R / -c &=
quot;$FILE" -B /etc/darrc \<br>=C2=A0 =C2=A0par2 compress-exclusion -P=
boot/efi -P dev -P proc -P run \<br>=C2=A0 =C2=A0-P sys -P tmp -P var/tmp =
-P var/cache -P root+/.cache \<br>=C2=A0 =C2=A0-P home/user/.cache -P home/=
user/snap/firefox/common/.cache \<br>=C2=A0 =C2=A0-P media -P cdrom -P mnt =
-P lost+found<br><br>The error is:<br>Closing archive low layer...<br>creat=
ing 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 ...<br><br>Block size: =
6346252<br>Source file count: 1<br>Source block count: 2000<br>Recovery blo=
ck count: 40<br>Recovery file count: 1<br><br><div>Opening: 2025-02-22_live=
-backup_ubuntu-24.04_host_full.1.dar<br>Computing Reed Solomon matrix.<br>C=
onstructing: done.<br>Wrote 134217600 bytes to disk<br>Wrote 119632480 byte=
s to disk<br>Writing recovery packets<br>Writing verification packets<br>Do=
ne<br>creating PAR file for file /mnt/backup/backup/host/ubuntu24.04/full_b=
ackup/live/2025-02-22_live-backup_ubuntu-24.04_host_full.1.dar ...<br><br>B=
lock size: 6346252<br>Source file count: 1<br>Source block count: 2000<br>R=
ecovery block count: 40<br>Recovery file count: 1<br><br>Could not create &=
quot;/mnt/backup/backup/host/ubuntu24.04/full_backup/live/2025-02-22_live-b=
ackup_ubuntu-24.04_host_full.1.dar.vol00+40.par2": File already exists=
.<br>Error during user command line execution: execution of [ /usr/share/do=
c/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 ] return=
ed error code: 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>-rwxrw=
xrwx 1 root root =C2=A0 =C2=A035354169 Feb 22 09:45 2025-02-22_boot-efi_hos=
t.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 20=
25-02-22_live-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-backup_ubuntu-24.0=
4_host_full.1.dar.par2<br>-rwxrwxrwx 1 root root =C2=A0 254094992 Feb 22 09=
:40 2025-02-22_live-backup_ubuntu-24.04_host_full.1.dar.vol00+40.par2</div>=
<div><br></div><div><br></div><div>par2 is called by /etc/darrc:</div><div>=
par2:</div><div>=C2=A0 -B "/usr/share/doc/dar/examples/dar_par.dcf&quo=
t;<br><br>The file=C2=A0/usr/share/doc/dar/examples/dar_par.dcf:</div><div>=
# 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/darrc<br># file<br=
><br>create:<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 -E '/usr/share/doc/dar/exam=
ples/dar_par_create.duc "%p" "%b" %N %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 -E '/usr/share/doc/dar/examples/dar_par_tes=
t.duc "%p" "%b" %N %e %c'<br><br># note that you ma=
y need to set the path to dar_par_test.duc<br># and dar_par_create.duc, at =
dar/libdar installation, /usr/share/doc/dar/examples<br># is substitued by =
the path where these are installed to<br><br># fix from Sergey Feo<br>defau=
lt:<br>-E "echo Warning: dar_par.dcf will not be used in this operatio=
n. Please review command line options. -c or -t should be used before -B ..=
.dar_par.dcf"<br></div><div><br></div><div><br></div><div>The file=C2=
=A0/usr/share/doc/dar/examples/dar_par_test.duc:</div><div>#!/bin/sh</div><=
div>###<br>#<br># this script is to be launched on dar command line when cr=
eating an archive with -s option (slicing)<br># you need to run this script=
from dar, adding the following argument on command-line<br>#<br># =C2=A0 =
=C2=A0 -E "dar_par_create.duc %p %b %N %e %c 20"<br>#<br># note t=
hat 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/.darrc fil=
e<br># under the create: conditional statement (see dar man page)<br>#<br>#=
##<br>#<br># usage par_script slice.basename slice.number extension level<b=
r># 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 echo "usage: $0 <=
path> <basename> <slice number> <extension> <contex=
t(not used)> <redundancy ratio (%)>"<br>=C2=A0 echo "$0 =
builds Parchive redundancy file for the given slice"<br>=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></=
div><br><div><br><br>Have you any solution ?<br><br>Thanks in advance<br></=
div></div></div>
--0000000000008c8e5d062eba8bfe--
--===============0999559056305338349==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
--===============0999559056305338349==--