Results 1 to 2 of 2
Hi Everyone,
I would like to share that our rsync has been slow lately. Even during inceremental backups, now I am still new to this but our script has been ...
- 08-15-2011 #1Just Joined!
- Join Date
- Aug 2011
- Posts
- 2
Rsync slow even during Incremental
Hi Everyone,
I would like to share that our rsync has been slow lately. Even during inceremental backups, now I am still new to this but our script has been in our servers for awhile. I've been searching off the net for some answers but to no avail. I suspected that it was the NIC card that was the culprit. I was advised to set it to full-duplex but our NIC Card is a Gigabit one. I dunno if this applies since the other guys had Ethernets. My script is below. Any help would be very much appreciated.
Code:#!/bin/bash ##################################################################### # # This script performs incremental backups of the /etc directory # and full backups of /home. The incremental backup stuff is # kind of weird, a terrific explanation of what's going on can # be found here: # ##################################################################### BACKUP_DIR=/mnt/backup RSYNC_BIN=/usr/bin/rsync NICE_BIN=/bin/nice COPY_PRIORITY=19 # -20 = highest, 19 = lowest priority if [ ! -f /mnt/backup/YES_BACKUP_IS_MOUNTED ]; then echo "Backup drive is NOT mounted!" exit -1 fi ##################################################################### # # This does the incremental backup of /etc. ${BACKUP_DIR}/etc.5 # gets the backup from 5 days ago, ${BACKUP_DIR}/etc.4 gets the # backup from 4 days ago, etc. Each directory behaves like a # complete backup of /etc, but in reality the space required for # each extra directory is only the changes between that day's # backups and the next (plus a little overhead). Pretty efficient # stuff! # ##################################################################### if [ -d "${BACKUP_DIR}/etc.5" ]; then rm -rf ${BACKUP_DIR}/etc.5 fi if [ -d "${BACKUP_DIR}/etc.4" ]; then mv ${BACKUP_DIR}/etc.4 ${BACKUP_DIR}/etc.5 fi if [ -d "${BACKUP_DIR}/etc.3" ]; then mv ${BACKUP_DIR}/etc.3 ${BACKUP_DIR}/etc.4 fi if [ -d "${BACKUP_DIR}/etc.2" ]; then mv ${BACKUP_DIR}/etc.2 ${BACKUP_DIR}/etc.3 fi if [ -d "${BACKUP_DIR}/etc.1" ]; then mv ${BACKUP_DIR}/etc.1 ${BACKUP_DIR}/etc.2 fi if [ -d "${BACKUP_DIR}/etc.0" ]; then cp -al ${BACKUP_DIR}/etc.0 ${BACKUP_DIR}/etc.1 fi ${RSYNC_BIN} -a -v --delete --exclude=spamassassin/ /etc/ ${BACKUP_DIR}/etc.0/ 1>/tmp/etcbackup.txt 2>&1 ##################################################################### # # This does the backup of the /home directory. We're using rsync to # do the copy, but it's not incremental. Subsequent copies after the # first should be faster, depending on how many files have changed. # # The --delete argument ensures that we remove files from the # backup directory that have been removed from the source directory. # # Redirecting stdout and stderr because given the size of the data # that we're copying, we invariably come across files that have been # removed by the time that we get to them (and this outputs an # error message). # ##################################################################### ${NICE_BIN} -n ${COPY_PRIORITY} ${RSYNC_BIN} -a -v --delete /home/ ${BACKUP_DIR}/home/ 1>/tmp/homebackup.txt 2>&1
- 08-18-2011 #2Just Joined!
- Join Date
- Aug 2011
- Posts
- 2
Hi guys...Any thoughts on this?


Reply With Quote