Home › Forums › Miria forums – EN › Miria : How To ? › Restore Miria PostgreSQL DB – Linux
- This topic has 0 replies, 1 voice, and was last updated 1 year, 7 months ago by
Eric Collart.
Viewing 0 reply threads
-
AuthorPosts
-
-
26 October 2021 at 16 h 37 min #10488
Eric Collart
KeymasterNote: Restoration method changed for Miria 2021 R2 (3.14) and later, the below procedure cannot be used for those newer versions.
Tested with Miria 3.12.0.11 installed in folder /Miria on a CentOS 8.4 server.
Standard PostgreSQL port 5433 is used.
Test DB to restore is compressed, named miria-centos8_5433_DATA_Backup.bz2 and located in /root.
Note: this article doesn’t cover the eventual AMM database restore.- Prepare new Linux server
- Run first Linux updates
- yum update
- Reboot for safety
- reboot
- Install good version of Miria Server + AMM server if needed
- Optional: Install Admin UI on a Windows workstation if needed
- Optional: Connect to Miria Linux server as root (and define first password) with Admin UI or Web UI
- Only if step 6 done: disconnect from DB
- Stop services
- systemctl stop ADA_ADA
- systemctl stop amm_agent
- systemctl stop amm_server
- systemctl stop amm_db
- systemctl stop ADADB_ADA
- Check there is no more process with name starting by “ada”
- ps -ef | grep -i ada
- Rename actual data folder to data.old
- cd /Miria/Database/PostgreSQL
- mv data data.old
- Copy an empty data cluster (provided by Miria)
- mkdir data
- cp /Miria/Tools/empty_ADA_cluster.tgz /Miria/Database/PostgreSQL/data/
- gunzip data/empty_ADA_cluster.tgz
- cd data
- tar -xvf empty_ADA_cluster.tar
- cd ..
- mkdir data/log
- sudo chown -R postgres:postgres data
- sudo chmod -R 700 data
- Copy the previous database configuration
- cp data.old/postgresql.conf data/
- Answer “y” to replace the existing file
- cp data.old/postgresql.conf data/
- Restart the PostgreSQL ADADB_ADA service
- systemctl start ADADB_ADA
- Unzip the backup file
- bunzip2 /root/miria-centos8_5433_DATA_Backup.bz2
- Restore the database
- su postgres
- cd /Miria/Database/PostgreSQL/bin
- ./psql -p 5433 -q -f ../miria-centos8_5433_DATA_Backup
- Enter “postgres” without the quote as password
- exit (when finished)
- Restart Miria services
- systemctl start amm_db
- systemctl start amm_server
- systemctl start amm_agent
- systemctl start ADA_ADA
-
-
AuthorPosts
Viewing 0 reply threads
- You must be logged in to reply to this topic.
Sujets / Topics
- Tina 4.8.1 Controlled Release is available
- PowerShell for Lina 6.0
- Advisory ID : LINA/ADE-2023-0002
- Advisory ID : LINA/ADE-2023-0001
- Miria 4.0 is available
- Lina 6.0 is available !
- Tina 4.7.1 GA is available
- Recent Tina versions require CentOS 7 minimum
- Lina 5.3.4 requires CentOS 7 minimum
- How to remove the HTTP port in Miria
Flux RSS / RSS Subscription
Tous les articles
Tous les sujets (forums)
All articles
All Topics (forums)
Tous les articles
Tous les sujets (forums)
All articles
All Topics (forums)