| ... | ... | @@ -65,12 +65,41 @@ python -c "from database import init_db; init_db()" |
|
|
|
|
|
|
|
## Server Registration
|
|
|
|
|
|
|
|
Register migration servers:
|
|
|
|
**Important:** Servers must be registered in the database (not just configured in `.env`).
|
|
|
|
|
|
|
|
The `.env` file contains server configuration (TEMP01_HOST, TEMP02_HOST, etc.), but these are used by legacy code. The main automation system uses servers from the database.
|
|
|
|
|
|
|
|
### Register Servers
|
|
|
|
|
|
|
|
1. Edit `utils/register_servers.py` with your server details:
|
|
|
|
- `server_name`: Server identifier (TEMP01, TEMP02, TEMP03)
|
|
|
|
- `host`: Server hostname
|
|
|
|
- `api_url`: Server API URL
|
|
|
|
- `api_key`: Server API key
|
|
|
|
- `gwme_path`: GWME installation path
|
|
|
|
- `pst_folder`: PST export folder path
|
|
|
|
- `max_batch_size`: Maximum users per batch
|
|
|
|
|
|
|
|
2. Run the registration script:
|
|
|
|
|
|
|
|
```bash
|
|
|
|
python utils/register_servers.py
|
|
|
|
```
|
|
|
|
|
|
|
|
This creates/updates server records in the `migration_servers` table.
|
|
|
|
|
|
|
|
### Verify Registered Servers
|
|
|
|
|
|
|
|
```bash
|
|
|
|
python -m db_utils servers
|
|
|
|
```
|
|
|
|
|
|
|
|
Or query directly:
|
|
|
|
|
|
|
|
```bash
|
|
|
|
python -m run_sql "SELECT * FROM migration_servers"
|
|
|
|
```
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
**See also:** [Operations](https://gitlab.digiheritage.com.my/hanif/automated-email-migration/-/wikis/Operations), [Deployment](https://gitlab.digiheritage.com.my/hanif/automated-email-migration/-/wikis/Deployment)
|
| ... | ... | |