Hi, i’m running into some issues with rsync. I need to backup my entire NAS (user folders included and not only shared folder, this is a huge limitation for USB-COPY) to a USB hard drive. Backup starts without problem, usually next to the end of process rsync with verbose activated, report “I/O error 5” and after "failed verification -- update discarded (will try again)". After this problem the entire NAS seams corrupted, files disappear and the web gui interface say: “raid error” (my f2-210 is a RAID 0). After reboot, I checked file system on both sides and everything is good, files come back. How it’s possible? There are other solutions to backup the entire NAS to a USB drive smoothly? I post my script for backup and errors photos, i plan to use it (without verbose) as crontab.
Best regards.
Code: Select all
#!/bin/bash
umount /mnt/pom; mount /dev/sdb3 /mnt/pom &&
readonly SOURCE_DIR="/mnt/md0/User"
readonly BACKUP_DIR="/mnt/pom/TNAS_backup"
readonly DATETIME="$(date '+%Y-%m-%d_%H:%M:%S')"
readonly BACKUP_PATH="${BACKUP_DIR}/${DATETIME}"
readonly LATEST_LINK="${BACKUP_DIR}/latest"
#mkdir -p "${BACKUP_DIR}" &&
rsync -arvHu --progress --info=progress2 --delete \
"${SOURCE_DIR}/" \
--link-dest "${LATEST_LINK}" \
--exclude=".cache" \
"${BACKUP_PATH}" &&
rm -rf "${LATEST_LINK}" &&
ln -s "${BACKUP_PATH}" "${LATEST_LINK}" &&
readonly ENDTIME="$(date '+%Y-%m-%d_%H:%M:%S')"
java -jar /mnt/md0/User/admin/home/emailSender.jar Backup effettuato correttamente il "${ENDTIME}".
umount /mnt/pom;