Skip to main content

Windows to Linux server migration

To execute DerScanner server migration from Windows to Linux:

On Windows_host:

  1. End or wait for all active scans to complete.

  2. In the home directory on Windows_host, open the pg_dump file in PowerShell and execute:

    C:derscanner\\3rd-party\\PostgreSQL\\13\\bin\\pg_dump -E UTF-8 -f
    C:derscanner\\db_dump.sql -U backend backend
  3. If password is requested, enter the password during connection to DB (located in Environment Variables > System variables > hibernate.connection.password).

  4. Transfer the following files and folders to Linux_host:

    • C:derscanner\db_dump.sql
    • C:derscanner\files\b
    • C:derscanner\files\s

On Linux_host:

  1. Install the DerScanner system.

  2. Copy files and folders from Windows_host to Linux_host for migration to a convenient directory.

  3. Stop the web application:

    sudo docker stop backend
  4. Delete the new deployment database:

    sudo docker exec app-db dropdb -p 5432 -h localhost -U backend --maintenance-db=postgres -f -e backend
  5. Create an empty database:

    sudo docker exec app-db createdb -p 5432 -h localhost -U backend backend
  6. Go to the directory with files for migration (db_dump.sql, /b, /s) and migrate the files from the dump:

    sudo cat db_dump.sql | sudo docker exec -i app-db psql -p 5432 -h localhost -U backend -d backend
  7. Copy the b and s directories:

    sudo cp -r s/ /opt/derscanner/app/services/backend/files
    sudo cp -r b/ /opt/derscanner/app/services/backend/files
  8. Restart the APP application service:

    sudo systemctl restart derscanner-app.service