The Samba-Bugzilla – Attachment 2098 Details for
Bug 4037
Rsync should obey --keep-dirlinks when searching basis dirs
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
Script for a backup scenario that tickles the bug
bkd-run.sh (text/plain), 1.36 KB, created by
Matt McCutchen
on 2006-08-20 17:25:51 UTC
(
hide
)
Description:
Script for a backup scenario that tickles the bug
Filename:
MIME Type:
Creator:
Matt McCutchen
Created:
2006-08-20 17:25:51 UTC
Size:
1.36 KB
patch
obsolete
>#!/bin/bash >set -e >R=~/tmp/bkd >rm -rf $R >mkdir -p $R > ># In my home directory, I keep a copy of the original rsync source code. >mkdir -p $R/home/matt/rsync >echo "rsync" >$R/home/matt/rsync/rsync.c > ># Soon I plan to make some changes to rsync, and I want $R/home/matt/rsync-test ># to always contain my latest testing version. But for now, I'm just going to ># make rsync-test a link to plain rsync. For some reason, I use an absolute ># symlink. >ln -s $R/home/matt/rsync $R/home/matt/rsync-test > ># The system is backed up. >rsync -a --exclude="/backup*" $R/ $R/backup1/ > ># Now I'm ready to make my changes, so I replace the symlink with an actual ># copy of the rsync source code. >rm $R/home/matt/rsync-test >rsync -a $R/home/matt/rsync/ $R/home/matt/rsync-test/ > ># The system is backed up again. The admin uses --link-dest to save space. >rsync -a --exclude="/backup*" --link-dest="$R/backup1/" $R/ $R/backup2/ > ># Rsync incorrectly followed the symlink $R/backup1/home/matt/rsync-test ># => $R/home/matt/rsync in the link-dest dir. As a result, ># $R/backup2/home/matt/rsync-test/rsync.c is a hard link to $R/home/matt/rsync/rsync.c . ># But for the moment, the backup is still OK. >cat $R/backup2/home/matt/rsync-test/rsync.c > ># Now I start making my changes. >echo "rsync with changes" >$R/home/matt/rsync/rsync.c > ># Uh-oh! Look what happened to the backup! >cat $R/backup2/home/matt/rsync-test/rsync.c
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 4037
: 2098