This guide will help you to resolve issues when the slave panel is not in sync with the Master panel.
To individually sync a slave panel, you can go to list servers page on Master's admin panel and click on sync icon.
To sync all the servers at once, you can run this on Master server :
If VPS creation/Editing/Deletion/Migration/Cloning is failing with error
'There was an error while saving the VPS Data on the slave'
then the cause could be due to sync issue, Please follow this guide.
Version mis-match
Most common cause of slave panel being out of sync is due to Virtualizor panel not updated to latest version.
This can happen either when one of the slave server is not updated to latest version or the Master panel is not updated to latest version while the slave panel is updated.
To update Master panel, you can check your auto-update settings in Configuration->Master settings.
If you want to update to latest stable version then set it to stable version there and then update the Master panel using Configuration->Updates page.
Or if slave panel is not updated then go to Slave's Admin panel and update it from there using Configuration->Updates page.
Once its updated, you can visit manage server page from Master panel->Servers->list servers and then ctrl + F5 list servers page.
This should sync back the updated version from Slave panel to Master panel.
Panel is offline
Sync issue can also happen when a slave panel is offline.
Due to that you will face issues like status not loading on list VPS page or manage server/VPS page is not loading.
You can refer this guide if slave panel is offline :
https://www.virtualizor.com/docs/faq/panel-is-offline/
Use the following command to check for crashed tables :
And to repair database you can run :
If it still shows error like 'Can't find file: 'to_master' (errno: 2)' while accessing panel or
in logs on that server ( /var/virtualizor/log/virt_sqlerror.log ) then simply run cronh to fix it on that slave server :
Once panel is back online, it should be back in sync.
License expired or sync error
If the license on slave panel is expired or showing sync error on license info page on that panel then create/edit/delete operations will fail pertaining to that slave server.
If its expired then you will need to renew its license.
If its renewed and still showing expired or showing Sync error on license info page then you will need to check if that server is able to resolve domain names.
You can check it using ping virtualizor.com
If it fails then you will need to update/correct nameservers on that server.
Once its starts resolving domain names then you can click on refresh license button on Virtualizor panel of that server and the license will then sync properly on that panel and operations from Master for that slave panel would work smoothly.
Too much data to sync
Default php memory limit is set to 128M.
So if there lot of IPs, plans, etc used by VPSes on the slave server (to be synced to slave panel) then it may require increase the php memory limit.
Since sync can fail silently as well.
Usually panel would throw an error 'There was an error in editing the VPS'
To update the limit from Master panel, you can go to Configuration->Slave settings (choose the slave server)->Memory limit.
In-correct API creds or Master IP
Sync can also fail (sometimes silently) if the Master key or Master IP is in-correct on slave server.
You can verify the Master key on Master panel->Configuration->Server info page (Choose localhost on top).
The IP needs to be the outgoing public IP usually , which you can also view it as license IP on license info page.
Slave panel's server info page will show Master IP and Master API-key which should always match with the Master's details.
If it does not, then you can carefully update it on slave server's /usr/local/virtualizor/universal.php file :
If you are un-sure about the server's outgoing IP, then you can also view it on slave server in its /usr/local/emps/var/log/web.access.log file
If that IP remains constant during sync calls then you can use that as Master IP for that slave server.