Migration Overview
Zipline supports two migration paths:- v3 to v4: Migrate from Zipline v3 to v4 (complete rewrite)
- v4 to v4: Transfer data between v4 instances
Before You Begin
- Migrations must be performed by a SUPERADMIN user
- Large exports (>1GB) may take significant time and memory
- The import endpoint has a 24GB body size limit (~/workspace/source/src/server/routes/api/server/import/v3.ts:36)
- Test migrations on a staging environment first
Migrating from Zipline v3 to v4
Export data from Zipline v3
In your Zipline v3 instance:
- Log in as an administrator
- Navigate to Manage → Export
- Select what to export:
- Users
- Files
- Folders
- URLs
- Settings
- Click Export Data
- Download the export JSON file
Transfer file storage
Copy your files from the v3 uploads directory to the v4 uploads directory:Local storage:S3 storage:
Set up Zipline v4
Deploy Zipline v4 following the installation guide.Ensure you have:
- A fresh v4 instance running
- A SUPERADMIN user created
- Access to the admin panel
Import data into v4
Use the v3 import API endpoint:Or import via the admin dashboard if available.
The import process maps v3 data structures to v4:
- Users (with passwords, OAuth, TOTP)
- Files (with metadata, views, expiration)
- Folders (with file associations)
- URLs (shortened links)
Verify the migration
After import completes:
-
Check the API response for import statistics:
- Log in with your v3 credentials
- Verify files are accessible
- Check folders and organization
- Test shortened URLs
Merge Import Option
You can import v3 data into an existing v4 user account:Migrating Between Zipline v4 Instances
Use this to transfer data between v4 instances or for backups.Export from source v4 instance
Use the export API endpoint:This exports:
- Users
- OAuth providers
- User quotas
- Passkeys
- Folders (with hierarchy)
- Files
- Tags
- URLs
- Invites
- Metrics (if enabled)
Import to destination v4 instance
settings: Import instance settings (default: false)mergeCurrentUser: Merge specified user into current admin account
Import Behavior
Conflict Resolution
When importing data, conflicts are handled as follows:Users
Users
v3 import: Skipped if username exists (~/workspace/source/src/server/routes/api/server/import/v3.ts:69-76)v4 import: Skipped if username OR user ID exists (~/workspace/source/src/server/routes/api/server/import/v4.ts:68-80)Tokens: New tokens are generated for imported users
Files
Files
Both imports: Skipped if file name already existsFile metadata imported:
- Original name
- Size and type
- Views and max views
- Deletion timestamp
- Password protection
- Favorite status
Folders
Folders
v3 import: Skipped if files for folder not foundv4 import: Skipped if folder name exists for userHierarchy: Parent-child relationships are preserved in v4 imports (~/workspace/source/src/server/routes/api/server/import/v4.ts:298-314)
URLs
URLs
Both imports: Skipped if URL code already existsURL properties imported:
- Destination
- Vanity code
- Views and max views
- Password
- Enabled status
OAuth Providers
OAuth Providers
Both imports: Skipped if provider + OAuth ID combination existsImported providers:
- Discord
- GitHub
- OIDC
Data Relationships
The import process preserves relationships:- Users are imported first
- OAuth providers and quotas are linked to imported users
- Folders are created, then parent relationships are established
- Files are linked to users and folders
- Tags are created and linked to files
- URLs and invites are linked to users
- Metrics are imported with timestamps preserved
Troubleshooting
Import fails with 'not super admin' error
Import fails with 'not super admin' error
Only SUPERADMIN users can perform imports.Check your role:Ensure
role is SUPERADMIN, not ADMIN or USER.Files imported but return 404
Files imported but return 404
This means database entries were created but files aren’t in storage:
- Verify files were copied to correct location
- Check file names match exactly (case-sensitive)
- For S3, ensure bucket and subdirectory configuration matches
- Check file permissions (local storage)
Import times out or fails on large exports
Import times out or fails on large exports
For very large exports:
- Split the export into smaller batches
- Import users first, then files, then URLs
- Increase timeout limits in reverse proxy
- Consider importing directly on the server:
Users can't log in after import
Users can't log in after import
v3 import: Passwords are imported as-isv4 import: Passwords are imported with original hashesIf users can’t log in:
- Verify password was set in v3/source instance
- Check if OAuth-only users (no password set)
- Have users reset password via “Forgot Password”
OAuth providers not working after import
OAuth providers not working after import
OAuth tokens may be expired or invalid:
- Users may need to re-authenticate with OAuth providers
- Verify OAuth client IDs/secrets match between instances
- Check redirect URIs are updated for new domain
Many items skipped during import
Many items skipped during import
Items are skipped when conflicts exist. Common causes:
- Importing into a non-empty instance
- Duplicate import attempts
- Username/filename conflicts
Best Practices
Test on staging first
Always test migrations on a staging environment before production:
- Deploy fresh v4 instance
- Import test export
- Verify functionality
- Document any issues
Plan downtime
For production migrations:
- Schedule maintenance window
- Put v3 in read-only mode (if possible)
- Perform final export
- Complete migration
- Verify before switching DNS/traffic
Communicate with users
Inform users about:
- Migration schedule
- Expected downtime
- Any action required (re-authentication, password resets)
- New domain/URL if changing
Post-Migration
After successful migration:- Update DNS: Point domain to new v4 instance
- Update integrations: Update ShareX configs, API endpoints, etc.
- Monitor logs: Watch for errors in the first few days
- Keep v3 backup: Maintain v3 backup for 30 days as safety net
- Update documentation: Document new endpoints, domains, or procedures