--- title: "LogServer migrations" slug: "logserver-migrations-v7-0" description: "Migrate your LogServer to a dedicated appliance seamlessly, preserving audit logs and enhancing log management with LogForwarder for high availability." tags: ["LogServer", "LogServer Migration", "Logging"] updated: 2026-06-05T19:17:40Z published: 2026-06-05T19:17:40Z canonical: "support.appgate.com/logserver-migrations-v7-0" --- > ## Documentation Index > Fetch the complete documentation index at: https://support.appgate.com/llms.txt > Use this file to discover all available pages before exploring further. # LogServer migrations If your LogServer is co-hosted with a Controller, moving it to a dedicated appliance is recommended. You can migrate the LogServer away from the Controller and bring the existing audit logs with it. Appliances queue logs when they cannot reach the LogServer, but only when a LogServer is configured. Minimize the time window during which no LogServer is configured to avoid losing logs. You will need browser access to the admin UI and terminal access to both appliances. 1. Sign in to the admin UI as an administrator. 2. Go to **Appliances** and create a new appliance (Appliance B), which will become the new LogServer. 3. Go to **Appliances**, select the appliance that is currently acting as the LogServer (Appliance A), uncheck the *LogServer* function, and **Save**. 4. SSH to Appliance A: `ssh cz@applianceA.address`. 1. Switch to root: `sudo su` 2. Go to the OpenSearch directory: `cd /mnt/data/elasticsearch5` 3. Compress the OpenSearch data directory: `tar zcvf es_data.tar.gz data/` 4. Copy the compressed data file to Appliance B: `scp es_data.tar.gz cz@applianceB.address:` 5. SSH to Appliance B: `ssh cz@applianceB.address` 1. Switch to root: `sudo su` 2. Move the compressed file to the OpenSearch directory: `mv es_data.tar.gz /mnt/data/elasticsearch5` 3. Go to the OpenSearch directory and extract the file: `cd /mnt/data/elasticsearch5; tar zxvf es_data.tar.gz` 4. Set the correct permissions: `chown -R czd:czd *` 6. In the admin UI, go to **Appliances**, select Appliance B, select the *LogServer* function, and **Save**. --- ## Migrating from LogServer to LogForwarder If you use the LogServer and want to migrate to an enterprise log management system, use the LogForwarder. LogForwarders support high availability (HA) operation using two or more appliances and can export logs by Site to different destinations. You can configure multiple export protocols simultaneously, including one for the ELK stack. If your enterprise environment requires the ELK stack, deploy it outside the AppGate ZTNA Collective and forward logs there while also exporting log data to an enterprise-class logging system. You can migrate from the LogServer to the LogForwarder without losing audit logs already accumulated on the LogServer. 1. Disable the ***LogServer*** function and enable the ***LogForwarder*** function on the LogServer appliance. The appliance becomes a LogForwarder. 2. SSH to the LogForwarder and run the following command to generate the OpenSearch configuration: `sudo cz-config set -j runOpensearch true` 1. Wait for OpenSearch to reach `green` status. This cmay take some time depending on the size of the database. To check the status, run: `es-tools -c cluster-health` When OpenSearch is ready, the output looks like the following: ```json {  "cluster_name": "appgate",  "status": "green",  "timed_out": false,  "number_of_nodes": 1,  "number_of_data_nodes": 1,  "active_primary_shards": 6,  "active_shards": 6,  "relocating_shards": 0,  "initializing_shards": 0,  "unassigned_shards": 0,  "delayed_unassigned_shards": 0,  "number_of_pending_tasks": 0,  "number_of_in_flight_fetch": 0,  "task_max_waiting_in_queue_millis": 0,  "active_shards_percent_as_number": 100 } ``` 1. Use `es-export` to export all log indexes from OpenSearch and forward them to `cz-logd` as if they were from any other appliance. Run the following command: `es-export --forward_logd true` The output confirms each index as it completes: `Current index:  logstash-2021-02-23 Done` 1. Stop OpenSearch and remove the temporary OpenSearch configuration from the LogForwarder: `sudo cz-config set -j runOpensearch false` 1. Optionally, remove the OpenSearch database: `sudo rm -rf /mnt/data/elasticsearch5/data/`