Re: [Dar-support] Par2 not available on Ubuntu 20.04
For full, incremental, compressed and encrypted backups or archives
Brought to you by:
edrusb
|
From: Denis C. <dar...@fr...> - 2022-07-08 18:38:55
|
Le 08/07/2022 à 12:51, Per Jensen via Dar-support a écrit : > Hi Stefan, > > I am using the par2 functionality with dar. If you are interested, take > a look at my github repo: > > https://github.com/per2jensen/dar-backup > > /Per Hi Stephan, Hi Per, Of course, you can opt for Per's work with dar! ;) Now I owe you some explanations of what the problem is, the possible solutions and a workaround: > > > Den 08.07.2022 kl. 11.30 skrev sm8...@wi...: >> Hello >> >> I have studied the documentation of Dar and wanted to start off with a >> first full backup with redundancy provided by Par2. >> >> However, the a command like >> dar --create INIT --fs-root=/tmp par2 >> results in the error message >> Parse error: Given user target(s) could not be found: par2 >> >> This happens on Ubuntu 20.04 with the packages dar (version 2.6.8) and >> par2 (version 0.8.1) installed and /etc/darrc containing the lines >> par2: >> -B "/usr/share/doc/dar/examples/dar_par.dcf" >> and the file /usr/share/doc/dar/examples/dar_par.dcf >> containing the lines >> create: >> -E '/usr/share/dar/samples/dar_par_create.duc "%p" "%b" %N %e %c 2' >> test: >> -E '/usr/share/dar/samples/dar_par_test.duc "%p" "%b" %N %e %c' >> >> However, the folder /usr/share/dar is empty, and even manually copying >> the files* dar_par_create.duc and dar_par_test.duc from the source >> tar-ball into a sub-folder named samples (* made executable) did not do >> the trick. Well, they do not need to be executable, just readable by the user that is running the dar program. When using dar from source, the ./configure script that you run at first, has many options to define where should go the different results of the compilation as well as the documentation. These are the --prefix=<path> --bindir=<path> --sbindir=<path> --libexecdir=<path> --sysconfdir=<path> and other options passed to ./configure script. by default all goes in /usr/local, but when dar is provided from a distro package, it makes sense to use --prefix=/usr --sysconfdir=/etc, this is something that the distro maintainer for dar at Ubuntu probably did. in that context the darrc file goes to /etc/darrc and the DCF files referred by /etc/darrc for par2 (dar_par.dcf file) goes to /usr/share/dar/samples. This dar_par.dcf file in turns relies on different DUC files also installed in that same directory /usr/share/dar/samples. During the installation, the dar source package modifies all these files content for the path to be correct in regard of the location of the referred files. It then works flawlessly. However here, it seems that the Ubuntu process does not only rely on the ./configure options to set the destination paths, but also manually moved the dar_par.dcf file from "/usr/share/dar/samples" to "/usr/share/doc/dar/examples". If they modified the /etc/darrc to reflect this change, they missed to modify the content of dar_par.dcf file to reflect the new location of the DUC files it refers. note also that "samples" has been renamed "examples" so you need to change this also in dar_par.dcf, probably the reason why you could not have it working? >> >> Is this a known problem with a solution? I have tried searching the >> mailing list archives but the key "par2 target not found" returns almost >> 4'000 pages dating back to the year 2002 and the first one containing >> "par2" in the title is from 2013; similar for "parchive" instead of >> "par2". I gave up and am hoping for some support from the list members. In other words I suspect the duc files are also in /usr/share/doc/dar/examples beside the dar_par.dcf file. Just modifying the dar_par.dcf replacing... /usr/share/dar/samples by /usr/share/doc/dar/examples ...should make it working. Can you test that? (pay attention to "samples" vs "examples" in the path) This was for a workaround. For a real fix, you should contact the person in charge of dar/libdar packaging at Ubuntu to have this fixed. I'm also flexible on my side, if 'examples' makes more sense than 'samples' this can be changed in the dar source code. >> Thanks in advance!>> >> Stefan Mueller >> > > Regards, Denis |