Back to Documentation

Migrating to a New Node

Migrate your Piler installation to a new server with minimal downtime and complete data integrity.

Migration Overview

There are two primary methods for migrating your Piler installation to a new server. Choose the method that best suits your needs:

Method 1: Export/Import

Use Piler's built-in export and import functionality to transfer data.

Cleaner, more controlled process
Works across different versions
May take longer for large datasets

Method 2: Raw Data Copy

Directly copy MySQL, Manticore, and file system data.

Faster for large installations
Complete system state transfer
Requires identical software versions

Method 1: Export/Import

Step 1: Install Piler on NEW Node

See fresh installation steps on the new server.

Step 2: Update your mail server's config to send emails to NEW Node

Step 3: Verify the switch

Verify that emails are now being archived on NEW node

Step 4: Export Data on OLD Node

Export all emails to current directory

pilerexport -A

OR export all emails, one day at a time to a zip file, eg.

pilerexport --zip 20251219.zip --start-date 2025.12.19 --stop-date 2025.12.19

pilerexport --zip 20251220.zip --start-date 2025.12.20 --stop-date 2025.12.20

pilerexport --zip .....zip --start-date ..... --stop-date ....

Be sure to script it to cover all dates.

Hint: use a tmux session or similar, because this takes quite some time.

Step 5: Copy data to NEW Node

You may use a network share in the first place where you export the data to.

Step 6: Import Data on NEW Node

Assuming data is in /mnt/emldir directory, run the below command

pilerimport -r -d /mnt/emldir

The above command imports all eml files, and removes what's already processed

Step 7: Verify Migration

Verify that legacy emails are gradually present on NEW node

Method 2: Raw Data Copy

Important: This method requires identical Piler, MySQL, and Manticore versions on both OLD and NEW nodes. Stop all Piler services before proceeding.

Step 1: Stop Services on OLD Node

Stop Piler, MySQL, and Manticore services

#

Step 2: Copy MySQL Database

Copy raw MySQL data directory or using mysqldump

#

Step 3: Copy Manticore Indexes

Copy Manticore index files

#

Step 4: Copy Email Archive Files

Copy the email archive directory (typically /var/piler/store)

# Use rsync or scp commands

Step 5: Copy Configuration Files

Copy piler.conf, piler.key, and other configuration files

#

Step 6: Start Services on NEW Node

Start and verify services on the new node

#

Step 7: Verify Migration

Verify that all daemons are running, and the UI displays the archived emails just fine.

Additional Resources