Поиск по ключевым словам

Database migration

Please see instruction for database migration of VetAIS system.

VetAIS database is managed by PostgreSQL engine version 9.X or never. In default configuration are database files stored in «c:\vetais_data\» and on Windows-based systems is created system service with name «vetais_postgres». Note: this can differ in manual installation.

1. Database migration with SQL dump

1.1) close all VetAIS instances on all stations
1.2) on server machine do database backup from VetAIS or via dbbackup.jar utility
1.3) it will create two files, full dump with file extension SQL and same file packed via ZIP
1.4) copy this both files into new server for example as c:\old_database\dbdump.sql
1.5) download and install PostgreSQL into new server (use version 9.X or never what you can download here)
1.6) during installation we propose to install Postgre files into «c:\vetais_postgres», data files into «c:\vetais_data», use TCP port 5454 and default «postgres» password «vetais» — you can change it if you like but will probably need change configuration in VetAIS then
1.7) after installation open command line of Windows and use these commands to restore:

cd c:\vetais_postgres\bin
psql -p 5454 -U postgres

after you put «postgres» password it will open PSQL console where you need to create new database as command:

create database vetais;

then close PSQL console with command:

\q

restore database dump then with command:

psql -p 5454 -U postgres vetais < c:\old_database\dbdump.sql

You will be asked for «postgres» password again and you database will going to be restored.

2. Database migration as binary copy

In cases you migrate to new server and will use EXACTLY SAME version of Postgres on old and new server you can follow these steps:

2.1) close all VetAIS instances
2.2) open Windows Services manager and find service called «vetais_postgres» (in rare cases can be called as PostgresXY»)
2.3) stop this service and wait until it stopped
2.4) pack directory «c:\vetais_data» and copy this packed file into new server
2.5) on new server install VetAIS from standard package
2.6) as on old server in point 2.2 find and close Postgre service!
2.7) rename empty database file on new server from «c:\vetais_data» to «c:\vetais_data_old»
2.8) unpack database files you created in point 2.4 to «c:\vetais_data»
2.9) open folder Properties in Windows and grant full rights to all users or user «anyone» to folder «c:\vetais_data»
2.10) start Postgre service from Service manager
2.11) in case of problems you can see log in «c:\vetais_data\log»

3. Database migration from VetAIS restore

You can also use simple instruction to restore database from VetAIS.

3.1) close all VetAIS clients
3.2) on server machine do database backup from VetAIS or via dbbackup.jar utility
3.3) it will create two files, full dump with file extension SQL and same file packed via ZIP
3.4) copy this both files into new server for example as c:\old_database\dbdump.sql
3.5) on new server install VetAIS demoversion from setup package
3.6) log into demoversion as Administrator with password «admin»
3.7) on top text menu select Settings and tab Database, click to button Restore
3.8) find file on «c:\old_database\dbdump.sql» and set new restrored database name as «vetaisnew»
3.9) after restore find on new server application «pgadmin» and run it
3.10) log with password «vetais» onto local PostgreSQL server
3.11) you will see two databases, «vetais» and «vetaisnew», rename «vetais» to «vetaisdemo» and «vetaisnew» to «vetais»

Добавить комментарий