2

Trying to make a backup of Ubuntu server using rsnapshot, here is my config file:

config_version  1.2
snapshot_root   /root/backups
cmd_cp      /bin/cp
cmd_rm      /bin/rm
cmd_rsync   /usr/bin/rsync
cmd_ssh     /usr/bin/ssh
cmd_logger  /usr/bin/logger
retain      hourly  6
retain      daily   7
retain      weekly  4
retain      monthly 3
verbose     3
loglevel    4
logfile     /root/backups/rsnap.log
lockfile    /root/backups/rsnap.pid
backup      root@server:/   server/ 
exclude     /dev/*
exclude     /home/*/.gvfs
exclude     /home/*/logs/
exclude     /media/*
exclude     /mnt/*
exclude     /proc/*
exclude     /sys/*
exclude     /tmp/*
exclude     /home/*/.local/share/Trash
exclude     /etc/fstab
exclude     /var/run/*
exclude     /var/lock/*
exclude     /var/log/*
exclude     /lib/modules/*/volatile/.mounted
exclude     /var/cache/apt/archives/*

how can I limit the rate at which it downloads? With the way it is now, remote server is running very slowly during backup.

0

This answer is probably a bit late but for future reference:

I used the --bwlimit parameter for rsync for limiting directory backups. You can either set it globally for all directory backups:

rsync_long_args    --bwlimit=1MiB

or append to particular backup jobs:

backup    root@server:/path/    server/    +rsync_longs_args=--bwlimit=1MiB

For script jobs which do not utilize rsync this is not applicable. But I take it most jobs use a pipe to write data into a file. You can use the pv tool (apt-get install pv) to limit the bandwidth of the pipe which eventually limits the rate of the writing command like ssh:

backup_script    /usr/bin/ssh root@server 'mysqldump ...' | /usr/bin/pv --quiet --rate-limit 1m > mysql_backup.sql    server_mysql/

Note that I can't post tab stops here but every occurrence of 4 spaces like needs to a be a tab stop in the rsnapshot.conf format.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.