Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Portage & Programming
  • Search

[Solved] tar (?) returned 141

Problems with emerge or ebuilds? Have a basic programming question about C, PHP, Perl, BASH or something else?
Post Reply
Advanced search
10 posts • Page 1 of 1
Author
Message
tkhobbes
Guru
Guru
User avatar
Posts: 367
Joined: Fri Nov 12, 2004 8:46 am
Location: Switzerland
Contact:
Contact tkhobbes
Website

[Solved] tar (?) returned 141

  • Quote

Post by tkhobbes » Sat Sep 01, 2007 8:41 pm

Hi all

I am using rsnapshot to backup my client regularly; it writes the snapshot in a separate directory, and after backing up, the plan was to tar everything onto a Samba-share (which itself is backed up regularly).
In order to do so, I wrote a tiny script called "makebackuptar", which is defined as "cmd_postexec" in rsnapshot.conf.
Now, whenever I run "sudo rsnapshot client" (where client is the rulename), after the backup procedere, I get this message:

Code: Select all

WARNING: cmd_postexec "/home/thomas/bin/makebackuptar" returned 141
Here's how "makebackuptar" looks like:

Code: Select all

#!/bin/sh
cd /dir-with-snapshots
tar -cjf /samba-share/.clientbackup.tar.bz2 .client-backup
Now, I have absolutely no idea what this 141 return means - I have tried to search for it, but could not find anything meaningful... is that a return code of tar?
Last edited by tkhobbes on Wed Sep 26, 2007 2:45 pm, edited 1 time in total.
My systems and some screenshots: http://www.hobbes.ch/techie/
My Gentoo client installation page: http://www.hobbes.ch/techie/gentoo-client/
My Gentoo Server installation: http://www.hobbes.ch/category/server
Top
didymos
Advocate
Advocate
User avatar
Posts: 4798
Joined: Mon Oct 10, 2005 2:09 am
Location: California

  • Quote

Post by didymos » Sat Sep 01, 2007 9:29 pm

An exit code >129 indicates a termination due to a signal. You get the signal by subtracting 128: 141 - 128 = 13, which corresponds to SIGPIPE (man kill has the listing of signals used w/numbers). So, you've got an issue with a pipe, but that's all I can get from it.
Thomas S. Howard
Top
truc
Advocate
Advocate
User avatar
Posts: 3199
Joined: Mon Jul 25, 2005 9:24 am

  • Quote

Post by truc » Sat Sep 01, 2007 10:00 pm

dumb question, is the script executable?
The End of the Internet!
Top
tkhobbes
Guru
Guru
User avatar
Posts: 367
Joined: Fri Nov 12, 2004 8:46 am
Location: Switzerland
Contact:
Contact tkhobbes
Website

  • Quote

Post by tkhobbes » Sun Sep 02, 2007 9:37 am

Thanks guys, so far! :)

I don't understand what SIGPIPE means (btw, man kill does not show the list of signals - but then again, my workstation uses German, so I get the german manpage... I'll look it up on the Internet, then)

Here's the ls for the script in question:

Code: Select all

-rwxr-xr-x 1 thomas users  97 16. Aug 20:03 makebackuptar
As you can see, the script belongs to my "normal" user... and it is executable for all.
My systems and some screenshots: http://www.hobbes.ch/techie/
My Gentoo client installation page: http://www.hobbes.ch/techie/gentoo-client/
My Gentoo Server installation: http://www.hobbes.ch/category/server
Top
didymos
Advocate
Advocate
User avatar
Posts: 4798
Joined: Mon Oct 10, 2005 2:09 am
Location: California

  • Quote

Post by didymos » Sun Sep 02, 2007 9:50 am

Here:
SIGNALS
The signals listed below may be available for use with kill. When known constant, numbers and default behavior are shown.

Name Num Action Description

HUP 1 exit
INT 2 exit
KILL 9 exit this signal may not be blocked
PIPE 13 exit
ALRM 14 exit
POLL exit
PROF exit
TERM 15 exit
USR1 exit
USR2 exit
VTALRM exit
STKFLT exit may not be implemented
PWR ignore may exit on some systems
WINCH ignore
CHLD ignore
URG ignore
TSTP stop may interact with the shell
TTIN stop may interact with the shell
TTOU stop may interact with the shell
STOP stop this signal may not be blocked
CONT restart continue if stopped, otherwise ignore
ABRT 6 core
FPE 8 core
ILL 4 core
QUIT 3 core
SEGV 11 core
TRAP 5 core
SYS core may not be implemented
EMT core may not be implemented
BUS core core dump may fail
XCPU core core dump may fail
XFSZ core core dump may fail

SIGPIPE means some process tried writing to a pipe, but there wasn't anything on the other end of it.
Thomas S. Howard
Top
tkhobbes
Guru
Guru
User avatar
Posts: 367
Joined: Fri Nov 12, 2004 8:46 am
Location: Switzerland
Contact:
Contact tkhobbes
Website

  • Quote

Post by tkhobbes » Sun Sep 02, 2007 10:33 am

Thanks - I found it in the meantime (the signal-list, I mean) :)

However, I still do not understand the pipe problem - where is a pipe in my script (I mean, it's not even a script - it's more like an MS-DOS batch file.... ;)
My systems and some screenshots: http://www.hobbes.ch/techie/
My Gentoo client installation page: http://www.hobbes.ch/techie/gentoo-client/
My Gentoo Server installation: http://www.hobbes.ch/category/server
Top
Rob1n
l33t
l33t
Posts: 714
Joined: Sat Nov 29, 2003 5:16 pm
Location: Cambridge, UK

  • Quote

Post by Rob1n » Sun Sep 02, 2007 10:59 am

There's almost certainly an implicit pipe in your tar command, passing the tarred data to bzip2.
Top
tkhobbes
Guru
Guru
User avatar
Posts: 367
Joined: Fri Nov 12, 2004 8:46 am
Location: Switzerland
Contact:
Contact tkhobbes
Website

  • Quote

Post by tkhobbes » Sun Sep 02, 2007 4:25 pm

OK, understood. But - what is the problem? Shall I use two commands, like tar first and then bzip?
Maybe it has to do with the file size - the resulting file is some 2.1GB big (and it's on a Samba share, maybe this does not work?)
My systems and some screenshots: http://www.hobbes.ch/techie/
My Gentoo client installation page: http://www.hobbes.ch/techie/gentoo-client/
My Gentoo Server installation: http://www.hobbes.ch/category/server
Top
Rob1n
l33t
l33t
Posts: 714
Joined: Sat Nov 29, 2003 5:16 pm
Location: Cambridge, UK

  • Quote

Post by Rob1n » Sun Sep 02, 2007 4:38 pm

Unless the Samba share is on FAT32 then this shouldn't be an issue. Check whether the command works when you run it manually - if so then try capturing the output of the tar command to file within the script:

Code: Select all

#!/bin/sh 
cd /dir-with-snapshots 
tar -cjf /samba-share/.clientbackup.tar.bz2 .client-backup > /tmp/backup.log 2>&1
Top
tkhobbes
Guru
Guru
User avatar
Posts: 367
Joined: Fri Nov 12, 2004 8:46 am
Location: Switzerland
Contact:
Contact tkhobbes
Website

  • Quote

Post by tkhobbes » Wed Sep 26, 2007 2:45 pm

OK, I found out what the problem was: Apparently, the files were getting too big for the samba share. I don't fully understand this, but apparently, files on the share shall not be bigger than 2GB or so...

Here's my final solution:

Code: Select all

#!/bin/sh
cd /dir-with-snapshots
tar -cjf .clientbackup.tar.bz2 .client-backup
split --byte=1000m .clientbackup.tar.bz2 .clientbackup.tar.bz2.split
mv .clientbackup.tar.bz2.split* /samba-share
rm .clientbackup.tar.bz2
My systems and some screenshots: http://www.hobbes.ch/techie/
My Gentoo client installation page: http://www.hobbes.ch/techie/gentoo-client/
My Gentoo Server installation: http://www.hobbes.ch/category/server
Top
Post Reply

10 posts • Page 1 of 1

Return to “Portage & Programming”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy