From owner-freebsd-questions@freebsd.org Sat Feb 3 19:35:07 2018 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D66B3EE66AD for ; Sat, 3 Feb 2018 19:35:07 +0000 (UTC) (envelope-from news@mips.inka.de) Received: from mail.inka.de (quechua.inka.de [IPv6:2a04:c9c7:0:1073:217:a4ff:fe3b:e77c]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 795AB773E3 for ; Sat, 3 Feb 2018 19:35:07 +0000 (UTC) (envelope-from news@mips.inka.de) Received: from mips.inka.de (news@[127.0.0.1]) by mail.inka.de with uucp (rmailwrap 0.5) id 1ei3ac-0005Q9-F1; Sat, 03 Feb 2018 20:35:06 +0100 Received: from lorvorc.mips.inka.de (localhost [127.0.0.1]) by lorvorc.mips.inka.de (8.15.2/8.15.2) with ESMTP id w13JVTXv076103 for ; Sat, 3 Feb 2018 20:31:29 +0100 (CET) (envelope-from news@lorvorc.mips.inka.de) Received: (from news@localhost) by lorvorc.mips.inka.de (8.15.2/8.15.2/Submit) id w13JVTan076102 for freebsd-questions@freebsd.org; Sat, 3 Feb 2018 20:31:29 +0100 (CET) (envelope-from news) To: freebsd-questions@freebsd.org From: Christian Weisgerber Newsgroups: list.freebsd.questions Subject: Re: freebsd tar fails but not gtar ?!? Date: Sat, 3 Feb 2018 19:31:29 -0000 (UTC) Message-ID: References: <00d101d399eb$318a7c40$949f74c0$@shaw.ca> User-Agent: slrn/1.0.3 (FreeBSD) X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Feb 2018 19:35:08 -0000 On 2018-01-30, "Dale Scott" wrote: > Hi all. I noticed the tar backup of my WordPress content directory is > failing. How is it failing? The "Can't translate pathname" messages you quote are warnings, not errors. > It?s been suggested that locale on the system > isn?t set correctly. Does this sound familiar to anyone? Well, when I take a file with UTF-8-encoded non-ASCII characters in its name and tar it up in the POSIX locale, then I get the same warning. Clearly tar is trying to normalize path name encodings in some way. Unfortunately this is not documented. My best guess is that it tries to iconv(3) path names from the current locale encoding to UTF-8. If the path names are have an invalid encoding in the current locale, iconv(3) fails, prompting the warning. You can simply ignore the warnings. If you extract the archive under the same conditions as those when you created it, the path names will be just fine. Or you can make sure that the character encoding in your locale setting matches those of the file names you are backing up. Most likely something like LC_CTYPE=en_US.UTF-8 will do. If you don't understand what I'm talking about, you might want to read up on those topics. > Next, native freebsd tar with --posix flag That switches the archive format from the default ustar to pax, says the man page, but you're not looking at an archive format limitation. > (google found some Linux posts that indicated pre-posix tar had > a filename length limit) Unless you are using a time machine to post from the 1980s, "old" pre-POSIX tar is utterly irrelevant. -- Christian "naddy" Weisgerber naddy@mips.inka.de