Moving FunnelFlux to another server
Note: This guide applies to FunnelFlux 2.0 and later installations that use ClickHouse.
To move FunnelFlux to another server:
- Set up the new server.
- Export MySQL data from server A and import it on server B.
- Update your DNS settings to point traffic to server B.
- Export ClickHouse analytics data from server A and import it on server B.
- Review, then terminate server A.
Set up a new server
Section titled “Set up a new server”Set up the new server the same way as any FunnelFlux installation, either with our scripts or yourself.
See Installing FunnelFlux for the current path, or the provider walkthroughs for Vultr and DigitalOcean. If you set the server up yourself, see Minimum installation requirements.
We strongly recommend a standalone server that runs only FunnelFlux, without cPanel, Plesk or similar. If you use our scripts, use a fresh Ubuntu 24.04 LTS server.
The scripts only support Ubuntu 24.04. Choosing another OS will cause issues, and we will not fix those issues for you. We don’t act as sysadmins for customers, so if you don’t have sysadmin experience yourself, keep your setup standard.
To get your license key and the FunnelFlux download, use the chat in your FunnelFlux dashboard or email support@funnelflux.com.
Our scripts always name the MySQL database flux_db, so the old and new server use the same database name.
If you set up either server yourself, check the database name in includes/appConfig.php (the DB_NAME setting) and use the same name on the new server.
Once the server is set up, you don’t need to log in or do anything else, because you are about to import and overwrite the MySQL data.
Export MySQL data from server A
Section titled “Export MySQL data from server A”You don’t need to stop traffic on the original server at this stage.
On the original server, connect via SSH and run:
mysqldump --hex-blob ##DB_NAME## affiliate_networks campaign_funnel_connections campaign_funnel_nodes campaign_funnel_paths campaign_funnels campaigns code_snippets conditions domains meta page_categories pages rights_management stored_links stored_links_tags stored_links_visits tags traffic_filters traffic_source_categories traffic_source_url_params traffic_sources users visit_tags > /tmp/dump.sqlReplace ##DB_NAME## with the database name (flux_db on servers set up with our scripts).
Run the command as root, or add -u and -p with the DB_USER and DB_PWD values from includes/appConfig.php.
This writes the SQL file to /tmp/dump.sql.
Download this file. It is usually small, so you can download it over SFTP.
Connect to server B and upload the file.
On server B, make sure the FunnelFlux database exists (it will if you ran the full installation as usual), then import the file:
sudo mysql flux_db < /tmp/dump.sqlThis is why you should use the same database name on both servers: the import then overwrites the data in the database the new server actually uses.
Go to your FunnelFlux login page. Your old username and password will work, and after logging in you should see all your funnels, pages and other configuration, but no analytics data.
Update your DNS settings
Section titled “Update your DNS settings”Now that the new server has your funnels and configuration, update your DNS settings to point to it and divert traffic to it.
As soon as you do this, check links generated in the new system and confirm everything works as expected. We suggest creating a new funnel, generating links in it, and testing those. They are new and unique, so they confirm that traffic is routing through the new server.
If you have live traffic running, you should get no downtime and will see analytics data appearing on the new server.
During this time, postbacks can arrive at the new server for hits that don’t exist there, because they were created on the old server. This is unavoidable. You can upload those conversions again later to reconcile them.
Next, export the data from the old server to reconcile fully.
Export ClickHouse data from server A
Section titled “Export ClickHouse data from server A”With all traffic going to server B, dump the analytics data from server A.
This is usually much more data than the MySQL dump, so it takes longer.
On server A, first check that it is no longer receiving traffic. For example:
- Create a new DNS record pointing
old.domain.comto the old IP. - Ask our support team to detach your license (use the chat in your FunnelFlux dashboard or email support@funnelflux.com).
- Log in to the old tracker via
old.domain.com. - Use reporting to check whether it is receiving new visits. Group by 15-minute blocks, for example, and check that the most recent ones have no data.
- If it isn’t, have the license detached again and log in to the new tracker to re-attach it to your normal domain.
You can now dump the data from ClickHouse.
To be safe, you can stop Nginx so no new requests or data come in:
systemctl stop nginxThen run:
clickhouse-client --port 9000 --password '#####' --query="SELECT * FROM ff_events FORMAT TabSeparated" > /tmp/ch-dump.tsvReplace ##### with your ClickHouse password.
It is the CLICKHOUSE_DB_PASS setting in includes/appConfig.php in the FunnelFlux folder.
FunnelFlux stores all analytics events in the ff_events table of the default ClickHouse database, and our scripts set ClickHouse’s native port to 9000.
This takes some time and writes the data to the TSV file.
The file can be large. Do not put it in the web root, because anyone who guesses the URL could download your data. Copy it straight from the old server to the new one over SSH instead. From the new server, run:
scp root@OLD_SERVER_IP:/tmp/ch-dump.tsv /tmp/ch-dump.tsvReplace OLD_SERVER_IP with the old server’s IP address.
If you stopped Nginx earlier, SSH still works.
Then check the copy on the new server:
ls -lh /tmp/ch-dump.tsvCheck that the file size matches the file on the old server.
Import it into ClickHouse on the new server.
Use the new server’s ClickHouse password, from includes/appConfig.php on the new server:
clickhouse-client --port 9000 --password '#####' --query="INSERT INTO ff_events FORMAT TabSeparated" < /tmp/ch-dump.tsvWhen the import completes, sign in at /admin/login.php and refresh the Dashboard at /v2-ui/.
You should see all your old data.
Cleanup
Section titled “Cleanup”Delete /tmp/ch-dump.tsv and /tmp/dump.sql on both servers after the import.
You can decommission your old server, but we recommend keeping it for several days. If you run into issues, you can roll back to it by reverting your DNS changes.
We also recommend taking a snapshot of the old server before terminating it.

