LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-02-2016, 05:30 PM   #1
Cyrisse
LQ Newbie
 
Registered: Oct 2005
Posts: 2

Rep: Reputation: 0
Tar keeps reporting 99 character limit despite using posix option


Hi,

I'm using Ubuntu 14.04 with tar 1.27.1 to make daily backups.

I'm running a simple command like

Code:
tar -czf /tmp/webdev_backup.tgz *
That used to work fine, but since a few days, I'm suddenly getting many errors like

Code:
tar: bsa/wp-content/uploads/2014/09/copy-copy-cropped-copy-cropped-copy-cropped-cropped-header-musical1-1024x628.jpg: file name is too long (max 99); not dumped
So I learned that this is a limitation in the "gnu" format that this version of tar uses and using "ustar" or "posix" doesn't have this limitation.

So I tried all of the below:

Code:
tar --posix -czf /tmp/webdev_backup.tgz *
tar -czf --format=ustar /tmp/webdev_backup.tgz *
tar -czf --format=posix /tmp/webdev_backup.tgz *
tar -H posix -czf /tmp/webdev_backup.tgz *
But there's no change. I still get the errors. I couldn't find anyone having the same problem :-(.

I hope anyone has an idea for what might be wrong here... :-D

Thanks!
 
Old 05-02-2016, 07:13 PM   #2
rigor
Member
 
Registered: Sep 2011
Posts: 299

Rep: Reputation: Disabled
__________________________________________________

Last edited by rigor; 05-02-2016 at 07:55 PM. Reason: cancelled
 
Old 05-02-2016, 08:22 PM   #3
rigor
Member
 
Registered: Sep 2011
Posts: 299

Rep: Reputation: Disabled
Here's fun

As I've illustrated further below, I'm using Ubuntu 14.04.3 and tar 1.27.1.

Code:
~/extern/lq.org/tar_w_very_long_filenames $  cat /etc/*elease
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=14.04
DISTRIB_CODENAME=trusty
DISTRIB_DESCRIPTION="Ubuntu 14.04.3 LTS"
NAME="Ubuntu"
VERSION="14.04.3 LTS, Trusty Tahr"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 14.04.3 LTS"
VERSION_ID="14.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"


~/extern/lq.org/tar_w_very_long_filenames $  tar --version
tar (GNU tar) 1.27.1
Copyright (C) 2013 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.

Written by John Gilmore and Jay Fenlason.
AFAIK, the 99 char file name length limit is actually from the old v7 format.

If I put in my shell environment a variable that specifies options for tar, it can be overridden by a command line option. But ( it seems ) whether or not there is a slash specified on the command line as part of the path to the files to be archived, affects the operation as in the following sample runs.


Code:
/tmp/tar_w_vary_long_filenames$ export TAR_OPTIONS='--format=v7'


/tmp/tar_w_vary_long_filenames $  tar -czvf tar_file bsa/*
bsa/wp-content/
bsa/wp-content/uploads/
bsa/wp-content/uploads/2014/
bsa/wp-content/uploads/2014/09/
tar: bsa/wp-content/uploads/2014/09/a-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-filename-indeed.txt: file name is too long (max 99); not dumped
tar: bsa/wp-content/uploads/2014/09/a_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_long_filename_indeed.txt: file name is too long (max 99); not dumped
tar: Exiting with failure status due to previous errors


/tmp/tar_w_vary_long_filenames$ tar -czvf tar_file *
a_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_long_filename_indeed.txt
bsa/
bsa/wp-content/
bsa/wp-content/uploads/
bsa/wp-content/uploads/2014/
bsa/wp-content/uploads/2014/09/
bsa/wp-content/uploads/2014/09/a-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-filename-indeed.txt
bsa/wp-content/uploads/2014/09/a_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_long_filename_indeed.txt
tar_file


/tmp/tar_w_vary_long_filenames$ tar -czvf --format=posix tar_file *
tar_file
a_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_long_filename_indeed.txt
bsa/
bsa/wp-content/
bsa/wp-content/uploads/
bsa/wp-content/uploads/2014/
bsa/wp-content/uploads/2014/09/
bsa/wp-content/uploads/2014/09/a-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-filename-indeed.txt
bsa/wp-content/uploads/2014/09/a_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_long_filename_indeed.txt
tar_file


/tmp/tar_w_vary_long_filenames$ tar -czvf --format=posix tar_file bsa/*
tar_file
bsa/wp-content/
bsa/wp-content/uploads/
bsa/wp-content/uploads/2014/
bsa/wp-content/uploads/2014/09/
tar: bsa/wp-content/uploads/2014/09/a-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-filename-indeed.txt: file name is too long (max 99); not dumped
tar: bsa/wp-content/uploads/2014/09/a_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_long_filename_indeed.txt: file name is too long (max 99); not dumped
tar: Exiting with failure status due to previous errors
/tmp/tar_w_vary_long_filenames $

Last edited by rigor; 05-02-2016 at 08:28 PM.
 
Old 05-03-2016, 02:52 AM   #4
Cyrisse
LQ Newbie
 
Registered: Oct 2005
Posts: 2

Original Poster
Rep: Reputation: 0
Thanks Rigor!

I eventually figured it out. Using --posix *did* make the errors about 99 characters go away, but there were others (about not being able to split filenames - some were very long indeed, based on weird URLs) and I just removed those files. Then I bumped into more stuff with link names that were too long :-). I was able to remove the stuff that was causing that too, fortunately.

So in summary, it should just work indeed.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Increasing POSIX message queue limit using - ulimit -q option newbee8 Linux - Newbie 0 02-10-2014 02:44 PM
POSIX Character Classes - Displaying Member Characters? brgr88 Programming 6 04-26-2013 11:09 PM
SetUID: limit the use with POSIX capabilities PlatinumX Linux - Security 3 11-22-2010 07:22 AM
(Korn Shell/POSIX) want to make sure last character in line is a space quadmore Programming 2 09-08-2008 10:57 AM
bash simple test with posix character class osio Programming 5 01-22-2006 08:23 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:00 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration