Hello
I probably didn't provide enough details before.
The problem is that rsync will delete files from the backup that exist on the
mounted samba source.
(the files it deletes seem somewhat random, sometimes just one or two files are
deleted, other times a whole directory is taken out).
If rsync is called shortly afterwards the files are retrieved from the source
(but occasionally other files are deleted at this time)
The linux host is Redhat 6.2
Rsync is version 2.4.6 (not the default one in redhat, one which I downloaded
and built)
Samba version is 2.0.7 (but I have tried it on 2.2.3a and the problem still
exists)
Machine I am trying to backup is Windows 2000 SP3 and the drive is NTFS format.
The Windows Share is mounted using SMB mount as a read only drive (is this a
problem does rsync need write access to source?)
This is my shell script, (a striped down version of the one I use to generate
incremental backups).
#!/bin/bash2
# ----------------------------------------------------------------------
# ------------- system commands used by this script --------------------
ID=/usr/bin/id;
ECHO=/bin/echo;
MOUNT=/usr/bin/smbmount;
UMOUNT=/usr/bin/smbumount;
RM=/bin/rm;
MV=/bin/mv;
CP=/bin/cp;
TOUCH=/bin/touch;
RSYNC=/geothermal/mannington/rsync_backup/rsync;
TAIL=/usr/bin/tail;
SED=/bin/sed;
# ------------- file locations -----------------------------------------
share=//esp42/DDrive;
smbmount=/esp42/D-Drive;
src=$smbmount/;
dest=/geothermal/mannington/backup/D-Drive;
excludefile=/geothermal/mannington/rsync_backup/rsync.exclude;
#-----------------------------------------------------------------------
[ -z "$1" ] && $ECHO syntax is: $0 daily weekly monthly
&& exit 1
type=$1 # daily, weekly, monthly
umask 077;
if [ "$type" == "daily" ]; then
$MOUNT $share $smbmount -o
username=rsync,password=isaac148,workgroup=esp42,ro,fmask=700,dmask=700,suid;
if (( $? )); then
$ECHO "rsync_backup: could not smbmount $smbmount, BACKUP NOT COMPLETE
'date'";
else
$RSYNC -Wva --delete --delete-excluded --exclude-from=$excludefile
--modify-window=10 $src $dest/$type.1/
if (( $? )); then
$ECHO "rsync_backup: rsync was NOT completed successfully"
else
$ECHO "rsync_backup: rsync completed successfully"
fi
$UMOUNT $smbmount;
if (( $? )); then
$ECHO "rsync_backup: could not smbumount $smbmount";
fi;
fi;
fi;
The exclude file is as follows:
*.$$$
*.mp3
*.MP3
*.listing
*.LISTING
*.o
*.O
*.obj
*.OBJ
*~
*.msg
*.MSG
*.par
*.PAR
*.tec
*.TEC
pagefile.sys
System Volume Information/
RECYCLER/
MP3/
WinFast WorkArea/
gener.data
GENER.DATA
lineq.data
LINEQ.DATA
mesh.data
MESH.DATA
table.data
TABLE.DATA
vers.data
VERS.DATA
*.bkcnrt
*.BKCNRT
*.error
*.ERROR
CD-R/
*.tmp
*.TMP
*.tmp/
*.TMP/
*.iso
*.ISO
*.nrg
*.NRG
If you need any more information please let me know. I am happy to help in
anyway I can in fixing this problem.
Regards
Warren Mannington
----- Original Message -----
From: "Warren Mannington" <w.mannington@auckland.ac.nz>
To: <rsync@lists.samba.org>
Cc: <mrubel@galcit.caltech.edu>; <marklchang@acmelab.org>
Sent: Monday, March 24, 2003 5:34 PM
Subject: Rsync snapshots problem.
> From:
> http://lists.samba.org/pipermail/rsync/2002-December/009101.html
>
> >Well, I followed this link:
> http://www.mikerubel.org/computers/rsync_snapshots/
> >
> >and implemented it (with a bit of tweaking) on my home network. It is
> >used to make snapshots of two Windows PC's over samba. On one of
the
> >machines (and not the other, from what I can tell) it deletes files
from
> >the target machine for no good reason (ie. they still exist on the
> >source machine). Then, if I run it again right away, it gets the files
> anew.
> <snip>
>
> I to have the same problem as above. Was there any solution discovered ?
I
> can post a detailed configuration if you wish.
>
> I have tried modify-window=10 (and 60) and this makes no difference. The
> files it deletes seems somewhat random.
>
> Any ideas ?
>
> Thanks
>
> Warren Mannington
>
> ==> Warren Mannington Room 4.613
> Phone: +64 9 373-7599 x84611 Department of Engineering Science
> Fax: +64 9 373-7468 The University of Auckland
> Home: +64 9 362-0766 Private Bag 92019
> Mobile: +64 25 245-3678 AUCKLAND, NEW ZEALAND
> E-mail: mailto:w.mannington@auckland.ac.nz
> http://www.esc.auckland.ac.nz/People/Staff/Mannington/
>
> --
> To unsubscribe or change options:
http://lists.samba.org/mailman/listinfo/rsync
> Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html
>