Skip to content

Commit f9e7b81

Browse files
committed
Add --size-only to avoid useless copies of big files.
1 parent 15c2bd7 commit f9e7b81

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

backup-to-usb-disk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ do_sync () {
5252
[ -z "${1}" ] && die 4 soemthing went wrong. call alex
5353
echo "backing up ${1}..."
5454
echo " "
55-
sudo /usr/bin/rsync -hrav --no-perms --no-owner --no-group "${1}" ${usb_disk}
55+
sudo /usr/bin/rsync -hrav --size-only --no-perms --no-owner --no-group "${1}" ${usb_disk}
5656
echo " "
5757
}
5858
# SCRIPT

backup-with-input

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
date=$(date +%Y%m%d)
3131
me=$(basename $0)
3232
mydir=$(dirname $0)
33-
rsyncopts="-av --no-perms --no-owner --no-group --exclude=lost+found --exclude=.cache --exclude=.thumbnails --delete"
33+
rsyncopts="-av --no-perms --no-owner --no-group --exclude=lost+found --exclude=.cache --exclude=.thumbnails --delete --size-only"
3434

3535
# FUNCTIONS
3636
die () {

0 commit comments

Comments
 (0)