// HACKER NEWS — CYBERSECURITY
Migrating a Synology NAS to a UniFi UNAS Pro 8 with Robocopy, SMB Multichannel
I’ve had a Synology NAS for a very long time, and recently I started moving its contents to a new Ubiquiti UniFi UNAS Pro 8. This seemed like it ought to be a fairly boring operation. Both devices speak SMB, I have a fast network (recently upgraded to 10 gigabit internally), and Windows has had tools for copying files reliably between machines for decades. Naturally, it turned into a whole evening of learning things I thought I already knew, which is why I started a blog lol.
There was a nice bit of history here for me because back in 2007 (good lord!) I wrote a post called “XCopy considered harmful - Robocopy or XXCopy or SyncBack.” My argument at the time was basically that once you are moving enough files, Explorer stops being the move and Robocopy starts looking pretty good. I even used /Z, Robocopy’s restartable mode, because being able to resume a partially transferred file was useful on unreliable connections.
Almost twenty years later, /Z turned out to be one of the most important things I needed to remove because it made everything hella slow.
The basic job was straightforward. I had shares on the Synology such as:
I initially used Explorer, mostly because it was there and because sometimes the easy thing really is the easy thing. That lasted until Explorer started producing errors on individual files:
My first thought was filenames. NAS migrations are full of opportunities to discover that one filesystem is more permissive than another, and there were filenames with parentheses and other punctuation in them.
There is nothing especially exotic about 05 Wires.m4p, so I moved over to Robocopy to get a little more information. It consistently got to 92% and returned Windows error 665:
At this point the useful question was no longer “what is wrong with that filename?” but “which part of the path is refusing this file?”
I copied the file from the Synology to my local Windows desktop. That worked. I then copied the local file from Windows to the UNAS, and that failed with the same filesystem limitation.
That isolated the problem so the Synology could read the file, Windows could store it, and something about writing this particular file to the UNAS was causing trouble.