Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 30 Jan 2018 09:55:53 -0700
From:      "Dale Scott" <dalescott@shaw.ca>
To:        <freebsd-questions@freebsd.org>
Subject:   freebsd tar fails but not gtar ?!?
Message-ID:  <00d101d399eb$318a7c40$949f74c0$@shaw.ca>

next in thread | raw e-mail | index | archive | help
Hi all.  I noticed the tar backup of my WordPress content directory is
failing. It may be coincidental that the filenames tar is failing are =
longer
than 99-characters, which was reportedly a failing of the =93old=94 tar. =
I
installed gtar from packages and it completes successfully. Adding =
=96posix to
the tar command doesn=92t help. It=92s been suggested that locale on the =
system
isn=92t set correctly. Does this sound familiar to anyone?

=20

Fwiw, the failing long filenames were auto-generated by WordPress. I was
writing a blog post in Chrome on a Windows system and found I could =
paste
images from the Windows clipboard directly into the WordPress editor.

=20

Thanks,

Dale

=20

dale@whizzer:~ % uname -a

FreeBSD whizzer.dalescott.net 11.1-RELEASE-p4 FreeBSD 11.1-RELEASE-p4 =
#0:
Tue Nov 14 06:12:40 UTC 2017
root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  amd64

=20

First, basic native tar on FreeBSD 11.1

=20

dale@whizzer:~ % sudo tar cf
/backup/yyyy-mm-dd/webapps/wordpress_wp-content.tar
/usr/local/www/wordpress/wp-content

tar: Removing leading '/' from member names

: Can't translate pathname
'usr/local/www/wordpress/wp-content/uploads/2018/01/2018-01-25-14_52_00-f=
ix-
Removed-leave-and-join-chapter-web-pages-by-vishdha-=C2=B7-Pull-Request-1=
11-=C2=B7-.
png' to UTF-8: Can't translate pathname
'usr/local/www/wordpress/wp-content/uploads/2018/01/2018-01-25-14_52_00-f=
ix-
Removed-leave-and-join-chapter-web-pages-by-vishdha-=C2=B7-Pull-Request-1=
11-=C2=B7--
150x150.png' to UTF-8: Can't translate pathname
'usr/local/www/wordpress/wp-content/uploads/2018/01/2018-01-25-14_52_00-f=
ix-
Removed-leave-and-join-chapter-web-pages-by-vishdha-=C2=B7-Pull-Request-1=
11-=C2=B7--
300x201.png' to UTF-8: Can't translate pathname
'usr/local/www/wordpress/wp-content/uploads/2018/01/2018-01-25-14_52_00-f=
ix-
Removed-leave-and-join-chapter-web-pages-by-vishdha-=C2=B7-Pull-Request-1=
11-=C2=B7--
768x514.png' to UTF-8: Can't translate pathname
'usr/local/www/wordpress/wp-content/uploads/2018/01/2018-01-25-14_52_00-f=
ix-
Removed-leave-and-join-chapter-web-pages-by-vishdha-=C2=B7-Pull-Request-1=
11-=C2=B7--
1024x686.png' to UTF-8: Can't translate pathname
'usr/local/www/wordpress/wp-content/uploads/2018/01/2018-01-25-14_52_00-f=
ix-
Removed-leave-and-join-chapter-web-pages-by-vishdha-=C2=B7-Pull-Request-1=
11-=C2=B7--
100x100.png' to UTF-8dale@whizzer:~ % dale@whizzer:~ %

=20

Next, native freebsd tar with --posix flag (google found some Linux =
posts
that indicated pre-posix tar had a filename length limit)

=20

dale@whizzer:~ % sudo tar cf --posix
/backup/yyyy-mm-dd/webapps/wordpress_wp-content.tar
/usr/local/www/wordpress/wp-content

tar: Removing leading '/' from member names

: Can't translate pathname
'usr/local/www/wordpress/wp-content/uploads/2018/01/2018-01-25-14_52_00-f=
ix-
Removed-leave-and-join-chapter-web-pages-by-vishdha-=C2=B7-Pull-Request-1=
11-=C2=B7-.
png' to UTF-8: Can't translate pathname
'usr/local/www/wordpress/wp-content/uploads/2018/01/2018-01-25-14_52_00-f=
ix-
Removed-leave-and-join-chapter-web-pages-by-vishdha-=C2=B7-Pull-Request-1=
11-=C2=B7--
150x150.png' to UTF-8: Can't translate pathname
'usr/local/www/wordpress/wp-content/uploads/2018/01/2018-01-25-14_52_00-f=
ix-
Removed-leave-and-join-chapter-web-pages-by-vishdha-=C2=B7-Pull-Request-1=
11-=C2=B7--
300x201.png' to UTF-8: Can't translate pathname
'usr/local/www/wordpress/wp-content/uploads/2018/01/2018-01-25-14_52_00-f=
ix-
Removed-leave-and-join-chapter-web-pages-by-vishdha-=C2=B7-Pull-Request-1=
11-=C2=B7--
768x514.png' to UTF-8: Can't translate pathname
'usr/local/www/wordpress/wp-content/uploads/2018/01/2018-01-25-14_52_00-f=
ix-
Removed-leave-and-join-chapter-web-pages-by-vishdha-=C2=B7-Pull-Request-1=
11-=C2=B7--
1024x686.png' to UTF-8: Can't translate pathname
'usr/local/www/wordpress/wp-content/uploads/2018/01/2018-01-25-14_52_00-f=
ix-
Removed-leave-and-join-chapter-web-pages-by-vishdha-=C2=B7-Pull-Request-1=
11-=C2=B7--
100x100.png' to UTF-8dale@whizzer:~ %

=20

Finally with gtar

=20

dale@whizzer:~ % gtar --version

tar (GNU tar) 1.29

Copyright (C) 2015 Free Software Foundation, Inc.

License GPLv3+: GNU GPL version 3 or later
<http://gnu.org/licenses/gpl.html>.

This is free software: you are free to change and redistribute it.

There is NO WARRANTY, to the extent permitted by law.

=20

Written by John Gilmore and Jay Fenlason.

dale@whizzer:~ % sudo gtar cf
/backup/yyyy-mm-dd/webapps/wordpress_wp-content.tar
/usr/local/www/wordpress/wp-content

gtar: Removing leading `/' from member names dale@whizzer:~ % ls
/backup/yyyy-mm-dd/webapps/wordpress_wp-content.tar

/backup/yyyy-mm-dd/webapps/wordpress_wp-content.tar

dale@whizzer:~ % ls -lh =
/backup/yyyy-mm-dd/webapps/wordpress_wp-content.tar

-rw-r--r--  1 root  wheel   505M Jan 28 19:46
/backup/yyyy-mm-dd/webapps/wordpress_wp-content.tar

dale@whizzer:~ %

=20

Output of locale:

=20

dale@whizzer:~ % sudo locale

LANG=3D

LC_CTYPE=3D"C"

LC_COLLATE=3D"C"

LC_TIME=3D"C"

LC_NUMERIC=3D"C"

LC_MONETARY=3D"C"

LC_MESSAGES=3D"C"

LC_ALL=3D

dale@whizzer:~ %

=20

=20

=20

---

Dale R. Scott, P.Eng.

Web: http://www.dalescott.net <http://www.dalescott.net/>=20

=20




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?00d101d399eb$318a7c40$949f74c0$>