Re: Couple of questions regarding dar

Denis Corbin <[email protected]>
Newsgroups gmane.comp.sysutils.backup.dar.support
Message-ID <[email protected]>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

On 03/05/2020 11:45, Nils Privat wrote:
> Hello,

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 test1 MioThu Apr 27
> 17:47:59 2017A.rar* *..* *[Saved][ ][Saved][-L-][ 100%][X]
> -rwxrwxr--   test test1 MioThu Apr 27 17:47:59 2017E.rar* *No more
> data available from source, please do something!* *Press return
> when ready to continue or hit CTRL-C to abort* *

I guess you have to change of tape, then hit return for dar_split read
the next part of the archive

> * *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 test1 MioThu Apr 27 17:47:59 2017B.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?

this is the drawback of using tapes, as tape per nature provide
sequential read/write operations (OK you can rewind and fast forward a
tape, but as you have no offset information, this is not efficient to
randomly read or write data whenever possible).
So you have to provide the whole archive for dar to read its whole
content. If the archive has been split over several tapes you will
have to provide all tapes in the same order (and assume the are
rewinded at
the position where you have started writing the achive).

You still have the possibility to isolate a archive (on fly or
afterward) to ease the listing as well as differential/incremental backu
ps

> 
> 
> 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?

dar and dar_split does not know about magnetic tape (mt) specific EOF
marks (this is media specific). So yes, you should add after one using
'mt' after the end of an archive, espetially if you plan to add
another backup or file after this one on the same tape.

> 
> 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.*

first this is dar_split that writes to the tape special device. And
double checking dar_split code, once all bytes are written, dar syncs
(should be useless for tape but it does not hurt) then just closes the
file it was writing to. This should not set a mt EOF mark AFAIK.

> 
> 
> 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*

for reading you don't need to use --key option (but you can) if you
prefer to have your password visibile to all on process command line ;)

> 
> 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.)

this is either a wrong password, a wrong offset of the tape, or some
other incoherence between the creation time and reading time.

I've just tested this using a named pipe (mkfifo) to emulate a tape
and could create and read an ecrypted archive without problem. This is
not likely to be a bug, which version are you using by the way?

> 
> 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.
> 
> 
[...]

Cheers,
Denis
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEOzEprx3d76WjfYGPCDGwvQPYsYIFAl6xwwYACgkQCDGwvQPY
sYLojhAAsjgWSZGK2UxcY8edk2ZkPYIMmnJ1yk+fRjip+SkwcxjF89CPTQxbg0Dw
4DbE8+3TM+O84zDq9gXHnJR5vfW5cs9US4KMVuXLVH2nPKhLJ5PPueaz1VftNE0r
aEo48tXNqwRelSJuRyNvklrS7E/Jn0n7LLVkSuc6p07iYyl8hzIlkN85TN80v2V1
1MLBuEXPHXsg2LEY1Wyv0f9REHY66w1YTvSSsVK/e3Zjhl8iQMdPTpe42sBu+hVQ
qdNAHKZfPxQ0JR71kOhfori+BzvvYxPUiqdONscf6N7voWa2miihyzFVvvcGn+hg
dRqBtse8zK7gCqsl1ylnWoXNgwZX0n9jhCUzRhFVYMQz642WJ08It/bsSvVK8L7s
5iIYhbp6PotX5IfXXv+iw5MoIq2UnFLyCCrjhQz65tjrP7KSUJAvHsXjpWO5LQI3
UU1fKpIe/nn7oetDMZcEoaRHJVlxMpcA0/Rt6keK+cno/JwEWoDp/uo4755lJDhd
+HeAsN7DLy2/dFukDtPgIlEPU2xYPN5ua0OZWJ2+2bG2DAl3pP5e3R7WQbLA679/
fcmwNfOUva417jKNoR5CPfy6aX48BjFj9wtdmLnWDwmWZFoMvcLh4nFKkssJ4JWF
1ivHhPKHwmsohhHnRaNafaD/CB0jMh3CessyRdoEVT/+2H37N7U=
=+TZs
-----END PGP SIGNATURE-----
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.