Site administration
Run the analytics server
You run the ClickHouse server that keeps the analytics events, and you must keep them safe. Pick a task below, and sign in to the server to do it.
2 min read
The server is the one of Set up analytics.
Pick a task
- Back up the analytics database: set up the nightly backup, and see the last one.
- Restore an analytics backup: get the events back when the data of the server is lost.
- Load the batches that never got in: insert the events that the consumer wrote to R2.
- Delete the events of one person: when a person asks you to delete their events.
- Apply the rank rollup to a running server: add the table of the rankings to a server that does not have it.
Sign in to the server
Connect as root, with the SSH key that you added when you created the server:
ssh root@<server IPv4>
The clickhouse-client commands of these tasks run there.
- The admin user of ClickHouse is
default. It can sign in only from the server itself. - The password of
defaultis in/root/.clickhouse-admin. Only root can read this file. - The password of the user
ingestis only in the Worker secretCLICKHOUSE_PASSWORD.
Keep the server up to date
Ubuntu installs its security updates by itself, with
unattended-upgrades.When an update needs a restart, the file
/var/run/reboot-requiredexists. Then restart the server withreboot.Update ClickHouse with apt:
apt-get update DEBIAN_FRONTEND=noninteractive apt-get install --only-upgrade -y clickhouse-server clickhouse-client systemctl restart clickhouse-server
While ClickHouse or the server restarts, the consumer keeps its batches in the queue and tries them again later. No event is lost.