Migrating data from another database - Micetro - 26.1.0

Micetro Reference Articles

ft:locale
en-US
Product name
Micetro
Version
26.1.0

The PostgreSQL High Availability (HA) setup includes the database mmsuite, but it does not contain any data. If you have a pre-existing database, you need to migrate the data to the new setup.

To migrate your data from another database:

  1. Create a dump using pg_dump:
    pg_dump -U postgres -p [pre-existing-database-port] -O mmsuite > mmsuite_dump.sql
    
  2. If you have already created the mmsuite database on the PostgreSQL HA server, you should delete it first and then recreate it:
    psql -U postgres -p [port] -c "DROP DATABASE mmsuite;"
    psql -U postgres -p [port] -c "CREATE DATABASE mmsuite ENCODING = 'UTF8' LC_CTYPE = 'POSIX' LC_COLLATE='POSIX' TEMPLATE template0;"
  3. Execute the commands in the dump file to copy the data:
    psql -U postgres -p [port] -d mmsuite -f mmsuite_dump.sql