Move projects between CodeHero servers with all data intact.
CodeHero supports two types of backups:
| Type | Contents | Use Case |
|---|---|---|
| Regular Backup | Files only (web + app) | Quick restore on same server |
| Migration Backup | Files + Database + Tickets + Conversations | Move to different server |
- Go to Project → Settings tab
- Scroll to Export for Migration section
- Choose export type:
- Export Full - Includes conversation history
- Export Light - Without conversations (smaller file)
- Click to download the ZIP file
| Component | Full Export | Light Export |
|---|---|---|
| Web files | Yes | Yes |
| App files | Yes | Yes |
| Database dump | Yes | Yes |
| Project settings | Yes | Yes |
| Tickets | Yes | Yes |
| Ticket dependencies | Yes | Yes |
| Conversations | Yes | No |
The Export for Migration section shows existing backups for the current project:
- Download - Download the backup file
- Delete - Remove old backups to free space
- Refresh - Reload the list
Backups are stored in /var/backups/codehero/migrations/
- Go to Projects page
- Click Import Project
- Select Migration tab
- Choose import method:
- Upload File - Upload ZIP from your computer
- Select Existing - Choose from backups already on server
| Option | Description |
|---|---|
| New Project Name | Optional - rename the project |
| Web Path | Where to put web files (default: /var/www/projects/{name}) |
| App Path | Where to put app files (optional) |
- Creates new project with unique code (avoids conflicts)
- Creates database and user with new credentials
- Imports database dump
- Copies files to specified paths
- Recreates tickets with same statuses and priorities
- Restores dependencies between tickets
- Restores conversations (if Full export)
For regular backups (not migration backups), use Simple Import:
- Go to Projects page
- Click Import Project
- Select Simple tab
- Upload your backup ZIP
This imports:
- Web/App files
- Database (schema + data)
Does NOT import:
- Tickets
- Conversations
- Project metadata
Old Server New Server
─────────── ──────────
1. Export Full ──────────────► 2. Import Migration
(download ZIP) (upload ZIP)
Same Server
───────────
1. Export Full
2. Import Migration with new name
→ Creates separate project
1. Export Full (keep safe)
2. Make risky changes
3. If needed: Import to restore
Migration backup ZIP structure:
project-migration-YYYYMMDD-HHMMSS.zip
├── backup_info.json # Metadata (version, type, counts)
├── project_data.json # Project settings
├── tickets.json # All tickets
├── dependencies.json # Ticket dependencies
├── conversations.json # Chat history (Full only)
├── web/ # Web files
│ └── ...
├── app/ # App files (if exists)
│ └── ...
└── database/
└── full_dump.sql # Complete database dump
The import uses CodeHero's database user which has CREATE USER privileges. If you see access denied:
- Check that MySQL is running:
systemctl status mysql - Verify claude_user has proper privileges:
SHOW GRANTS FOR 'claude_user'@'localhost';
Check for SQL files in the backup:
unzip -l backup.zip | grep -E "\.sql$"Should show database/full_dump.sql for migration backups.
Verify the paths exist and have correct permissions:
ls -la /var/www/projects/
ls -la /opt/apps/If a project with the same code exists, import automatically generates a unique code (e.g., PROJ → PROJ1).
- Always test on staging first before migrating production projects
- Keep migration backups until you verify the import worked
- Use Full export if you need ticket conversation history
- Use Light export for faster transfers when history isn't needed
- Check disk space before large exports/imports
For large projects or automation:
# On source server - create backup
cd /var/backups/codehero/migrations/
# (use web UI to export)
# Transfer to new server
scp project-migration-*.zip user@newserver:/tmp/
# On new server - import via web UI
# Or place in /var/backups/codehero/migrations/ and select "Existing"- Backup & Restore - Regular backups
- Project Settings - Configure projects