debian-user:
I am migrating data between machines and operating systems (Debian 9 and
FreeBSD 12.1) and would like to do file integrity checking:
https://www.techrepublic.com/blog/it-security/use-mtree-for-filesystem-integrity-auditing/
It works on FreeBSD:
https://www.freebsd.org/cgi/man.cgi?mtree(8)
2020-01-15 11:22:01 toor@soho ~
# freebsd-version ; uname -a
12.1-RELEASE-p1
FreeBSD soho.tracy.holgerdanske.com 12.1-RELEASE-p1 FreeBSD
12.1-RELEASE-p1 GENERIC amd64
2020-01-15 11:22:23 toor@soho ~
# time mtree -p /jail/cvs/var/local/cvs -c -K sha256digest >
mtree/soho-jail-cvs-var-local-cvs-20200115-1121.txt
real 0m2.186s
user 0m1.775s
sys 0m0.411s
2020-01-15 11:22:43 toor@soho ~
# ll mtree/
total 2565
-rw-r--r-- 1 root wheel 3192822 2020/01/15 11:22:43
soho-jail-cvs-var-local-cvs-20200115-1121.txt
2020-01-15 11:29:12 toor@soho ~
# head mtree/soho-jail-cvs-var-local-cvs-20200115-1121.txt
# user: toor
# machine: soho.tracy.holgerdanske.com
# tree: /jail/cvs/var/local/cvs
# date: Wed Jan 15 11:22:41 2020
# .
/set type=file uid=0 gid=0 mode=0755 nlink=1 flags=uarch
. type=dir nlink=3 time=1558489907.768888000
# ./dpchrist
The equivalent tool is pronounced fmtree(8) on Debian (package
freebsd-buildutils). It does not seem to understand the sha256digest
keyword (?):
https://manpages.debian.org/stretch/freebsd-buildutils/fmtree.8.en.html
2020-01-15 11:23:24 root@po ~
# cat /etc/debian_version ; uname -a
9.11
Linux po 4.9.0-11-amd64 #1 SMP Debian 4.9.189-3+deb9u2 (2019-11-11)
x86_64 GNU/Linux
2020-01-15 11:24:20 root@po ~
# time fmtree -p /jail/cvs/var/local/cvs -c -K sha256digest >
mtree/soho-jail-cvs-var-local-cvs-20200115-1124.txt
fmtree: line 0: unknown keyword sha256digest
real 0m0.002s
user 0m0.000s
sys 0m0.000s
Any suggestions?
TIA,
David