From owner-freebsd-stable Sat Jul 27 6:50:28 2002 Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A11C837B400; Sat, 27 Jul 2002 06:50:23 -0700 (PDT) Received: from cage.simianscience.com (cage.simianscience.com [64.7.134.1]) by mx1.FreeBSD.org (Postfix) with ESMTP id A7D5043E3B; Sat, 27 Jul 2002 06:50:22 -0700 (PDT) (envelope-from mike@sentex.net) Received: from house.sentex.net (fcage [192.168.0.2]) by cage.simianscience.com (8.12.5/8.12.3) with ESMTP id g6RDoJ1A012761; Sat, 27 Jul 2002 09:50:20 -0400 (EDT) (envelope-from mike@sentex.net) Message-Id: <5.1.0.14.0.20020727093841.070dac78@192.168.0.12> X-Sender: mdtancsa@192.168.0.12 X-Mailer: QUALCOMM Windows Eudora Version 5.1 Date: Sat, 27 Jul 2002 09:48:31 -0400 To: stable@FreeBSD.ORG From: Mike Tancsa Subject: Changes to tar (was Re: strange SSH / tar problem) In-Reply-To: <5.1.1.6.0.20020726155650.06c6f578@marble.sentex.ca> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-Virus-Scanned: amavis-20020220 Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Actually, someone pointed out this is a tar problem. I forgot that RELENG_4 has a whole new version of tar. tar (GNU tar) 1.13.25 vs 1.11.2. Old version of tar both forms work fine. granite# tar -czf t.tgz /tmp/root granite# tar -czf - /tmp/root > t2.tgz granite# tar -tzf t2.tgz root/ root/ps.out root/m.sort root/q.out root/nestat.out root/m.list root/s.dead root/s1 root/s2 root/exp.list root/dead.txt root/dsl.out root/code-red.txt root/mail.access.times root/own.txt root/ms.rot root/dead.sort root/files.txt root/mail.list root/f.out root/m.dort root/du.out root/list.txt root/list.txt2 root/dead.list root/deadmail/ granite# ls -l *.tgz -rw-r--r-- 1 root wheel 1424563 Jul 27 09:44 t.tgz -rw-r--r-- 1 root wheel 1424563 Jul 27 09:45 t2.tgz granite# new version of tar news% tar -czf - test-files > t2.tgz news% tar -czf t.tgz test-files news% tar -tzf t2.tgz test-files/ test-files/ps.out test-files/netstat.out test-files/mount.out test-files/ipfw.out test-files/if.out test-files/t.zip gzip: stdin: decompression OK, trailing garbage ignored tar: Child returned status 2 tar: Error exit delayed from previous errors news% ls -l *.tgz -rw-r--r-- 1 mdtancsa wheel 4320 Jul 27 09:46 t.tgz -rw-r--r-- 1 mdtancsa wheel 10240 Jul 27 09:46 t2.tgz news% At 04:13 PM 7/26/2002 -0400, Mike Tancsa wrote: >On a number of my servers I use tar via ssh to do frequent backups of >files to a central backup server. The backup server is running an older >ssh, but the same problem happens with the most recent versions. > >SSH-1.99-OpenSSH_2.9 FreeBSD localisations 20020307 > >If I do a tar over ssh the resulting file has an error at the end. > >e.g. source is running SSH-1.99-OpenSSH_3.4p1 FreeBSD-20020702 >destination (20020307) >tar -cpzf - /etc /usr/local/etc | /usr/bin/ssh >userid@on-backup-server.example.com "cat - > >/path-to-files/userid/backup.`date "+%y%m%d"`.tgz" > > >When I go to test the file, I get > >tar -tzf backup.020726.tgz > >usr/local/etc/apache.bak/httpd.conf.default > >gzip: stdin: decompression OK, trailing garbage ignored >usr/local/etc/apache.bak/access.conf.default >usr/local/etc/apache.bak/access.conf >tar: child returned status 2 > >It seems to work OK, but I was a bit surprised about the warning message > > From the source server >md5 * >MD5 (t.zip) = 868cd7e432dc2ad7049a2c61a2403194 >MD5 (t2.zip) = 90279347e332762c0fc43798b4ae4d57 >MD5 (webalizer.conf) = dd948a77ba729a471f7ade18088b3680 >tar -cpzf - /tmp/test-files | /usr/bin/ssh userid@backupserver.example.com >"cat - > /path-to-files/userid/testb.`date "+%y%m%d"`.tgz" > >and the target server > >tar -xzf testb.020726.tgz > >gzip: stdin: decompression OK, trailing garbage ignored >tar: child returned status 2 > >cd test-files/ >backupserver# md5 * >MD5 (t.zip) = 868cd7e432dc2ad7049a2c61a2403194 >MD5 (t2.zip) = 90279347e332762c0fc43798b4ae4d57 >MD5 (webalizer.conf) = dd948a77ba729a471f7ade18088b3680 > > >The sshd_config and ssh_config on both machines are stock. If I got from a >stable box as of today to another stable box as of today, the same error >happens. > > ---Mike >-------------------------------------------------------------------- >Mike Tancsa, tel +1 519 651 3400 >Sentex Communications, mike@sentex.net >Providing Internet since 1994 www.sentex.net >Cambridge, Ontario Canada www.sentex.net/mike > > >To Unsubscribe: send mail to majordomo@FreeBSD.org >with "unsubscribe freebsd-stable" in the body of the message -------------------------------------------------------------------- Mike Tancsa, tel +1 519 651 3400 Sentex Communications, mike@sentex.net Providing Internet since 1994 www.sentex.net Cambridge, Ontario Canada www.sentex.net/mike To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message