wheels deploy rollback
Rollback a deployment to a previous release.
Synopsis
Description
The wheels deploy rollback
command reverts your application to a previous deployment release. It provides quick recovery from failed deployments or problematic releases by switching back to a known-good state.
Arguments
target
Deployment target to rollback
Required
Options
--release
Specific release to rollback to
Previous release
--steps
Number of releases to rollback
1
--skip-hooks
Skip rollback hooks
false
--force
Force rollback without confirmation
false
--dry-run
Preview rollback without executing
false
--verbose
Show detailed output
false
--help
Show help information
Examples
Rollback to previous release
Rollback multiple releases
Rollback to specific release
Preview rollback
Force rollback without confirmation
Rollback Process
Validation:
Verify target configuration
Check available releases
Validate rollback target
Confirmation:
Display current release
Show target release
Request confirmation (unless --force)
Execution:
Switch symbolic links
Run rollback hooks
Restore shared resources
Clear caches
Verification:
Test application health
Verify services running
Check error logs
Output Example
Available Releases
List available releases:
Output:
Rollback Hooks
Configure rollback-specific hooks:
Database Rollback
Handling database changes during rollback:
Automatic Migration Rollback:
Manual Intervention:
Some changes may require manual rollback
Data migrations might not be reversible
Always backup before deployment
Rollback Strategies
Immediate Rollback
Quick switch to previous release:
Staged Rollback
Gradual rollback with canary:
Blue-Green Rollback
Instant switch between environments:
Emergency Rollback
For critical situations:
Rollback Validation
After rollback, verify:
Application Health:
Service Status:
Error Logs:
Preventing Rollback Issues
Keep Sufficient Releases:
Configure
keepReleases
appropriatelyDon't set too low (minimum 3-5)
Test Rollback Procedures:
Practice in staging environment
Document manual procedures
Automate where possible
Database Considerations:
Design reversible migrations
Backup before deployment
Test rollback scenarios
Rollback Limitations
Shared files/directories not rolled back
User-uploaded content preserved
External service changes not reverted
Some database changes irreversible
Use Cases
Failed Deployment: Immediate recovery from deployment failure
Performance Issues: Revert problematic release
Critical Bugs: Quick fix by reverting
Testing Rollback: Verify rollback procedures work
Compliance: Revert unauthorized changes
Monitoring After Rollback
Check application performance
Monitor error rates
Verify user functionality
Review system resources
Analyze root cause
Notes
Always investigate why rollback was needed
Document rollback incidents
Update deployment procedures based on learnings
Consider implementing better pre-deployment testing
Communicate rollback to stakeholders
See Also
Last updated
Was this helpful?