Back up your Lansweeper Classic installation regularly, and always before an update. An unexpected shutdown during an update can corrupt your database. A manual backup is also required if you want to move your installation to another server.
What to back up
A complete backup covers three things:
- Your database. Lansweeper data, reports, and settings are all stored here.
- Custom files you added. Documents, images, widgets, and similar files live in subfolders of the Website folder.
- Your encryption key. The
Encryption.txtfile, if it exists.
Scanning servers only run the Lansweeper Server service, so they need no separate backup. They read settings from the database and write scanned data straight back to it.
Check which database server you use
The procedure you follow depends on your database server: Microsoft SQL LocalDB, Microsoft SQL Server, or the deprecated Microsoft SQL Compact. Identify which database server Lansweeper is using with the ConfigEditor tool or in the web console.
Back up a SQL LocalDB or SQL Server database
When you name the backup set, use a name other than lansweeperdb. Reusing that name overwrites your existing database.
Stopping your web server service ends every active web console session.
-
Stop the Lansweeper Server service in Windows Services.
-
Stop your web server service in Windows Services. Your web server service is either IIS Express or World Wide Web Publishing Service (IIS).
-
Log in to SQL Server Management Studio. If SQL Server Management Studio isn't installed on your Lansweeper server, we recommend downloading it from Microsoft first.
If your database is hosted in SQL LocalDB, enter
(localdb)\.\LSInstanceas the SQL instance name and log in with the Windows user that initially installed Lansweeper. If your database is hosted in SQL Server, use the instance name and password you configured when you installed SQL Server. -
Right-click the lansweeperdb database and select Tasks > Back Up... to open the backup wizard.
-
On the General tab of the backup wizard, configure the source and destination. By default, the destination is a
.bakfile on your disk drive.Option Value Database lansweeperdb Backup type Full Backup component Database -
On the Media Options tab, select Verify Backup When Finished. This checks the integrity of the backup once it's created.
-
On the Backup Options tab, give the backup set a name other than
lansweeperdb, then select OK to create the database backup. -
If you added documents, images, widgets, or other files to Lansweeper, back these up as well. See where Lansweeper data, reports, and settings are stored to find out which folders hold which files.
Do not back up the entire Website folder. Only back up the specific subfolders you need. Backing up and restoring the entire Website folder can lead to issues.
-
If
Program Files (x86)\Lansweeper\Key\Encryption.txtexists, create a backup copy of that file as well. -
Restart the Lansweeper Server and web server services in Windows Services.
Back up a SQL Compact database
SQL Compact was an old database server option that is no longer supported. If you still use SQL Compact as your Lansweeper database server, convert your database to SQL LocalDB or SQL Server.
Stopping your web server service ends every active web console session.
-
Stop the Lansweeper Server service in Windows Services.
-
Stop your web server service in Windows Services. Your web server service is either IIS Express or World Wide Web Publishing Service (IIS).
-
Create a copy of your SQL Compact database file, found at
Program Files (x86)\Lansweeper\SQLData\lansweeperdb.sdf. -
If you added documents, images, widgets, or other files to Lansweeper, back these up as well. See where Lansweeper data, reports, and settings are stored to find out which folders hold which files.
Do not back up the entire Website folder. Only back up the specific subfolders you need. Backing up and restoring the entire Website folder can lead to issues.
-
If
Program Files (x86)\Lansweeper\Key\Encryption.txtexists, create a backup copy of that file as well. -
Restart the Lansweeper Server and web server services in Windows Services.