Skip to main content

Pre-Deployment Backups

Learn how HubSpot Deploy automatically protects your data by creating backups before every deployment. This safety feature enables quick rollback if something goes wrong.


Overview

Pre-deployment backups are automatic snapshots of your HubSpot configuration taken immediately before deploying changes. This safety net allows you to:

  • Undo changes if deployment causes issues
  • Restore previous state with one click
  • Deploy confidently knowing you can rollback
  • Maintain audit trail of what was changed

Key point: These backups happen automatically—you don't need to do anything. The system creates them before every deployment.


How It Works

Automatic Backup Process

When you deploy changes, the system:

  1. Identifies items to update: Only items being modified (not new items)
  2. Fetches current state: Reads current configuration from HubSpot
  3. Stores backup: Saves snapshot to secure storage
  4. Proceeds with deployment: Applies your changes
  5. Keeps backup available: Ready for rollback if needed

Example:

You're deploying: Update "Welcome Workflow"

System fetches: Current version of "Welcome Workflow" from HubSpot

System saves: Backup of current version

System deploys: Your updated version

Backup available: Can rollback to previous version anytime

What Gets Backed Up

Backed up automatically:

  • ✅ Items being updated (status: "different")
  • ✅ Current state from target portal
  • ✅ All configuration details

Not backed up:

  • ❌ Items being created (status: "new") - nothing to backup
  • ❌ Items being deleted - handled separately
  • ❌ Items with no changes (status: "identical")

Supported Metadata Types

Pre-deployment backups support most metadata types:

Fully Supported

Metadata TypeBackupRestore
Custom Objects
Standard Objects
Properties
Pipelines
Forms
Email Templates
CTAs
Campaigns

Not Yet Supported

  • Workflows (complex dependencies)
  • Lists (dynamic membership)
  • Landing Pages (content complexity)
  • Site Pages (content complexity)
  • Blog Posts (content complexity)

Note: For unsupported types, use Metadata Backups to Git before deploying.


Viewing Backup Status

During Deployment

Watch the deployment progress to see backup status:

Deployment log example:

✅ Backing up items...
✅ Welcome Workflow (backed up)
✅ Contact Form (backed up)
⏭️ New Campaign (skipped - new item)

✅ Deploying changes...
✅ Welcome Workflow (deployed)
✅ Contact Form (deployed)
✅ New Campaign (deployed)

After Deployment

Check deployment history to see backup details:

  1. Navigate to Comparisons
  2. Open your comparison
  3. Click History tab
  4. View deployment record
  5. See backup count in details

Backup summary:

  • Backed up: 2 items
  • Skipped: 1 item (new)
  • Failed: 0 items

Rolling Back Deployments

If a deployment causes issues, you can rollback to the previous state.

When to Rollback

Common scenarios:

  • Deployment broke a workflow
  • Form stopped working correctly
  • Property changes caused issues
  • Need to undo recent changes quickly

How to Rollback

Option 1: Via UI (Coming Soon)

  1. Navigate to Deployment History
  2. Find the deployment to undo
  3. Click Rollback
  4. Confirm rollback
  5. Wait for restoration to complete

Option 2: Via Support (Current)

  1. Note the deployment ID
  2. Contact support
  3. Request rollback
  4. Support team will restore backups

Rollback Process

When you rollback:

  1. Fetches backups: Retrieves all backups for that deployment
  2. Orders by dependencies: Restores in reverse dependency order
  3. Restores each item: Applies backed-up configuration
  4. Reports results: Shows what was restored and any errors

Example:

Rolling back deployment #12345...

✅ Restored: Contact Form
✅ Restored: Welcome Workflow
✅ Restored: Custom Property "lead_score"

Rollback complete: 3 items restored, 0 errors

Rollback Limitations

What rollback does:

  • ✅ Restores configuration to previous state
  • ✅ Undoes property changes
  • ✅ Reverts workflow modifications
  • ✅ Restores form settings

What rollback doesn't do:

  • ❌ Restore deleted items (use separate restore process)
  • ❌ Undo data changes (CRM records)
  • ❌ Reverse workflow executions
  • ❌ Restore historical data

Backup Storage

Where Backups Are Stored

Backups are stored securely in the system database:

  • Encrypted at rest: All backup data is encrypted
  • Workspace-scoped: Only accessible within your workspace
  • Linked to deployment: Associated with specific deployment record

How Long Backups Are Kept

Retention policy:

  • Active deployments: Backups kept indefinitely
  • Old deployments: Backups retained for 90 days
  • Deleted comparisons: Backups deleted with comparison

Best practice: Keep important comparisons to preserve backup history.

Backup Size

Backups are lightweight:

  • Only configuration data (not CRM records)
  • Compressed JSON format
  • Typical size: 1-10 KB per item

Example sizes:

  • Workflow: ~5 KB
  • Form: ~3 KB
  • Property: ~1 KB
  • Pipeline: ~2 KB

Best Practices

Before Deploying

1. Review what will be backed up:

  • Check deployment preview
  • Verify items marked as "different"
  • Understand what will change

2. Test in staging first:

  • Deploy to staging portal
  • Verify changes work correctly
  • Then deploy to production

3. Deploy during low-traffic times:

  • Reduces impact if rollback needed
  • Easier to test after deployment
  • Less disruption to users

After Deploying

1. Verify changes immediately:

  • Test affected workflows
  • Check forms still work
  • Verify properties display correctly

2. Monitor for issues:

  • Watch for error notifications
  • Check workflow execution logs
  • Review form submissions

3. Keep deployment history:

  • Don't delete comparisons immediately
  • Preserve backup history
  • Maintain audit trail

Rollback Strategy

1. Act quickly:

  • Rollback as soon as issues detected
  • Don't wait for problems to escalate
  • Better safe than sorry

2. Document issues:

  • Note what went wrong
  • Screenshot error messages
  • Record steps to reproduce

3. Investigate before re-deploying:

  • Understand why deployment failed
  • Fix underlying issues
  • Test thoroughly before trying again

Common Scenarios

Scenario 1: Workflow Update Gone Wrong

Problem: Updated workflow is sending emails to wrong contacts

Solution:

  1. Immediately pause the workflow in HubSpot
  2. Request rollback of deployment
  3. Workflow restored to previous version
  4. Review and fix workflow logic
  5. Test in staging before re-deploying

Scenario 2: Form Changes Break Submission

Problem: Form changes prevent submissions from working

Solution:

  1. Note the deployment ID
  2. Request rollback
  3. Form restored to working state
  4. Investigate what caused the issue
  5. Fix and test before re-deploying

Scenario 3: Property Update Causes Display Issues

Problem: Property changes break portal views

Solution:

  1. Rollback deployment immediately
  2. Properties restored to previous state
  3. Views work correctly again
  4. Review property dependencies
  5. Update carefully and test

Troubleshooting

Backup Failed During Deployment

Problem: Deployment log shows "Backup failed"

Possible causes:

  • Item doesn't exist in target portal (404)
  • Connection expired
  • Insufficient permissions

Solution:

  1. Check deployment logs for specific error
  2. Verify connection is active
  3. Ensure you have required scopes
  4. Retry deployment

Note: Deployment continues even if backup fails, but rollback won't be available for that item.

Cannot Rollback Deployment

Problem: Rollback option not available

Possible causes:

  • No backups were created (all items were new)
  • Backups expired (>90 days old)
  • Comparison was deleted

Solution:

  1. Check if any items were backed up
  2. Verify deployment is recent (up to 90 days)
  3. Manually restore from Git backup if available

Rollback Partially Failed

Problem: Some items restored, others failed

Possible causes:

  • Dependencies changed since backup
  • Items deleted manually
  • Permission changes

Solution:

  1. Review rollback report for errors
  2. Manually fix failed items
  3. Check dependencies
  4. Contact support if needed

Backup Taking Too Long

Problem: Deployment stuck on "Backing up items"

Factors:

  • Number of items to backup
  • HubSpot API response time
  • Network latency

Expected times:

  • Small deployment (less than 10 items): 10-30 seconds
  • Medium deployment (10-50 items): 30-90 seconds
  • Large deployment (more than 50 items): 1-3 minutes

Solution: Wait patiently. If stuck more than 5 minutes, contact support.


Security & Compliance

Data Protection

Encryption:

  • Backups encrypted at rest
  • Secure transmission (TLS 1.2+)
  • Access controlled by workspace permissions

Access Control:

  • Only workspace members can view backups
  • Rollback requires deployment permissions
  • Audit trail of all backup operations

Compliance

Audit Trail:

  • All backups logged
  • Rollback operations tracked
  • Deployment history preserved

Data Retention:

  • Backups kept for 90 days
  • Automatic cleanup of old backups
  • Manual deletion with comparison

Comparison with Other Backup Types

FeaturePre-Deployment BackupsMetadata BackupsData Backups
WhenAutomatic before deployScheduled or manualScheduled or manual
WhatItems being updatedAll portal configurationCRM records
FormatJSON in databaseJSON/YAML in GitCSV files
PurposeQuick rollbackVersion controlData recovery
Retention90 daysForever (in Git)90 days
RestoreOne-click rollbackDeploy from GitManual import

Use together:

  • Pre-deployment backups: Safety net for deployments
  • Metadata backups: Long-term version control
  • Data backups: CRM data protection


FAQ

Are backups created for every deployment?

Yes, backups are created automatically for all items being updated. New items don't need backups since they don't exist yet.

How long are backups kept?

Backups are kept for 90 days. After that, they're automatically deleted to save storage space.

Can I disable pre-deployment backups?

No, backups are a core safety feature and cannot be disabled. They ensure you can always rollback if needed.

Do backups slow down deployments?

Slightly. Backups add 10-30 seconds to deployment time, but this is a small price for the safety they provide.

What if backup fails?

Deployment continues, but you won't be able to rollback that specific item. The deployment log will show which items failed to backup.

Can I manually create a backup before deploying?

Yes, use Metadata Backups to create a full backup to Git before deploying. This provides an additional safety layer.


Next Steps