Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 27 Jul 2002 11:49:54 -0400
From:      Andy Sparrow <spadger@best.com>
To:        Mike Tancsa <mike@sentex.net>, stable@FreeBSD.ORG
Subject:   Re: Changes to tar (was Re: strange SSH / tar problem) 
Message-ID:  <20020727154954.E0E5A7C@CRWdog.demon.co.uk>
In-Reply-To: Your message of "Sat, 27 Jul 2002 09:48:31 EDT." <5.1.0.14.0.20020727093841.070dac78@192.168.0.12> 

next in thread | previous in thread | raw e-mail | index | archive | help
--==_Exmh_2120472238P
Content-Type: text/plain; charset=us-ascii


Hey Mike,

Just as a POI, I think you'd get better results with 'rsync' for this 
application (from the people that brought you Samba, readily available via 
ports) - it'll do intelligent copying, when archiving can maintain a directory 
of the previous versions for files that change, uses SSH as the transport, can 
be bandwith-limited and will compress the stream in-line.

Course, it'd still be good to fix any tar issues :)

Cheers,

AS

> 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
> 



--==_Exmh_2120472238P
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (FreeBSD)
Comment: Exmh version 2.5 07/13/2001

iD8DBQE9QsEiPHh895bDXeQRAmmlAKC+ArXnHDyw641FZ/NMY+GaSl+fSQCdF0sP
k+A7LegxMT4Ugud94YMp5Zs=
=keDS
-----END PGP SIGNATURE-----

--==_Exmh_2120472238P--

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-stable" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020727154954.E0E5A7C>