From 777f7ddb3be51362f461b37093bda5417f800a38 Mon Sep 17 00:00:00 2001 From: Leandro Lucarella Date: Fri, 1 Oct 2010 20:09:30 -0300 Subject: [PATCH] Let rsync do the hard linking --- bacap | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) 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" || -- 2.43.0