[Dar-support] include-from-file filename separator
For full, incremental, compressed and encrypted backups or archives
Brought to you by:
edrusb
|
From: Jean-Baptiste D. <jb...@pa...> - 2022-05-19 15:48:09
|
Hello everybody,
I'd like your advice before creating an issue. Maybe I'm missing something.
The documentation is quite clear about the include-from-file file separator:
-----
-[, --include-from-file <listing_file>
Files listed in the listing file are included for the operation. No wildcard expression is interpreted in the listing
file, the null character is not allowed and the carriage return is used to separate file names (one file name per line)
each line must not exceed 20479 bytes.
-----
Using carriage return as a separator could be problematic in case of a filename containing a... carriage return. And
breaks the use of find to build the listing.
> You can thus generate a listing file with the ’find / -print > somefile’ command and give ’somefile’ as argument
> to -[ option
Maybe a --include-from-file0 option would be valuable, so that we could use find / -print0 and dar in the same spirit as
find -print0 and xargs -0 ?
$ mkdir test
$ touch test/"$(printf "foo\nbar")"
$ find test -print > somefile
$ dar -vs -c carriage --include-from-file somefile -R ./test
Skipping file: /home/jbdenis/tmp/dar/test/foo
bar
--------------------------------------------
0 inode(s) saved
including 0 hard link(s) treated
0 inode(s) changed at the moment of the backup and could not be saved properly
0 byte(s) have been wasted in the archive to resave changing files
0 inode(s) with only metadata changed
0 inode(s) not saved (no inode/file change)
0 inode(s) failed to be saved (filesystem error)
1 inode(s) ignored (excluded by filters)
0 inode(s) recorded as deleted from reference backup
--------------------------------------------
Total number of inode(s) considered: 1
--------------------------------------------
EA saved for 0 inode(s)
FSA saved for 0 inode(s)
---------------------------
$
No problem using dar without the --include-from-file:
$ dar -c carriage -R ./test
--------------------------------------------
1 inode(s) saved
including 0 hard link(s) treated
0 inode(s) changed at the moment of the backup and could not be saved properly
0 byte(s) have been wasted in the archive to resave changing files
0 inode(s) with only metadata changed
0 inode(s) not saved (no inode/file change)
0 inode(s) failed to be saved (filesystem error)
0 inode(s) ignored (excluded by filters)
0 inode(s) recorded as deleted from reference backup
--------------------------------------------
Total number of inode(s) considered: 1
--------------------------------------------
EA saved for 0 inode(s)
FSA saved for 1 inode(s)
--------------------------------------------
$ dar -l carriage
[Data ][D][ EA ][FSA][Compr][S]| Permission | User | Group | Size | Date | filename
--------------------------------+------------+-------+-------+---------+-------------------------------+------------
[Saved][ ] [-L-][ ][ ] -rw-r--r-- jbdenis jbdenis 0 Thu May 19 17:10:31 2022 foo
bar
What do you think ?
Thank you.
Jean-Baptiste
|