Ahmad Gul Zadran

How to migrate data from a UGREEN NAS to TrueNAS SCALE with rsync

Copy terabytes from a UGREEN NAS to TrueNAS with rsync in tmux, so a lost connection does not start it again.

beginner20 minupdated 2026-10-13migrationnasrsyncsshtmuxtruenasugosugreenDownload script.sh

Before you start

  • Shell access on the machine that copies the data
  • rsync and tmux available on it
  • SSH access to the source machine
  • Enough free space on the destination

Your values

Fill these in and every command below updates to match. Nothing is sent anywhere.

Run this at your own risk. These steps worked on my hardware; yours may differ. Take a backup first, read each command before running it, and see the disclaimer.

To move from a UGREEN NAS (running UGOS) to TrueNAS SCALE, you copy everything over the network. That copy can take a whole night or longer.

If you start a copy of several terabytes with rsync over SSH and close the laptop, you come back to a closed session and a half-copied dataset. The copy depended on the SSH connection, and the connection did not last the night.

Nothing here only works for UGREEN or TrueNAS. The same two habits work for any move between two NAS systems that both give you a shell: Synology, QNAP, unRAID, or a normal Linux machine.

The fix is two simple habits that take about thirty seconds.

Run it inside a named tmux session

tmux keeps the shell running on the remote machine, even when your connection ends. You can detach, close the laptop, connect again tomorrow, and attach again.

Give the session a name. In three days you will not remember which unnamed session was the important one.

bash
tmux new -s nas-migration

If the session already exists, attach to it instead:

bash
tmux attach -t nas-migration

Detach with Ctrl+b then d. The transfer keeps running.

Start the transfer with resume enabled

bash
rsync -aHAX --partial --info=progress2 \
  admin@nas-old.example.lan:/volume1/Shared/ \
  /mnt/tank/Shared/

What each option does, because they are important:

  • -a archive mode: copies folders and keeps permissions, times, symlinks and ownership
  • -H keeps hard links, which archive mode does not do
  • -A keeps ACLs, -X keeps extended attributes
  • --partial keeps files that were only partly copied, so a stopped run continues instead of starting that file again
  • --info=progress2 shows one progress line for everything, not a line per file

Without --partial, if the copy stops in the middle of a 90 GB file, all 90 GB are lost and must be copied again.

The slash at the end of the source is important. src/ copies the contents of src into the destination. src copies the folder itself into the destination. If you get this wrong, you end up with /mnt/tank/Shared/src/src.

Watch it, or do not

bash
tmux attach -t nas-migration
expected output
    1.61T  47%   112.43MB/s    4:32:11

Run it again when it finishes

Always run the same command a second time. The first run took hours, and files changed while it ran. The second run only copies the differences, so it is quick. It also shows you that the first run really finished.

bash
rsync -aHAX --partial --info=progress2 \
  admin@nas-old.example.lan:/volume1/Shared/ \
  /mnt/tank/Shared/

Check before you trust it

--dry-run with --itemize-changes shows what a third run would do, without doing it. Ideally the list is empty.

bash
rsync -aHAXn --itemize-changes \
  admin@nas-old.example.lan:/volume1/Shared/ \
  /mnt/tank/Shared/ | head -50

Each line that starts with >f is a file it still wants to copy. An empty result means both sides are the same.

Only now consider --delete

--delete deletes files at the destination that no longer exist at the source. It is the right option to keep an exact copy up to date. But it is dangerous if the source is only partly mounted, because then it deletes files that are not really gone.

Never use it on the first run. Never use it before you have run the --dry-run above and read the result.

bash
Destructive command. Read it before running it. This can delete data or interrupt service.
rsync -aHAX --delete --info=progress2 \
  admin@nas-old.example.lan:/volume1/Shared/ \
  /mnt/tank/Shared/

Leave the session behind

bash
tmux kill-session -t nas-migration