Support Center
Knowledgebase Contact Support
Search our knowledgebase

How to move Lansweeper to a different server

Last updated on August 01 2014

To find out what kind of database you are using and where it is located, go to Configuration -> Database scripts in the web console.

SQL Server

  1. Stop the Lansweeper service on your current setup.
  2. Stop the service of whichever web server you are currently using: World Wide Web Publishing Service (IIS) or IIS Express.
  3. Take a full backup of your lansweeperdb database using SQL Server Management Studio.
  4. If you added any custom images to Lansweeper or uploaded documents, you may want to copy these files as well. Custom images and docs can be found in Program Files/Lansweeper/Website/actions, Program Files/Lansweeper/Website/Docs and Program Files/Lansweeper/Website/userpictures.
  5. Do a full installation of Lansweeper on your new setup. Our latest installer can be found here.
  6. Stop the Lansweeper service on the new server.
  7. Stop the service of whichever web server you are using on your new server: World Wide Web Publishing Service (IIS) or IIS Express.
  8. Do a restore of the database backup and overwrite the lansweeperdb database on the new server.
  9. Execute the below script in SQL Server Management Studio.
    This will ensure that the SQL user for your Lansweeper database is configured correctly.

use lansweeperdb
GO
drop schema lansweeperuser
GO
drop user lansweeperuser
go
execute sp_droplogin lansweeperuser
go
use master
GO
EXEC sp_addlogin 'lansweeperuser', 'mysecretpassword0*', 'lansweeperdb', [English]
GO
use lansweeperdb
go
EXEC sp_grantdbaccess 'lansweeperuser', 'lansweeperuser'
GO
EXEC sp_addrolemember [db_owner], 'lansweeperuser'
Go

  1. In your Lansweeper configuration files make sure that the Data Source, User ID and Password correspond with your SQL Server settings.
    The config files are: \Lansweeper\Service\Lansweeperservice.exe.config and \Lansweeper\Website\web.config
  2. Execute the below script in SQL Server Management Studio. Replace “newserver” with the name of your new scanning server.

use lansweeperdb
GO

update tsysasservers set servername='newserver'
GO
update tblassets set scanserver='newserver'
GO

  1. Copy any custom images and docs from your old setup to your new one and restart the Lansweeper and web server services on your new server.
  2. In the web console, go to Configuration -> Assetpages (http://newserver/Configuration/AssetPages). Update the field Action Path with the name of your new server.

SQL Compact

  1. Stop the Lansweeper service on your current setup.
  2. Stop the service of whichever web server you are currently using: World Wide Web Publishing Service (IIS) or IIS Express.
  3. Backup your SQL Compact database. (Copy the file \Lansweeper\SQLDATA\lansweeperdb.sdf)
  4. If you added any custom images to Lansweeper or uploaded documents, you may want to copy these files as well. Custom images and docs can be found in Program Files/Lansweeper/Website/actions, Program Files/Lansweeper/Website/Docs and Program Files/Lansweeper/Website/userpictures.
  5. Do a full installation of Lansweeper on your new setup. Our latest installer can be found here.
  6. Stop the Lansweeper service on the new server.
  7. Stop the service of whichever web server you are using on your new server: World Wide Web Publishing Service (IIS) or IIS Express.
  8. Restore the database backup onto the new server, overwriting the database created by the setup.
  9. Execute the below script in your Lansweeper web console under Configuration/Database Scripts.
    Replace “newserver” with the name of your new scanning server.

update tsysasservers set servername='newserver'
GO
update tblassets set scanserver='newserver'
GO

  1. Copy any custom images and docs from your old setup to your new one and restart the Lansweeper and web server services on your new server.
  2. In the web console, go to Configuration -> Assetpages (http://newserver/Configuration/AssetPages). Update the field Action Path with the name of your new server.