Rick Warner
2006-Dec-07 22:36 UTC
[Samba] get errors when doing a tar backup of a windows server with linux smbclient
Hello all,
We have a script that does a nightly backup of a windows server to a linux
fileserver. The linux system uses smbclient to make a tarball of the share.
I get this error when running smbclient:
Domain=[OURSERVER] OS=[Windows 5.0] Server=[Windows 2000 LAN Manager]
tar: dumped 56781 files and directories
Total bytes written: 9800680960
write_data: write failure. Error = Connection reset by peer
write_socket: Error writing 39 bytes to socket 7: ERRNO = Connection reset by
peer
Error writing 39 bytes to client. -1 (Connection reset by peer)
As far as I can tell, the tarball it creates is OK. Doing a file list on the
backup with tar lists all the files (at least as far as I can tell) and no
errors.
Here is the script we use to do the backup:
#!/bin/bash
# Username and Password for Windows share.
export USER=ourusername
export PASSWD=ourpassword
# Service name of Windows share and sub-directory for backup exclusion.
SERVICE='//ourserver/apps'
SUBDIR='System Volume Information'
# Backup location, basename, and date string.
BACK='/home/server-backups/ourserver';
BASE='ourserver';
DATE=`date +%Y-wk%U_%b-%d_%a`;
# Misc. variables
MSG1="Tarring up $SERVICE Directory: $SUBDIR to: $BACK";
if [ -f $BACK/$BASE$DATE.tar.bz2 ]; then
echo "File exists, command halted: $BACK/$BASE$DATE.tar.bz2"
else
smbclient $SERVICE -N -TqcX
$BACK/$BASE$DATE.tar "$SUBDIR" "example/1.lck"
"example/2.lck" "example/3.lck"
"example/4.lck" "example/5.lck" "example/6.lck"
"example/7.lck" "example/8.lck"
bzip2 $BACK/$BASE$DATE.tar
fi
We are using samba 3.0.22-r3 from a gentoo install. Tar is 1.15.1-r1.
How can I eliminate this error message?
--
Richard Warner
Lead Systems Integrator
Microway, Inc
(508)732-5517
Rick Warner
2006-Dec-11 16:39 UTC
[Samba] get errors when doing a tar backup of a windows server with linux smbclient
Anyone? On Thursday 07 December 2006 17:09, Rick Warner wrote:> Hello all, > > We have a script that does a nightly backup of a windows server to a linux > fileserver. The linux system uses smbclient to make a tarball of the > share. I get this error when running smbclient: > > > Domain=[OURSERVER] OS=[Windows 5.0] Server=[Windows 2000 LAN Manager] > tar: dumped 56781 files and directories > Total bytes written: 9800680960 > write_data: write failure. Error = Connection reset by peer > write_socket: Error writing 39 bytes to socket 7: ERRNO = Connection reset > by peer > Error writing 39 bytes to client. -1 (Connection reset by peer) > > > As far as I can tell, the tarball it creates is OK. Doing a file list on > the backup with tar lists all the files (at least as far as I can tell) and > no errors. > > Here is the script we use to do the backup: > > #!/bin/bash > > # Username and Password for Windows share. > export USER=ourusername > export PASSWD=ourpassword > > # Service name of Windows share and sub-directory for backup exclusion. > SERVICE='//ourserver/apps' > SUBDIR='System Volume Information' > > # Backup location, basename, and date string. > BACK='/home/server-backups/ourserver'; > BASE='ourserver'; > DATE=`date +%Y-wk%U_%b-%d_%a`; > > # Misc. variables > MSG1="Tarring up $SERVICE Directory: $SUBDIR to: $BACK"; > > if [ -f $BACK/$BASE$DATE.tar.bz2 ]; then > echo "File exists, command halted: $BACK/$BASE$DATE.tar.bz2" > else > smbclient $SERVICE -N -TqcX > $BACK/$BASE$DATE.tar "$SUBDIR" "example/1.lck" "example/2.lck" > "example/3.lck" "example/4.lck" "example/5.lck" "example/6.lck" > "example/7.lck" "example/8.lck" bzip2 $BACK/$BASE$DATE.tar > fi > > > We are using samba 3.0.22-r3 from a gentoo install. Tar is 1.15.1-r1. > How can I eliminate this error message? > > -- > Richard Warner > Lead Systems Integrator > Microway, Inc > (508)732-5517-- Richard Warner Lead Systems Integrator Microway, Inc (508)732-5517