Unable to backup with RSync

Rsync is a backup tool common to most Linux servers and clients.
Locked
User avatar
fabiobiscia
Posts: 24
Joined: 08 Jan 2021, 08:28

Unable to backup with RSync

Post by fabiobiscia »

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;
Schermata 2021-01-30 alle 13.02.31-min.png
Schermata 2021-01-30 alle 13.02.00-min.png
Schermata 2021-01-30 alle 13.02.45-min-2-2.png
User avatar
fabiobiscia
Posts: 24
Joined: 08 Jan 2021, 08:28

Re: Unable to backup with RSync

Post by fabiobiscia »

fabiobiscia wrote: 30 Jan 2021, 20:22 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;
Schermata 2021-01-30 alle 13.02.31-min.png
Schermata 2021-01-30 alle 13.02.00-min.png
Schermata 2021-01-30 alle 13.02.45-min-2-2.png
After failed Backup I tried to list files in /mnt/md0 and this is the result:

Code: Select all

root@TNAS-BM:/mnt/md0# ls
/bin/ls: reading directory .: Input/output error
User avatar
TMroy
TerraMaster Team
Posts: 2605
Joined: 10 Mar 2020, 14:04
China

Re: Unable to backup with RSync

Post by TMroy »

{L_BUTTON_AT}fabiobiscia
One of your drive might get faulty. Please remove it from the tray and insert it again. Or you have to have full scan your drive by following the instruction viewtopic.php?f=75&t=1125
To contact our team, please send email to following addresses, remember to replace (at) with @:
Support team: support(at)terra-master.com (for technical support only)
Service team: service(at)terra-master.com (for purchasing, return, replacement, RMA service)
User avatar
fabiobiscia
Posts: 24
Joined: 08 Jan 2021, 08:28

Re: Unable to backup with RSync

Post by fabiobiscia »

Thanks for your reply, perhaps I have solved this ridiculous problem.... after 6-7 backup I noticed that all were stopping after a specific video file, i opened this video file and it was corrupted. I don't know if the video location was broken or the file itself but it's really annoying that rsync broke its process due to a corrupted file and abort all later processes. I'm trying another backup, I will update you if all work fine.
Locked

Return to “Rsync”