Re: Couple of questions regarding dar

Nils Privat <[email protected]>
Newsgroups gmane.comp.sysutils.backup.dar.support
Message-ID <CAOnv=5XaPt4VGJ6-FKUv8T5kZLtr0LqBCyC2Oahzs3Ntu3V1-g@mail.gmail.com>
Hello,

much thanks for your answer.

During testing a few new questions have arised.

1) To list archives i run:

*dar_split split_input $TAPE | dar --list - --sequential-read*

*Output:*

*[Data ][D][ EA  ][FSA][Compr][S]| Permission | User  | Group | Size    |
        Date                 |    filename*
*--------------------------------+------------+-------+-------+---------+-------------------------------+------------*
*[Saved][ ][Saved][-L-][ 100%][X]  -rwxrwxr--   test test 1 Mio Thu Apr 27
17:47:59 2017 A.rar*
*..*
*[Saved][ ][Saved][-L-][ 100%][X]  -rwxrwxr--   test test 1 Mio Thu Apr 27
17:47:59 2017 E.rar*
*No more data available from source, please do something!*
*Press return when ready to continue or hit CTRL-C to abort*

*No more data available from source, please do something!*
*Press return when ready to continue or hit CTRL-C to abort*
*^CReceived signal: Interrupt*
*Archive delayed termination engaged*
*Disabling signal handler, the next time this signal is received the
program will abort immediately*
*[Saved][ ][Saved][-L-][ 100%][X]  -rwxrwxr--   test test 1 Mio Thu Apr 27
17:47:59 2017 B.rar*


As you can see listing is working but i worry about that first it says "No
more data available from source, please do something",
then after pressing CTRL-C or enter one last entry of the listing is still
printing "B.rar". Is that normal? Why not all items are
listed together?


2) Question regarding differential archives on tapes:

I am using this command to create a full backup to tape:

*dar --create - \*
*--verbose=all \*
*--compression gzip:3 \*
*--alter=no-case \*
*-Z "*.zip" -Z "*.rar" -Z "*.gz" -Z "*.7z" -Z "*.iso" \*
*-X ".DS_Store" \*
*--key aes256:MyKey \*
*--on-fly-isolate /root/dar_catalog_full \*
*--fs-root ${MY_PATH} | mbuffer -P 80 -m 4G -R 140M | dar_split
split_output ${TAPE}*

For differential backup i use the same command but with:

*-A /root/dar_catalog_full \*
*--on-fly-isolate /root/dar_catalog_d1 \*

Do i have to run *'mt -f $TAPE eod'* or 'eof' between each new backup? Or
is dar positioning the tape after a backup
already to the end and is writing an EOF mark so i just can append a new
backup?

INFO: After creating the first backup i checked the position:
*mt -f $TAPE status*
*File number=1, block number=0, partition=0.*
So it seems like dar has written and EOF to file 0 and now i am on
position/file=1, but executing *'mt -f $TAPE eod' *then shows:
*File number=1, block number=-1, partition=0.*


3) Question regarding encryption:

I create encrypted archives with the command above, rewind the tape, and
list via:

*dar_split split_input $TAPE | dar --list - --sequential-read --key
aes256:MyKey*

After pressing ENTER I got:
*Error while listing archive contents: too large elastic buffer or elastic
buffer incoherent structure*
(I am not getting this message when i am pressing CTRL-C after listing.)

If I am not using encryption/compression at all and do the same thing, i
dont get the Error either by pressing ENTER or CTRL-C. It just exists the
listing normally back up shell.
Why am i getting the error?

Much thanks for your help.


Am Di., 28. Apr. 2020 um 18:17 Uhr schrieb Denis Corbin <[email protected]>:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
>
> Hi,
>
> in complement of Mihai's explanations:
>
> 1) yes, --fs-root /foo/bar and --fs-root /foo/bar/ are equivalent
> and defines the root of the filesystem to backup (thus saved path are
> relative to it).
>
> you can restrict the backup to /foo/bar and have the "bar" part of path
> stored in the archive by doing that way:
>         dar --fs-root /foo --go-into bar
>
> it will save the same thing as using --fs-root /foo/bar but all the
> archive/backup content will be in a "bar" directory.
>
> 2) dar use an internal cache buffer, in addition compression and
> encryption algorithm, when used, also add each an additional buffer
> layer. But in any case you should see dar writing and reading
> archives/backups slices large blocks of data after large block of data
> around 51200 bytes or twice this size (it also depends on what the OS
> supports).
>
> dar_split also uses buffering (the maximum supported by the OS when
> this one provides information about that max value, else 102400 bytes)
>
> adding mbuffer between dar and dar_split does not bring performance
> gain to my point of view. As mentioned by Mihai this however will not
> cause any trouble, right.
>
> 3) in complement again, to have dar asking a password on stdin when
> creating an archive (it will do that automatically when reading an
> archive) just use '-K :' or if you want to specify the encryption
> algorithm -K aes256:
>
> You also have the possibility to add the "-K aes256:PasswordInPlainText"
> string in a file with restricted reading rights and use "-B <filename>"
> option on dar command-line. This way your password will not show on
> command-line and you can automate a backup process without worries.
>
> 4) lz4 and zstd are on the TODO list, benchmark comparative performance
> are linked to the library libdar will rely on to provide this feature.
> So if you have some info about the performances of available lz4 and
> zstd library performances let me know.
>
> 5a) by -C.. -A ... you probably mean you create an isolated catalogue
> from an backup and use that one as reference for further differential
> backup, right?
>
> you can feed these backup of their corresponding isolated catalogues
> to dar_manager. dar_manager will help you find identifying the backup
> you need to use for a given set of files (or a single file).
>
> 5b) from the outside, differential, incremental, decremental and full
> backups do not differ. This is just a dar archive format with specific
> information inside. As soon as you can set the correct tape at offset
> of the begining of a archive and upon dar_split request use the good nex
> t
> tape of the backup is split over several tapes, there should not be
> any problem if the data has not been corrupted on tape.
>
> Regards,
> Denis
>
> On 28/04/2020 00:59, Mihai Moldovan wrote:
> > * On 4/28/20 12:31 AM, Nils Privat wrote:
> >> Can I use mbuffer for it? Is anything bad with this command?
> >>
> >> dar --create - <..other options..> --fs-root /home/user1 |
> >> mbuffer -P 80 -m 2G -R 140M | dar_split split_output /dev/nst0
> >
> > Nothing obviously wrong. One issue might be that pipes itself are
> > already buffered, but that probably won't cause trouble.
> >
> >
> >> 3) To encrypt my tape backups I currently use: --key
> >> aes256:PasswordInPainText I don't like writing the password in
> >> plain text. To automate the backup a manual input is not an
> >> option. Can 'dar' read the password from file?
> >
> > This is mostly a non-issue. Since dar will take a password via
> > stdin if not provided on the command line, automation can be
> > achieved by pairing it with expect(1).
> >
> >
> >
> > Mihai
> >
> >
> -----BEGIN PGP SIGNATURE-----
>
> iQIzBAEBCAAdFiEEOzEprx3d76WjfYGPCDGwvQPYsYIFAl6oVt8ACgkQCDGwvQPY
> sYJsgBAAm9owaoAV9iq637Y+jxiw0gTlDvrVfhagNQO6NOMqRWGjK9+2u1yuzw3h
> Q/upqvZaLDqMcuNxHaWLWn3OAbQctVNKd18dTjKats4O8jJTUddA8/vWsxOfqjkj
> fbXYtciCRaZu0gMGHnGc8w0IA54T1ZdcXHwsiMogayJfu3Ss7niSAIMTgMuOeAhJ
> ca2zw43Q110HFNqoWlJpHSsFdaRk/3Gz0PuKyl1qBAl5Azk/7PPHODdkwTn6Ed88
> uFzDlvZyOMyRa5feO3xfowO3wHeGULV2feQT0uyd5tradBOOJSVzSL0u5HYbwNWP
> H9XFXRnbOECWr07vPELBN8UKDo4hMD8bz60OnjZyScfBOInPvI5YJAGXpmmeQL6N
> hChD4VJ95RdGVfNqjQtNnAj8hNmQ/j2/21SjBOEs/exPd2offUGPgvdBhzd+iaG9
> d3b3HSx+W+IUUXO/GWR6u5hJsmQpG3pg19Y43HBViHmO6LEjtHW9W5hECJmE5zbY
> pDz6GsoPtSD1muoTw0A0mXBnvLMgliq6alTc9Qb/8WN0G1gTMNWAb1Iv23eu34zJ
> RCtvwt31PwYXD7KNhTRajJzIgzJV1z8SSeHzS3Va6FFU8GowRlaWyIbi7zx8JdoH
> 0QVokWtlc5bycsQDAs05LRbqchb9Jn0lqvUKfvMo+vaHHDcumGU=
> =v548
> -----END PGP SIGNATURE-----
>
>
> _______________________________________________
> Dar-support mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/dar-support
>

_______________________________________________
Dar-support mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dar-support
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.