Backing up your installation

It is recommended that you back up your installation on a regular basis, especially prior to performing Lansweeper updates. An unexpected shutdown of your Lansweeper server could lead to an update failure and subsequent database corruption. A manual backup is also required to move your installation from one server to another.

Which backup procedure you should follow depends on which database server you are using. Lansweeper data, reports and settings are stored in a database, which is hosted in either Microsoft SQL Compact or Microsoft SQL Server. If you perform an Easy Install, your database is hosted in SQL Compact. If you perform an Advanced Install, your database can be hosted in SQL Compact or SQL Server. If you are unsure which database server you are using, browse to the following section of the web console: Configuration\Your Lansweeper License

checking which database server is being used

Backing up if you are using SQL Compact

To back up your installation if your database server is SQL Compact, do the following:

  1. Stop the Lansweeper Server service in Windows Services
    stopping the Lansweeper Server service
  2. Stop your web server service in Windows Services. Keep in mind that this will log everyone out of the console. Your web server service is either IIS Express or World Wide Web Publishing Service (IIS).
    stopping the web server service
  3. Create a copy of your SQL Compact database file, which is:
    Program Files (x86)\Lansweeper\SQLData\lansweeperdb.sdf
  4. If you added any documents, images, widgets or other files to Lansweeper, back these up as well. Information on which folders store which files can be found in this knowledge base article.
    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.
  5. If it exists, create a backup copy of the following file as well:
    Program Files (x86)\Lansweeper\Key\Encryption.txt
  6. Restart the Lansweeper and web server services in Windows Services.

Backing up if you are using SQL Server

To back up your installation if your database server is SQL Server, do the following:

  1. Stop the Lansweeper Server service in Windows Services. Though creating a database backup while the scanning service is running may technically work, we recommend as a best practice not having anything connect to the database while you're running backup operations on it.
    stopping the Lansweeper Server service
  2. Stop your web server service in Windows Services. Keep in mind that this will log everyone out of the console. Your web server service is either IIS Express or World Wide Web Publishing Service (IIS).
    stopping the web server service
  3. Right-click the lansweeperdb database in SQL Server Management Studio and select Tasks\Back Up... to open the backup wizard. If SQL Server Management Studio isn't installed on your Lansweeper server, we recommend downloading it online. (You will need to perform a search for the Management Studio that's compatible with your particular edition and version of SQL Server.)
    database backup task in SQL Server Management Studio
    Scanned data, reports and settings are stored in your database. Scanning servers, servers that are only running the Lansweeper Server service, don't store any data or settings. They retrieve settings from the database and send scanned data directly to the database.
  4. In the General tab of the backup wizard, configure the source and destination options. By default, the backup destination is a .bak file on your disk drive.
    - Database: lansweeperdb
    - Backup type: Full
    - Backup component: Database
    database backup source and destination in SQL Server Management Studio
  5. In the Media Options tab of the backup wizard, tick Verify Backup When Finished. This ensures the integrity of the backup is checked once created.
    Verify Backup When Finished in SQL Server Management Studio
  6. In the Backup Options tab of the backup wizard, make sure the name of the backup set is something other than lansweeperdb, to avoid overwriting your existing database. Hit OK to create the database backup.
    backup set in SQL Server Management Studio
  7. If you added any documents, images, widgets or other files to Lansweeper, back these up as well. Information on which folders store which files can be found in this knowledge base article.
    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.
  8. If it exists, create a backup copy of the following file as well:
    Program Files (x86)\Lansweeper\Key\Encryption.txt
  9. Restart the Lansweeper and web server services in Windows Services.

Related Articles