Quick rsync question

Thom Paine painethom at gmail.com
Wed Feb 22 03:29:39 UTC 2006


Here is my rsync that I run nightly James.

I created it with help from this list a while ago, and have been
tweaking it since.
I think it is pretty self explanitary. I have it speed limited so it
doesn't hammer my connection too bad while it's running. If you are
moving alot of data over the internet, then you might want to use his
feature.

#!/bin/bash
#Rsync Backup Script

RSYNC=/usr/bin/rsync
SSH=/usr/bin/ssh
RHOST=10.10.10.1
RPATH=/home/workgroup/rsync/
LPATH=/home/workgroup/
MAXSPEED=45
NOTES=/root/notes.text

#Delete old notes.
rm -f $NOTES

echo `date` > $NOTES

$RSYNC -azrv --delete --bwlimit=$MAXSPEED -e $SSH $LPATH $RHOST:$RPATH >> $NOTES

echo `date` >> $NOTES

mail -s "Sync Report --Rsync" user at host.ca < $NOTES

rm -f $NOTES




On 2/21/06, James Pifer <jep at obrien-pifer.com> wrote:
> > Well it seems to be something to do with the timestamps by the "is
> > newer".  Maybe it is some 'feature' of the filesystem that is on the
> > destination drive, is it mounted with any unusual options?  But I don't
> > really understand how mv inside the same filesystem as when you
> > corrected the directory placement will mess with the timestamp.
> >
> > Maybe try:
> >
> > mv data/Baptism/DSC00681.JPG data
> > mv data/DSC00681.JPG data/Baptism
> >
> > and then see if the rsync suddenly believes it needs copying again... at
> > least you prove it is some feature of the mv action that changes the
> > file state somehow.
>
> Well, I'm still not sure what's going on, but here's what I did. I
> deleted all the files out of one of the directories. Then I did:
> cp -v --preserve=timestamp
> of the files. Then I ran rsync on those two directories and it said
> everything was uptodate.
>
> The I did some mv's and it still say they are uptodate. I have no idea.
> I guess I'll just rsync or cp using preserve and I should be good to
> go.
>
> Thanks for the help.
>
> James
>
> --
> fedora-list mailing list
> fedora-list at redhat.com
> To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
>


--
-=/>Thom




More information about the fedora-list mailing list