tomroyal.com

QNAP Nas to Nas RSYNC – Stuck at 0%

Something I learned, and which may be useful to someone else:

One of Apptitude’s servers is a QNAP NAS running firmware 4.0.7. Every 24 hours it runs a backup, via RSYNC (SSH encrypted) to a remote site where we have another QNAP.

Last night, the backup job glitched – no errors were logged, but it just sat uselessly at 0% for six hours. Here’s what I learned:

  • The QNAP Rsync system can only handle file paths up to 260 characters
  • It doesn’t fail gracefully if you exceed this

To find the offending files, here’s what I did (on a Mac, in my case, via Terminal):

  • cd to the Volume root
  • find . > filelist.txt
  • perl -nle ‘print if length$_>260’ filelist.txt

Or, thinking about it, you could probably do it in one command:

  • find . | perl -nle ‘print if length$_>260’

Once done, remove or rename the offending files. In my case the names were too long for the Mac to handle, even via Terminal – if that happens, SSH into the NAS and delete them there.

 

All © 2019 Tom Royal. Theme available here.