This commit is contained in:
@@ -14,12 +14,11 @@ The restoration process will restore all data entered in AyaNova to the point in
|
||||
|
||||
## Restore steps
|
||||
|
||||
|
||||
### New AyaNova server installation
|
||||
|
||||
If this is a restoration to a new computer that doesn't have AyaNova installed and confirmed running; then the first step is to [install AyaNova](ops-install.md)
|
||||
|
||||
It must be started and confirmed to be operating correctly **before** proceeded to the next step to ensure it's working and also so it can create the AyaNova database in PostgreSQL server correctly so it can be restored to later.
|
||||
It must be started and confirmed to be operating correctly **before** proceeded to the next step to ensure it's working and also so it can create the AyaNova database in PostgreSQL server correctly so it can be restored to later.
|
||||
|
||||
**PostgreSQL restore process requires the database to be present before restoring to it**
|
||||
|
||||
@@ -27,13 +26,13 @@ Once the AyaNova server is running and has created a database it must be shut do
|
||||
|
||||
### Shut down the AyaNova server
|
||||
|
||||
#### Server type installation
|
||||
#### AyaNova "Server" installation with standalone PostgreSQL server
|
||||
|
||||
For all "Server" installations of AyaNova, stop the AyaNova server but do _not_ stop the PostgreSQL server.
|
||||
For all "Server" installations of AyaNova with a separate standalone PostgreSQL server; stop the AyaNova server but do _not_ stop the PostgreSQL server.
|
||||
|
||||
#### Windows standalone "single" type installation
|
||||
|
||||
If this is a single standalone Windows installation configuration, PostgreSQL is stopped automatically when the AyaNova server is stopped so Postgre will need to be started manually from a command prompt.
|
||||
If this is a single standalone Windows installation configuration that starts a self contained database server, the self-contained PostgreSQL server is stopped automatically when the AyaNova server is stopped so PostgreSQL will need to be started manually from a command prompt in order to restore data to it.
|
||||
|
||||
Stop the AyaNova server first then start PostgreSQL from a command prompt.
|
||||
|
||||
@@ -43,11 +42,9 @@ If the default values were used during installation the command will be:
|
||||
"C:/Program Files/ayanova/local-postgres/bin/postgres.exe" -D "C:/ProgramData/ayanova/database" -p 5432
|
||||
```
|
||||
|
||||
Be sure to include the quotation marks exactly as written.
|
||||
|
||||
PostgreSQL will display `database system is ready to accept connections` indicating it's up and running and ready for restore. Do not stop PostgreSQL until directed to do so after restore below.
|
||||
|
||||
Be sure to include the quotation marks exactly as written.
|
||||
|
||||
PostgreSQL will display `database system is ready to accept connections` indicating it's up and running and ready for restore. Do not stop PostgreSQL until directed to do so after restore below.
|
||||
|
||||
### Identify the attachments data folder location
|
||||
|
||||
@@ -64,11 +61,36 @@ If there is any existing data then a file copy of the existing data folders to a
|
||||
|
||||
### Restore the database
|
||||
|
||||
Use the PostgreSQL pg_restore utility to restore the backup file to an **existing** AyaNova database.
|
||||
|
||||
If you do not have an existing AyaNova database to restore to, the AyaNova server will create one for you; start the server, allow it to create an empty db then shut it down again to restore.
|
||||
|
||||
### Restart the server
|
||||
The PostgreSQL utility pg_restore is used to restore the `.backup` file containing the database backup from AyaNova.
|
||||
|
||||
#### Server installation
|
||||
The command format is:
|
||||
`pg_restore -U postgres -c [PATH_TO_THE_AYANOVA_BACKUP_FILE_TO_BE_RESTORED.backup]`
|
||||
|
||||
#### Windows "single" standalone installation
|
||||
, keep it running until the restore has completed below then stop it with `ctrl-c` key strokes so AyaNova server can take control of it again later when restarted.
|
||||
Run the restore command from the console substituting your backup file path in the examples below:
|
||||
|
||||
Windows server:
|
||||
|
||||
```bat
|
||||
pg_restore -U postgres -c -d AyaNova "C:\temp\xfer\amsbackup\db-20211212195504569.backup"
|
||||
|
||||
```
|
||||
|
||||
Windows self contained "single" user installation:
|
||||
|
||||
```bat
|
||||
"C:/Program Files/ayanova/local-postgres/bin/pg_restore" -U postgres -c -d AyaNova "C:\temp\xfer\amsbackup\db-20211212195504569.backup"
|
||||
```
|
||||
|
||||
Linux server:
|
||||
|
||||
```bash
|
||||
pg_restore -U postgres -c -d AyaNova ~/downloads/db-20211212195504569.backup
|
||||
```
|
||||
|
||||
The restore will complete normally without any message if successful.
|
||||
|
||||
AyaNova can be re-started at this point, for server type installations restart through the IIS 'site' in Windows or the Service in Linux. If using the desktop single Windows installation, stop the PostgreSQL started in the earlier restore step by typing `ctrl-c` in the PostgreSQL console window then start AyaNova from the desktop launcher as normally.
|
||||
|
||||
Reference in New Issue
Block a user