Creating a temporary directory
Create a temporary folder for backup and migration files in the user's home directory:
Creating a temporary directory
mkdir ~/backup cd ~/backup
Configuration files backup
This script is needed to compare the configuration files of versions 1.4.0 and 1.3.0.
Configuration files backup
sudo cp /opt/evi-*/*.conf . sudo cp /etc/nginx/sites-available/evi-core-web .
Database backup
Before dumping the database, it is necessary to stop the services.
Stopping all services with version 1.3.1
sudo systemctl stop nginx evi-core evi-scud evi-live evi-archive evi-analyzer
Disconnecting clients from the database
echo "SELECT pg_terminate_backend(pid) FROM pg_stat_activity where usename='core'" | sudo -u postgres psql -A -t
Perform a dump of the current PostgreSQL database (version 1.3.1):
Database backup
sudo -u postgres pg_dump core > evi-backup.dump
To verify the presence of the evi-backup.dump file in the user's home directory in the backup subfolder, perform the following steps:
Verifying the presence of the evi-backup.dump file
ls -lh | grep evi-backup.dump
The file is present in the backup folder.
-rw-rw-r-- 1 user user 7.4G Jul 29 14:49 evi-backup.dump
Then proceed to the Migration on the current server or Migration on a new server step, depending on requirements.