This one caught me by surprise so I wanted to share. I was moving a unifi-video server from one machine to another.  The best way to do this is to first install the unifi-video software using the instructions Ubiquiti provides.  Then, use rsync to copy your old data to the new server.  I used rsync for this but left out one important command line switch, -F.  Ubiquiti uses symbolic links in their directory structure so without -F, it will not copy the linked directories.

The directories you have to copy are:

Default Directory: /usr/lib

any alternate directory where you might have the actual video files stored, in my case /srv/video

The rsync command I use while logged into the new server that gives good performance is

rsync -aHAXxvF --numeric-ids --progress -e "ssh -T -c arcfour -o Compression=no -x" OldServerIP:/var/lib/unifi-video\
 /var/lib

-F ensures everything makes the trip.

Step by step:

  1. Stop UniFi service on new and old server:
    service unifi-video stop
  2. Use the rsync command above to copy the /var/lib/unifi-video directory
  3. WHen finished, restart UniFi on new server:
     service unifi-video stop

Good luck!