FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 06-02-2011, 02:13 AM
lrhorer
 
Default tar --remove-files chokes on symlinks

I have a cron script that runs tar on a directory in order to clean it
up and minimize its size. I run the command:

tar cf Backup_Server.tar.gz --remove-files *

but during the tar process I get the errors:

tar: /RAID/System/Backup/bin: Cannot rmdir: Directory not empty
tar: Exiting with failure status due to previous errors

When I look in /RAID/System/Backup/bin, all that is left are a number of
symlinks. Evidently, tar is unable to delete the symlinks prior to
attempting the directory delete. If it makes a difference, these
symlinks actually point to nothing. In any case, how can I get tar to
delete the links and complete the job?


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 1e6dnX7RQJ9RbHvQnZ2dnUVZ5gOdnZ2d@giganews.com">htt p://lists.debian.org/1e6dnX7RQJ9RbHvQnZ2dnUVZ5gOdnZ2d@giganews.com
 
Old 06-02-2011, 05:33 AM
Sven Joachim
 
Default tar --remove-files chokes on symlinks

On 2011-06-02 04:13 +0200, lrhorer wrote:

> I have a cron script that runs tar on a directory in order to clean it
> up and minimize its size. I run the command:
>
> tar cf Backup_Server.tar.gz --remove-files *
>
> but during the tar process I get the errors:
>
> tar: /RAID/System/Backup/bin: Cannot rmdir: Directory not empty
> tar: Exiting with failure status due to previous errors
>
> When I look in /RAID/System/Backup/bin, all that is left are a number of
> symlinks. Evidently, tar is unable to delete the symlinks prior to
> attempting the directory delete. If it makes a difference, these
> symlinks actually point to nothing. In any case, how can I get tar to
> delete the links and complete the job?

This is a known bug¹ in tar 1.23. Upgrading to the wheezy version helps,
if that is an option for you.

Sven


¹ http://lists.gnu.org/archive/html/bug-tar/2010-03/msg00026.html


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 877h94u79j.fsf@turtle.gmx.de">http://lists.debian.org/877h94u79j.fsf@turtle.gmx.de
 
Old 06-03-2011, 08:58 AM
lrhorer
 
Default tar --remove-files chokes on symlinks

Sven Joachim wrote:

> On 2011-06-02 04:13 +0200, lrhorer wrote:
>
>> I have a cron script that runs tar on a directory in order to clean
>> it
>> up and minimize its size. I run the command:
>>
>> tar cf Backup_Server.tar.gz --remove-files *
>>
>> but during the tar process I get the errors:
>>
>> tar: /RAID/System/Backup/bin: Cannot rmdir: Directory not empty
>> tar: Exiting with failure status due to previous errors
>>
>> When I look in /RAID/System/Backup/bin, all that is left are a number
>> of
>> symlinks. Evidently, tar is unable to delete the symlinks prior to
>> attempting the directory delete. If it makes a difference, these
>> symlinks actually point to nothing. In any case, how can I get tar
>> to delete the links and complete the job?
>
> This is a known bug¹ in tar 1.23. Upgrading to the wheezy version
> helps, if that is an option for you.

Oh, how cute. That's OK, I worked around the issue.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: LOadnXo7tMTbP3XQnZ2dnUVZ5t0AAAAA@giganews.com">htt p://lists.debian.org/LOadnXo7tMTbP3XQnZ2dnUVZ5t0AAAAA@giganews.com
 

Thread Tools




All times are GMT. The time now is 01:36 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org