bug-tar
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-tar] Possible Bug for TAR cmd for Linux


From: IDRUGO, ALVARO (ALVARO)** CTR **
Subject: Re: [Bug-tar] Possible Bug for TAR cmd for Linux
Date: Mon, 5 May 2014 15:16:20 +0000

By the way,

The space in that directory always enough to warranty normal operations per day

 

linus> df -h /osp/psmf/service/ce20/accounting

Filesystem            Size  Used Avail Use% Mounted on

/dev/mapper/vg--psmf-lvol--psmf

                      941G  627G  266G  71% /osp/psmf

 

Best regards

 

Alv

 

From: IDRUGO, ALVARO (ALVARO)** CTR **
Sent: lunes, 05 de mayo de 2014 10:03 a.m.
To: IDRUGO, ALVARO (ALVARO)** CTR **; address@hidden
Subject: RE: Possible Bug for TAR cmd for Linux

 

Hi Guys,

 

This is our script that was performing a regular basis compression

Until suddenly stopped of doing that.

 

cat /osp/psmf/service/ce20/accounting/CDR_clean.sh

#!/bin/bash

 

# This script will zip CDR_DOWN created previous day in interval 00:00 -> 23:59

# Please use it like : ./CDR_clean.sh

# Modified by Sorin Saulescu in 15.10.2013 by zip/delete CDRs created in the previuos day 00->23:59

 

archive=/osp/psmf/service/ce20/accounting/CDR_Backup_`date +"%Y-%m-%d" --date="-1 day"`.tar.gz

log=/osp/psmf/service/ce20/accounting/CDR_Clean.log

set -x

echo "Archive CDR Generation (Files created previous day) started on : `date`" >>${log}

cd /osp/psmf/service/ce20/accounting

find ./ -maxdepth 1 -type f -name '*_DOWN' -daystart -mtime 1 | xargs tar czf ${archive} 1>>${log}

echo "Archive CDR Generation (Files created previous day) finished on :  `date`" >>${log}

set +x

#find ./ -maxdepth 1 -type f -name '*_DOWN' -daystart -mtime 1 -exec rm -f {} \;

#echo "Archive CDR Removed (Files created previous day) on :  `date`" >>${log}

linus>

 

The only modification done has been done Friday May 02 from  tar cvzf into  tar czf but this is not

Helping I  think, cos’ same results still there:

 

linus> ls -lasth *.tar.gz

137M -rw-r--r-- 1 linus in 137M May  5 04:08 CDR_Backup_2014-05-04.tar.gz

338M -rw-r--r-- 1 linus in 338M May  4 04:09 CDR_Backup_2014-05-03.tar.gz

341M -rw-r--r-- 1 linus in 341M May  3 04:08 CDR_Backup_2014-05-02.tar.gz

174M -rw-r--r-- 1 linus in 174M May  2 04:08 CDR_Backup_2014-05-01.tar.gz

373M -rw-r--r-- 1 linus in 373M May  1 04:08 CDR_Backup_2014-04-30.tar.gz

250M -rw-r--r-- 1 linus in 250M Apr 30 04:08 CDR_Backup_2014-04-29.tar.gz

222M -rw-r--r-- 1 linus in 222M Apr 29 04:08 CDR_Backup_2014-04-28.tar.gz

16M -rw-r--r-- 1 linus in  16M Apr 28 04:07 CDR_Backup_2014-04-27.tar.gz

234M -rw-r--r-- 1 linus in 234M Apr 27 04:08 CDR_Backup_2014-04-26.tar.gz

234M -rw-r--r-- 1 linus in 234M Apr 26 04:08 CDR_Backup_2014-04-25.tar.gz

173M -rw-r--r-- 1 linus in 173M Apr 25 04:07 CDR_Backup_2014-04-24.tar.gz

209M -rw-r--r-- 1 linus in 209M Apr 24 04:08 CDR_Backup_2014-04-23.tar.gz

192M -rw-r--r-- 1 linus in 192M Apr 23 04:08 CDR_Backup_2014-04-22.tar.gz

160M -rw-r--r-- 1 linus in 160M Apr 22 04:07 CDR_Backup_2014-04-21.tar.gz

1.6G -rw-r--r-- 1 linus in 1.6G Apr 21 04:06 CDR_Backup_2014-04-20.tar.gz

45M -rw-r--r-- 1 linus in  45M Apr 20 04:07 CDR_Backup_2014-04-19.tar.gz

1.5G -rw-r--r-- 1 linus in 1.5G Apr 19 04:06 CDR_Backup_2014-04-18.tar.gz

1.6G -rw-r--r-- 1 linus in 1.6G Apr 18 04:07 CDR_Backup_2014-04-17.tar.gz

 

Any clue?

This is Redhat box, not solaris.

Any help would be appreciate it,

Thanks

Alv

 

 

From: bug-tar-bounces+address@hidden [mailto:bug-tar-bounces+address@hidden] On Behalf Of IDRUGO, ALVARO (ALVARO)** CTR **
Sent: viernes, 02 de mayo de 2014 11:47 a.m.
To: address@hidden
Subject: [Bug-tar] Possible Bug for TAR cmd for Linux

 

Hi Dear friends

 

I just subscribe to your org in hope to receive a help for a matter happened in our Linux server.

We are using a Linux Redhat box:

 linus> uname -a

Linux 2.6.18-308.el5 #1 SMP Fri Jan 27 17:17:51 EST 2012 x86_64 x86_64 x86_64 GNU/Linux

 

We for many time ago using a tar command in crontab for compressing every day files and deleting the older ones

For more than 30 days. We detected an issue when our script is compressing files and they are now only ¼ of the regular ones

Created in the server. we see it compress sometimes OK others days not. Although the files

Are correctly processed by billing platform and none is lost for our customer, it give us a problem when

Trying to recovery a file from the zipped ones because the one(s) we want to recovery for analysis sometimes are

not present in the tar file.

The regular and normal size per compressed file per day is always 1.6 G~ 1.5G.

But as seen below, we got less than ¼ of that size or much less. We suspect from a tar bug ?

Highlighted in green the good ones, in red the bad ones.

 

Here and example:

174M -rw-r--r-- 1 linus in 174M May  2 04:08 CDR_Backup_2014-05-01.tar.gz

373M -rw-r--r-- 1 linus in 373M May  1 04:08 CDR_Backup_2014-04-30.tar.gz

250M -rw-r--r-- 1 linus in 250M Apr 30 04:08 CDR_Backup_2014-04-29.tar.gz

222M -rw-r--r-- 1 linus in 222M Apr 29 04:08 CDR_Backup_2014-04-28.tar.gz

16M -rw-r--r-- 1 linus in  16M Apr 28 04:07 CDR_Backup_2014-04-27.tar.gz

234M -rw-r--r-- 1 linus in 234M Apr 27 04:08 CDR_Backup_2014-04-26.tar.gz

234M -rw-r--r-- 1 linus in 234M Apr 26 04:08 CDR_Backup_2014-04-25.tar.gz

173M -rw-r--r-- 1 linus in 173M Apr 25 04:07 CDR_Backup_2014-04-24.tar.gz

209M -rw-r--r-- 1 linus in 209M Apr 24 04:08 CDR_Backup_2014-04-23.tar.gz

192M -rw-r--r-- 1 linus in 192M Apr 23 04:08 CDR_Backup_2014-04-22.tar.gz

160M -rw-r--r-- 1 linus in 160M Apr 22 04:07 CDR_Backup_2014-04-21.tar.gz

1.6G -rw-r--r-- 1 linus in 1.6G Apr 21 04:06 CDR_Backup_2014-04-20.tar.gz

45M -rw-r--r-- 1 linus in  45M Apr 20 04:07 CDR_Backup_2014-04-19.tar.gz

1.5G -rw-r--r-- 1 linus in 1.5G Apr 19 04:06 CDR_Backup_2014-04-18.tar.gz

1.6G -rw-r--r-- 1 linus in 1.6G Apr 18 04:07 CDR_Backup_2014-04-17.tar.gz

181M -rw-r--r-- 1 linus in 181M Apr 17 04:07 CDR_Backup_2014-04-16.tar.gz

80M -rw-r--r-- 1 linus in  80M Apr 16 04:07 CDR_Backup_2014-04-15.tar.gz

62M -rw-r--r-- 1 linus in  62M Apr 15 04:07 CDR_Backup_2014-04-14.tar.gz

1.6G -rw-r--r-- 1 linus in 1.6G Apr 14 04:06 CDR_Backup_2014-04-13.tar.gz

74M -rw-r--r-- 1 linus in  74M Apr 13 04:07 CDR_Backup_2014-04-12.tar.gz

86M -rw-r--r-- 1 linus in  86M Apr 12 04:07 CDR_Backup_2014-04-11.tar.gz

24M -rw-r--r-- 1 linus in  24M Apr 11 04:07 CDR_Backup_2014-04-10.tar.gz

8.4M -rw-r--r-- 1 linus in 8.4M Apr 10 04:07 CDR_Backup_2014-04-09.tar.gz

316K -rw-r--r-- 1 linus in 313K Apr  9 04:07 CDR_Backup_2014-04-08.tar.gz

1.6G -rw-r--r-- 1 linus in 1.6G Apr  8 04:07 CDR_Backup_2014-04-07.tar.gz

1.5G -rw-r--r-- 1 linus in 1.5G Apr  7 04:06 CDR_Backup_2014-04-06.tar.gz

1.3M -rw-r--r-- 1 linus in 1.3M Apr  6 04:07 CDR_Backup_2014-04-05.tar.gz

147M -rw-r--r-- 1 linus in 147M Apr  5 04:07 CDR_Backup_2014-04-04.tar.gz

1.6G -rw-r--r-- 1 linus in 1.6G Apr  4 04:06 CDR_Backup_2014-04-03.tar.gz

1.6G -rw-r--r-- 1 linus in 1.6G Apr  3 04:07 CDR_Backup_2014-04-02.tar.gz

14M -rw-r--r-- 1 linus in  14M Apr  2 04:07 CDR_Backup_2014-04-01.tar.gz

1.6G -rw-r--r-- 1 linus in 1.6G Apr  1 04:06 CDR_Backup_2014-03-31.tar.gz

 

The crontab lines used for creating these daily Backups are:

 

Crontab –l

55 3 * * * test -d /osp/psmf/service/ce20/ && (find /osp/psmf/service/ce20/accounting/CDR_Backup_*.tar.gz -mtime +30 -type f -name 'CDR_Backup_*.tar.gz' -exec rm {} \; >> /osp/local/home/linus/anthony/Archive_Remove.log) > /dev/null

#0 4 * * * test -d /osp/psmf/service/ce20/ && (/osp/psmf/service/ce20/accounting/CDR_clean.sh >> /osp/local/home/linus/anthony/Archive_Generation.log) > /dev/null 2>&1

0 4 * * * /osp/psmf/service/ce20/accounting/CDR_clean.sh >> /osp/local/home/linus/anthony/Archive_Generation.log 2>&1

 

The highlighted blue line is the one we always has been used and working fine for years without any issue till now. As said before we detected this is not properly compressing the files as used to be.

We changed that line(blue one) into the yellow one to see if the result changed but results still same(see output after modification done in the line for May 2)

 

Our tar version is:

 

linus> tar --version

tar (GNU tar) 1.15.1

 

NOTE: If we manually run tar for compressing, it works fine, getting inside the tar file all the files but the archived compressed(by crontab) one not at all.

 

We wonder if you have Heard or experienced this matter before?

Any help will be welcome

Thanks in advance

 

Alv


reply via email to

[Prev in Thread] Current Thread [Next in Thread]