Skip to content

Commit 252de2f

Browse files
committed
Update database-migration.md
1 parent cec40e3 commit 252de2f

File tree

2 files changed

+23
-25
lines changed

2 files changed

+23
-25
lines changed

docs/commands.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ Migrate your CoreProtect database between SQLite and MySQL. Console-only command
134134

135135
| Command | Parameters |
136136
| --- | --- |
137-
| /co migrate-db | `<sqlite\|mysql>` |
137+
| /co migrate-db | `<sqlite|mysql>` |
138138

139139
> **Note:** This feature is exclusive to CoreProtect 23.0+ Patreon builds for Patron supporters.
140140

docs/database-migration.md

Lines changed: 22 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ The `/co migrate-db` command allows you to seamlessly transfer all your CoreProt
1616

1717
| Command | Parameters | Description |
1818
| --- | --- | --- |
19-
| `/co migrate-db` | `<sqlite\|mysql>` | Migrate to the specified database type |
19+
| `/co migrate-db` | `<sqlite|mysql>` | Migrate to the specified database type |
2020

2121
**Examples:**
22-
* `/co migrate-db mysql` - Migrate from SQLite to MySQL
23-
* `/co migrate-db sqlite` - Migrate from MySQL to SQLite
22+
- `/co migrate-db mysql` - Migrate from SQLite to MySQL
23+
- `/co migrate-db sqlite` - Migrate from MySQL to SQLite
2424

2525
> **Console Only:** This command can only be executed from the server console, not from in-game.
2626
@@ -33,25 +33,24 @@ The `/co migrate-db` command allows you to seamlessly transfer all your CoreProt
3333
**Before starting the migration:**
3434

3535
1. **Ensure your server is running** with your current CoreProtect database
36-
2. **Backup your existing database** (recommended safety measure)
37-
3. **Configure your target database** in `config.yml`:
38-
* For MySQL migration: Set up your MySQL connection details
39-
* For SQLite migration: Ensure the SQLite file path is configured
40-
4. **Important:** Do NOT restart your server or use `/co reload` after modifying the config
36+
2. **Configure your new database** in `config.yml`:
37+
* For MySQL migration: Set up your new MySQL connection details
38+
* Ensure `use-mysql` is updated correctly in your `config.yml`
39+
3. **Important:** Do NOT restart your server or use `/co reload` after modifying the config
4140

4241
### Step 2: Execute Migration
4342

44-
1. **Run the migration command** from your server console:
43+
#### 1. **Run the migration command from your server console:**
4544
```
46-
co migrate-db <target_type>
45+
co migrate-db <mysql|sqlite>
4746
```
4847

49-
2. **Monitor the progress:**
48+
#### 2. **Monitor the progress:**
5049
* The migration will display detailed progress information
5150
* Large databases may take considerable time to complete
5251
* Progress bars and speed indicators will show current status
5352

54-
3. **Do not interrupt the process:**
53+
#### 3. **Do not interrupt the process:**
5554
* Avoid restarting your server during migration
5655
* Let the process complete naturally
5756

@@ -60,7 +59,7 @@ The `/co migrate-db` command allows you to seamlessly transfer all your CoreProt
6059
**After successful completion:**
6160

6261
1. **Automatic switchover:** CoreProtect will automatically begin using the new database
63-
2. **Verify configuration:** Ensure `use-mysql` is set correctly in your `config.yml`
62+
2. **Verify configuration:** Ensure `use-mysql` is set correctly in your `config.yml` as per step 1
6463
3. **Test functionality:** Perform basic CoreProtect operations to verify everything works
6564
4. **Clean up:** Once satisfied, you may manually delete your old database files
6665

@@ -71,7 +70,7 @@ The `/co migrate-db` command allows you to seamlessly transfer all your CoreProt
7170
### Migration Safety
7271

7372
* **Non-destructive process:** The migration does not modify or delete your existing database
74-
* **Rollback capability:** If something goes wrong, simply delete the new database and continue using the old one
73+
* **Interrupted migration:** If something goes wrong, simply delete the new database and continue using the old one
7574
* **Data verification:** The process includes automatic verification to ensure data integrity
7675

7776
### Performance & Requirements
@@ -83,7 +82,6 @@ The `/co migrate-db` command allows you to seamlessly transfer all your CoreProt
8382
### Restrictions & Limitations
8483

8584
* **Console only:** Cannot be executed from in-game chat
86-
* **Single direction:** Cannot migrate to the same database type currently in use
8785
* **Interruption handling:** If interrupted, the target database must be manually wiped before restarting
8886
* **Patreon exclusive:** Only available in CoreProtect 23.0+ Patreon builds
8987

@@ -117,22 +115,22 @@ The `/co migrate-db` command allows you to seamlessly transfer all your CoreProt
117115

118116
If you encounter issues with database migration:
119117

120-
1. **Check server logs** for detailed error messages
121-
2. **Verify database permissions** and connectivity
122-
3. **Ensure adequate system resources** (RAM, CPU, disk space)
123-
4. **Contact support** through the CoreProtect Discord with specific error details
118+
1. Check server logs for detailed error messages
119+
2. Verify database permissions and connectivity
120+
3. Ensure adequate system resources (RAM, CPU, disk space)
121+
4. Contact support through the CoreProtect Discord with specific error details
124122

125123
---
126124

127125
## Technical Details
128126

129127
The migration process includes several advanced features:
130128

131-
* **Batch processing** with dynamic sizing based on performance
132-
* **Automatic retry** mechanisms for temporary failures
133-
* **Data integrity verification** comparing source and target records
134-
* **Progress tracking** with estimated completion times
135-
* **Graceful error handling** with detailed logging
129+
* Batch processing with dynamic sizing based on performance
130+
* Automatic retry mechanisms for temporary failures
131+
* Data integrity verification comparing source and target records
132+
* Progress tracking with estimated completion times
133+
* Graceful error handling with detailed logging
136134

137135
The migration handles all CoreProtect data types including:
138136
* Block changes and rollbacks

0 commit comments

Comments
 (0)