problem while moving HOME from FreeBSD to MacOS with bsdtar
Date: Thu, 09 Mar 2023 07:43:28 UTC
I have had to move in my office from a FreeBSD in a VM to a Mac. To not loose my HOME I created a tar archive on FreeBSD and restored it with tar into the Mac (all details about versions see below). The tar archive contains a lot of dirs and file (~30.000) and one dir is guru/Mail where a mbox file guru/Mail/purism exists. It also exists a plain file guru/mail (note: the dir is with capital M). This leads on extract to the problem that guru/Mail is also created as a plain file, not as a directory and afterwards guru/Mail/purism can't created in it. Comments (apart of: don't use Mac)? Note also: Both system use bsdtar :-) matthias FreeBSD: $ uname -a FreeBSD c720-r368166 13.0-CURRENT FreeBSD 13.0-CURRENT #23 r368166M: Thu Dec 17 13:12:37 CET 2020 guru@c720-r368166:/usr/obj/usr/src/amd64.amd64/sys/GENERIC amd64 Mac: $ uname -a Darwin APITZM-1MBPOH 21.6.0 Darwin Kernel Version 21.6.0: Mon Aug 22 20:20:07 PDT 2022; root:xnu-8020.140.49~2/RELEASE_ARM64_T8110 arm64 $ tar tzvf guru-vm-r368166-last.tar.gz | grep -i guru/Mail drwx------ 0 guru wheel 0 27 Sep 2021 guru/Mail/ -rw-r--r-- 0 guru wheel 1013 8 Aug 2013 guru/mailKelpe.txt -rw-r--r-- 0 guru wheel 1508 24 Aug 2017 guru/mails.txt -rw-r--r-- 0 guru wheel 4016 9 Nov 12:36 guru/mail -rw------- 0 guru wheel 3043983 24 Sep 2021 guru/Mail/purism $ tar xzf guru-vm-r368166-last.tar.gz guru/Mail/purism: Could not stat guru/Mail/purism tar: Error exit delayed from previous errors. $ ls -ld guru/Mail guru/mail -rw-r--r-- 1 apitzm xxxx\Domain Users 4016 9 Nov 12:36 guru/Mail -rw-r--r-- 1 apitzm xxxx\Domain Users 4016 9 Nov 12:36 guru/mail $ tar tzvf guru-vm-r368166-last.tar.gz | cat -n | grep -i guru/mail 227 drwx------ 0 guru wheel 0 27 Sep 2021 guru/Mail/ 496 -rw-r--r-- 0 guru wheel 1013 8 Aug 2013 guru/mailKelpe.txt 497 -rw-r--r-- 0 guru wheel 1508 24 Aug 2017 guru/mails.txt 1065 -rw-r--r-- 0 guru wheel 4016 9 Nov 12:36 guru/mail 3583 -rw------- 0 guru wheel 3043983 24 Sep 2021 guru/Mail/purism FreeBSD: $ tar --version bsdtar 3.4.3 - libarchive 3.4.3 zlib/1.2.11 liblzma/5.2.5 bz2lib/1.0.8 libzstd/1.4.5 Mac: $ tar --version bsdtar 3.5.1 - libarchive 3.5.1 zlib/1.2.11 liblzma/5.0.5 bz2lib/1.0.8 -- Matthias Apitz, ✉ guru@unixarea.de, http://www.unixarea.de/ +49-176-38902045 Public GnuPG key: http://www.unixarea.de/key.pub