Backing Up and Moving the On-Premise Database (AVG Business) | AVG

Home Support

Backing Up and Moving the On-Premise Database (AVG Business)

Backing Up and Moving the On-Premise Database (AVG Business)

In the event you need to migrate your AVG Business On-Premise Console database to a new server, follow these instructions.

Important for upgrading from 6.x to 7.16

When upgrading the On-Premise Console from 6.0.14 to 7.16, the custom DB port is ignored and default one (5432) is used. Use this article to ensure your database is configured properly in the updated console.

Before You Begin

  • New server must have same hostname as original one, otherwise devices will not connect
  • All commands are assuming a default DB superuser (postgres).
    • If you are unsure about your console's values, check the configuration file (C:\Program Files\AVG\Management Console\console\config\application-user-config.yml by default)
  • pg_dump Postgres utility is used for the database backup
  • https://www.pgadmin.org/ is installed but not used (has backup and restore functionality, which won't work due to db ownership conflicts)

Moving the On-Premise Console to a New Server

In these instructions "New Server" refers to the server you are moving your Console and database to. "Old Server" refers to the current server hosting your Console and database.

On the New Server

  1. Install the On-Premise Console
  2. Stop the AVG Business Management Console service
  3. If you provided your own certificate during installation on the old server, use the same. By default, it is located in C:\Program Files\AVG\Management Console\console\certificates so you can copy the certificate from this directory, or whatever you chose as the Application Path during installation

Ensure the following:

  • keyStorePassword in application-user-config.yml is the same on both servers
  • shard Context in application-user-config.yml is the same on both servers

On the Old Server

  1. Run the following command: "C:\Program Files\AVG\Management Console\PostgreSQL\bin\pg_dumpall.exe" -U postgres -p DB_PORT -c -f C:\dump.sql
    • Replace DB_PORT in the command with the value read from application-user-config.yml (dbUrl line)
  2. When asked, type the password for your Postgres superuser specified during the original installation of the On-Premise Console
  3. Copy the created SQL dump (located at C:\dump.sql by default) from the old server to the new one

On the New Server

  1. Run the following commands:
    • "C:\Program Files\AVG\Management Console\PostgreSQL\bin\psql.exe" -U postgres -p DB_PORT -c "ALTER USER bconsole WITH PASSWORD 'OLD_dbPassword';"
    • "C:\Program Files\AVG\Management Console\PostgreSQL\bin\psql.exe" -U postgres -p DB_PORT -c "ALTER USER postgres WITH PASSWORD 'OLD_dbPassword';"
      • Replace OLD_dbPassword with the value from application-user-config.yml on the old server
  2. When asked for a password, use the one from the application-user-config.yml on the new server
    • Now you can set the database password on the new server to be same as on the old server, so that whenever you are asked for the password again, you can use OLD_dbPassword
  3. Set dbPassword in application-user-config.yml to the OLD_dbPassword
  4. Run the following command: "C:\Program Files\AVG\Management Console\PostgreSQL\bin\psql.exe" -U postgres -p DB_PORT -f C:\dump.sql
    • Replace DB_PORT with the value from application-user-config.yml on the new server — this can differ from the port on the old server
    • You will be asked to enter the dbPassword
  5. Start the AVG Business Management Console service
  6. Wait for the message "Management Console started" in C:\Program Files\AVG\Management Console\console\log\startup.log
  7. Open the On-Premise Console by clicking its icon to check it is working properly

Creating Console Back-ups

If you are able to ensure your HDD is properly backing up automatically (e.g. using RAID scheme), you don't need to perform any additional steps. Otherwise:

  • The following files must be backed up regularly:
    • If you use your own certificate, then also everything under
  • Configure a regular backup of a database using pg_dump and your favorite task scheduling tool

Was this article helpful?

Still looking for answers ?

Visit our AVG Support Community or contact us here: