From: Leandro Lucarella Date: Fri, 1 Oct 2010 23:09:30 +0000 (-0300) Subject: Let rsync do the hard linking X-Git-Url: https://git.llucax.com/software/bacap.git/commitdiff_plain/777f7ddb3be51362f461b37093bda5417f800a38 Let rsync do the hard linking --- diff --git a/bacap b/bacap index 6835b86..8c649ed 100755 --- a/bacap +++ b/bacap @@ -129,11 +129,9 @@ do extra_flags="--exclude-from=$exclude --delete-excluded" [ -r "$include" ] && extra_flags="$extra_flags --include-from=$include" - plog "Rotating backup..." - $run cp -al $V "$current_dir" "$dst" || - ret=$(($ret+1)) plog "Running rsync..." - $run rsync $RSYNC_FLAGS $extra_flags $src "$dst/" || + $run rsync $RSYNC_FLAGS $extra_flags \ + --link-dest="$current_dir" $src "$dst/" || ret=$(($ret+1)) plog "Moving current..." $run rm $V "$current_link" ||