If you know how, it’s actually easy to migrate a UniFi Controller. You learn in this How To Migrate UniFi Controller (Raspberry) an option that helped to successfully migrate the controller.
I am using for this migration the following environment:
- The OLD UniFi Controller is installed on a Raspberry Pi 2 Model B
- The NEW UniFi Controller is installed on a Raspberry Pi 4 Model B
- Ubiquiti Unifi Security Gateway (USG)
- Old versions of Unifi Access Points
- Old version of Unifi OUTDOOR Access Points
To migrate the UniFi Controller on Raspberry we will be undertaking 3 key steps.
- First of all, you like to ensure that you upgaded to the latest version on the existing UniFi Controller.
- Secondly will be login into your existing UniFi Controller and take a backup and restore it to the new UniFi Controller.
- Once done, you login again in your old UniFi Controller and enforce the migration of the devices to your new UniFi Controller.
To install a new UniFi Controller is not part of this How To. You will be happy to find a how to for installing a UniFi Controller on this website.
Phase one: Update!
Lets start and update the existing system. To do so, you login into your Raspberry’s console and type or copy & paste the below.
sudo apt update; sudo apt full-upgrade -y; sudo apt autoremove -y; sudo apt-get autoclean -y
Once done, you’re UniFi Controller should be on the newest version. In case of this how to its 7.1.66 (as of July 2022).
Phase two Backup & Restore
Lets go to the second phase, which is to take a backup of your existing UniFi Controller.
- Login into your existing UniFi Controller.
- Klick on “Settings”.
- Next, klick on “System”.
- Scroll down to “Backup”.
- Now you click on “Download Backup”. I have selected the “no limit” option. The file will be stored on your harddrive.
Once you successfully downloaded the “Migration File”, then you switch to your new UniFi Controller. This at the login screen (if newly installed) should look like something like this:
- Once you arrived on the start / front page of your newly installed UniFi controller, it will ask you to either “Name Your Network Application” or “Or restore from backup”. Of course you click “Or restore from backup”.
- Now, you click on “Alternatively, you can upload backup file.”
- Select the backup file that you just made before. Its called something like “backup_******.unf” and hit the “Confirm” button.
- You will receive a message like “Backup restoration is in progress. Your Network application will reboot during this process.”. This is a great moment to train your patience, as it can take between a couple of seconds towards to a couple of minutes.
- Once you were successful, most likely (if you leverage on the same version of the UniFi Controller) the same login screen appears on your new instance to which you migrated
Login into your migrated UniFi controller by leveraging on the same user and password as you were used to for your “old” UniFi controller. You like to double check whether everything looks like the same as it should. Further, you may like to adjust (depending on your needs) some of your settings.
Phase 3 Lets migrate the devices now
To migrate the devices you will need to login into your OLD UniFi controller.
- Once logged in, click on “Settings”.
- Following this you click “System”.
- Within the system menu, you find “Site Management”. Select the following options:
- Export Site.
- Click on “Download the Site Export File” and store the file on your file system. Once done, click “Continue”.
- You like to read carefully the next migration advice. Following reading, you click on “Migrate”.
- Now you need to do two things, add on top of the dialogue the IP address and the port of your destination UniFi Controller. In my case its 192.168.2.50 Port 8081 (Note: in the standard installation the port is most likely 8080. I changed it to 8081, hence i have to use 8081 instead of 8080). Further you select the devices to be migrated. Following this, you click on “Migrate Devices”.
- BEFORE CLICKING ANYTHING, go now to the new UniFi Controller and check whether you see your devices online. To see them online, you maybe need to re-fresh or re-loging into the new UniFi Controller. If you see the devices online, go back to the OLD UniFi controller. If you do not see your devices, go back to the first step and repeat the process.
- Since you were able to see your devices Online in the new UniFi Controller, you can hit now “Forget Devices” in the still open dialogue on your OLD UniFi controller. Once clicked, you get a warning message that you need to confirm by again clicking “Forget”.
One this point you are done! You can, if you do not need it anymore, switch off your old UniFi Controller.
The “thing” with the versions
I am using UniFi controllers since 2014 and have by this made quite some experience. One lesson learned is that the process for migration from time to time changes. In my opinion, it was never as easy as it was with the current version 7.1.66. However, one thing you should strongly consider, before you migrate to a new UniFi Controller, you should upgrade the old controller to the same version as the new controller. Technically, i cannot explain why i think its the best approach, but in my experience this approach was most seamless.
Help in the Internet
I think there is a good UniFi community. You like to check out this community for the case of you face troubles. There are many good hints and there is also a general likelihood that someone else faced similar issues than you.
You like to bookmark this website, as I will continue to document my notes online. This way you maybe find some other great guidances that potentially are of your help. I also manage a Twitter channel. It would be a honour to me if you follow me on Twitter.