Update database-migration.md
This commit is contained in:
parent
cec40e384c
commit
252de2f233
2 changed files with 23 additions and 25 deletions
|
|
@ -134,7 +134,7 @@ Migrate your CoreProtect database between SQLite and MySQL. Console-only command
|
|||
|
||||
| Command | Parameters |
|
||||
| --- | --- |
|
||||
| /co migrate-db | `<sqlite\|mysql>` |
|
||||
| /co migrate-db | `<sqlite|mysql>` |
|
||||
|
||||
> **Note:** This feature is exclusive to CoreProtect 23.0+ Patreon builds for Patron supporters.
|
||||
|
||||
|
|
|
|||
|
|
@ -16,11 +16,11 @@ The `/co migrate-db` command allows you to seamlessly transfer all your CoreProt
|
|||
|
||||
| Command | Parameters | Description |
|
||||
| --- | --- | --- |
|
||||
| `/co migrate-db` | `<sqlite\|mysql>` | Migrate to the specified database type |
|
||||
| `/co migrate-db` | `<sqlite|mysql>` | Migrate to the specified database type |
|
||||
|
||||
**Examples:**
|
||||
* `/co migrate-db mysql` - Migrate from SQLite to MySQL
|
||||
* `/co migrate-db sqlite` - Migrate from MySQL to SQLite
|
||||
- `/co migrate-db mysql` - Migrate from SQLite to MySQL
|
||||
- `/co migrate-db sqlite` - Migrate from MySQL to SQLite
|
||||
|
||||
> **Console Only:** This command can only be executed from the server console, not from in-game.
|
||||
|
||||
|
|
@ -33,25 +33,24 @@ The `/co migrate-db` command allows you to seamlessly transfer all your CoreProt
|
|||
**Before starting the migration:**
|
||||
|
||||
1. **Ensure your server is running** with your current CoreProtect database
|
||||
2. **Backup your existing database** (recommended safety measure)
|
||||
3. **Configure your target database** in `config.yml`:
|
||||
* For MySQL migration: Set up your MySQL connection details
|
||||
* For SQLite migration: Ensure the SQLite file path is configured
|
||||
4. **Important:** Do NOT restart your server or use `/co reload` after modifying the config
|
||||
2. **Configure your new database** in `config.yml`:
|
||||
* For MySQL migration: Set up your new MySQL connection details
|
||||
* Ensure `use-mysql` is updated correctly in your `config.yml`
|
||||
3. **Important:** Do NOT restart your server or use `/co reload` after modifying the config
|
||||
|
||||
### Step 2: Execute Migration
|
||||
|
||||
1. **Run the migration command** from your server console:
|
||||
#### 1. **Run the migration command from your server console:**
|
||||
```
|
||||
co migrate-db <target_type>
|
||||
co migrate-db <mysql|sqlite>
|
||||
```
|
||||
|
||||
2. **Monitor the progress:**
|
||||
#### 2. **Monitor the progress:**
|
||||
* The migration will display detailed progress information
|
||||
* Large databases may take considerable time to complete
|
||||
* Progress bars and speed indicators will show current status
|
||||
|
||||
3. **Do not interrupt the process:**
|
||||
#### 3. **Do not interrupt the process:**
|
||||
* Avoid restarting your server during migration
|
||||
* Let the process complete naturally
|
||||
|
||||
|
|
@ -60,7 +59,7 @@ The `/co migrate-db` command allows you to seamlessly transfer all your CoreProt
|
|||
**After successful completion:**
|
||||
|
||||
1. **Automatic switchover:** CoreProtect will automatically begin using the new database
|
||||
2. **Verify configuration:** Ensure `use-mysql` is set correctly in your `config.yml`
|
||||
2. **Verify configuration:** Ensure `use-mysql` is set correctly in your `config.yml` as per step 1
|
||||
3. **Test functionality:** Perform basic CoreProtect operations to verify everything works
|
||||
4. **Clean up:** Once satisfied, you may manually delete your old database files
|
||||
|
||||
|
|
@ -71,7 +70,7 @@ The `/co migrate-db` command allows you to seamlessly transfer all your CoreProt
|
|||
### Migration Safety
|
||||
|
||||
* **Non-destructive process:** The migration does not modify or delete your existing database
|
||||
* **Rollback capability:** If something goes wrong, simply delete the new database and continue using the old one
|
||||
* **Interrupted migration:** If something goes wrong, simply delete the new database and continue using the old one
|
||||
* **Data verification:** The process includes automatic verification to ensure data integrity
|
||||
|
||||
### Performance & Requirements
|
||||
|
|
@ -83,7 +82,6 @@ The `/co migrate-db` command allows you to seamlessly transfer all your CoreProt
|
|||
### Restrictions & Limitations
|
||||
|
||||
* **Console only:** Cannot be executed from in-game chat
|
||||
* **Single direction:** Cannot migrate to the same database type currently in use
|
||||
* **Interruption handling:** If interrupted, the target database must be manually wiped before restarting
|
||||
* **Patreon exclusive:** Only available in CoreProtect 23.0+ Patreon builds
|
||||
|
||||
|
|
@ -117,10 +115,10 @@ The `/co migrate-db` command allows you to seamlessly transfer all your CoreProt
|
|||
|
||||
If you encounter issues with database migration:
|
||||
|
||||
1. **Check server logs** for detailed error messages
|
||||
2. **Verify database permissions** and connectivity
|
||||
3. **Ensure adequate system resources** (RAM, CPU, disk space)
|
||||
4. **Contact support** through the CoreProtect Discord with specific error details
|
||||
1. Check server logs for detailed error messages
|
||||
2. Verify database permissions and connectivity
|
||||
3. Ensure adequate system resources (RAM, CPU, disk space)
|
||||
4. Contact support through the CoreProtect Discord with specific error details
|
||||
|
||||
---
|
||||
|
||||
|
|
@ -128,11 +126,11 @@ If you encounter issues with database migration:
|
|||
|
||||
The migration process includes several advanced features:
|
||||
|
||||
* **Batch processing** with dynamic sizing based on performance
|
||||
* **Automatic retry** mechanisms for temporary failures
|
||||
* **Data integrity verification** comparing source and target records
|
||||
* **Progress tracking** with estimated completion times
|
||||
* **Graceful error handling** with detailed logging
|
||||
* Batch processing with dynamic sizing based on performance
|
||||
* Automatic retry mechanisms for temporary failures
|
||||
* Data integrity verification comparing source and target records
|
||||
* Progress tracking with estimated completion times
|
||||
* Graceful error handling with detailed logging
|
||||
|
||||
The migration handles all CoreProtect data types including:
|
||||
* Block changes and rollbacks
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue