diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2024-07-05 00:47:54 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2024-07-05 00:47:54 -0300 |
commit | 5fc000a42028af7f1ede6e483582b8a9aeec8cfb (patch) | |
tree | 3607940c307c83d5f33047c28e149b070947cb50 | |
parent | 56bb32d68a95be22726113a68c4ce9ee2e251b19 (diff) | |
download | hydra-5fc000a42028af7f1ede6e483582b8a9aeec8cfb.tar.gz hydra-5fc000a42028af7f1ede6e483582b8a9aeec8cfb.tar.bz2 |
Fix: hydractl: sync-backups: remove the default bandwidth limit
-rwxr-xr-x | share/hydractl/sync-backups | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/share/hydractl/sync-backups b/share/hydractl/sync-backups index 844d630..9cc79de 100755 --- a/share/hydractl/sync-backups +++ b/share/hydractl/sync-backups @@ -7,12 +7,21 @@ BASENAME="`basename $0`" VOLUME="$1" MEDIA="/media/$VOLUME" -BWLIMIT=${BWLIMIT:=32000} +BWLIMIT=${BWLIMIT:=0} IMAGES="/var/data/crypt/" -RSYNC="ionice -c 3 nice -n 19 rsync -avH --delete --bwlimit=$BWLIMIT" CP="ionice -c 3 nice -n 19 cp" WHOAMI="`whoami`" +# Set bandwidth limit +if [ "$BWLIMIT" != "0" ]; then + BWLIMIT="--bwlimit=$BWLIMIT" +else + BWLIMIT="" +fi + +# Build rsync command line +RSYNC="ionice -c 3 nice -n 19 rsync -avH --delete $BWLIMIT" + # Sync backups for a node. function sync_backups_node { if [ ! -z "$NODE" ]; then |