Use this scenario if the migration is performed on a new clean server. |
Perform the necessary preliminary steps as described in the Preparation for installation section.
Install and configure PostgreSQL and ClickHouse as described in the Installing the database section.
Back up all data as described in the Preliminary steps section.
Copy the backup folder along with all its contents from the source server to the new one.
For data transfer, it is recommended to use the scp utility, which provides secure copying via SSH.
scp -r ~/backup user@remote-server:~ |
After the transfer, switch to the backup folder in the home directory on the new server:
cd ~/backup |
sudo -u postgres psql -c "CREATE USER core; ALTER USER core WITH PASSWORD 'core'; ALTER USER core WITH SUPERUSER;" |
If necessary, change the password to a more secure one. The examples use the default password and username. |
Download database with version 1.3.0.
sudo -u postgres createdb core sudo -u postgres psql -d core -f evi-backup.dump |
Ensure that the dump is downloaded correctly. |
wget https://archive.eltex-co.ru/evi-raw/evi-1.4.0/db_migration-1.3.0-1.4.0.zip unzip db_migration-1.3.0-1.4.0.zip cd db_migration-1.3.0-1.4.0 |
sudo bash migrate.sh <host> <user> <password> <psql_db_name_from> <psql_db_name_to> <psql_port> <ch_def_user_password> <ch_db_name> |
sudo bash migrate.sh localhost core core core core 5432 core core |
After successfully executing the migration script, the message Restoring DB done <3 will appear in the console.
Then proceed to the Installing and configuring EVI services after migration section.