Data Operations
Commands for synchronizing and migrating data between PteroCA and Pterodactyl.
Synchronize Data
The pteroca:data:sync command is a utility designed to ensure data consistency between the PteroCA panel and the connected Pterodactyl instance. It is primarily used to synchronize critical data, such as API keys, ensuring seamless integration and communication between the two systems.
Command:
pteroca:data:syncAlias:
app:synchronize-data(deprecated, removed in v1.0.0)
At present, this command specifically handles the synchronization of Pterodactyl API keys for users in the PteroCA panel. However, its scope can be extended in the future to include additional synchronization processes as required.
Examples
# Recommended (v0.6+)
docker exec pteroca_web_dev php bin/console pteroca:data:sync
# Deprecated (still works until v1.0.0)
docker exec pteroca_web_dev php bin/console app:synchronize-dataWhat It Synchronizes
Currently synchronizes:
Pterodactyl API keys for PteroCA users
User account data consistency
Authentication credentials
Migrate Servers
The pteroca:data:migrate-servers command is a maintenance utility responsible for migrating servers from a remote Pterodactyl panel into your PteroCA instance and associating them with existing user accounts. It walks through each server it finds, skips those already imported or whose owner is not yet registered in PteroCA, and interactively guides you through migration.
Command:
pteroca:data:migrate-serversAlias:
pterodactyl:migrate-servers(deprecated, removed in v1.0.0)
Options
--limit[=LIMIT]: Maximum number of servers to fetch and process in one run (default: 100)--dry-run: Show what would be done without making any changes
Examples
Interactive Steps
Confirm Migration:
Prompt: "Do you want to migrate server
<name>#<identifier>?"Default:
yes
Ask for Duration:
Prompt: "How long should the server be active? (in days)"
Default:
30Validation: must be a positive integer
Ask for Price:
Prompt: "How much should the server cost? (
<internal_currency>)"Validation: must be a positive number
Finalize Import:
Registers the server under the selected user
Sets the chosen billing period and rate
Applies suspension and renewal settings
Migration Workflow
Fetch Servers: Retrieves servers from Pterodactyl API (respects
--limit)Filter Servers: Skips already imported servers and servers without registered owners
Interactive Confirmation: Prompts for each server to migrate
Configure Billing: Sets duration (days) and price for the server
Import Server: Registers server in PteroCA with configured settings
Summary: Reports number of servers migrated, skipped, and any errors
Use Cases
Initial Import: Migrate existing Pterodactyl servers when setting up PteroCA
Batch Migration: Import servers in batches using
--limitPreview Migration: Use
--dry-runto see what would be imported without making changes
When to Use These Commands
Synchronize Data
Run this command when:
Setting up PteroCA for the first time after Pterodactyl integration
After manually creating users in Pterodactyl
API key synchronization issues occur
After restoring from backup
Migrate Servers
Run this command when:
Initially setting up PteroCA with existing Pterodactyl servers
Importing servers from another Pterodactyl instance
Recovering from data loss or backup restoration
Related Guides
CLI Commands Overview - Command reference home
Server Management Commands - Manage servers after migration
Pterodactyl Integration - Setup guide
Last updated