Published : 10 Jun 2025
I self-host Umami Analytics for my web apps. Recently I had to move it to a new VPS. This is how I did it:
docker exec -t umami_db_1 pg_dump -U umami -d umami > umami_backup.sql
Here umami_db_1 is the name of the db container. It will save the backup in your current directory.
SSH into the new VPS.
Clone the umami repo.
git clone https://github.com/umami-software/umami.git
Move the db backup from old VPS to new VPS.
cd into the umami directory on the new VPS.
Start the db container.
docker-compose up -d db
Remember to only start the db container and not the app container because if you start both the containers, it will run the migrations on the db and later we will not be able to restore data from our backup because to restore the backup, we need a fresh db instance.
docker exec -i umami_db_1 psql -U umami -d umami < umami_backup.sql
The migration is complete, you should be able to access your umami app with all your data intact.