Major rsync issue - overwriting files!!!

Giuliano Gavazzi dev+lists at humph.com
Fri Mar 28 12:00:34 GMT 2008


On 28 Mar, 2008, at 08:36 , Nathan Griffiths wrote:
>
> on the intel server, rsync constantly attempts to overwrite the  
> source files (& has succeeded!),  with empty directories. it simpply  
> deleted the source directory. once it overwrote it with old files  
> from a previous backup.
>
> 2 things i can't understand: A) --delete is NOT being used as an  
> option. B) the script is identical on both, the only differences  
> being the source & destination variables - yet they behave  
> completely differently.

delete is not being used but below you use --exclude-from and --delete- 
excluded.
Also, the script is the same but the EXCLUDES content is not  
necessarily.

> BAK_PATH="/Volumes/REM Backup/RsyncBackups/REM"
> LINK_DEST="/Volumes/REM Backup/RsyncBackups/REM/Daily/ 
> PreviousBackups1"
> EXCLUDES=/Library/Scripts/rsync/exclude.txt
>

Argh, a space in a path. I tend to avoid that in any argument I use in  
scripts. Apple has been bitten by that several years ago with  
thousands of users losing their files for an update... (iTunes IIRC)

> ### rsync options ###
> OPTS="-Eapztc --links --ignore-errors --exclude-from=$EXCLUDES -- 
> delete-excluded --link-dest=$LINK_DEST"
>

besides, you define PATH. Why don't you instead specify the full path  
of all commands? Much safer.

No idea why --dry-run would not work. Are you sure it is not your rm - 
rf that deletes stuff?

Giuliano


More information about the rsync mailing list