Clone an Environment
Create an exact copy of your environment for testing or staging.
Why Clone?
- ✅ Test changes without risking production
- ✅ Create staging from production data
- ✅ Reproduce bugs in isolation
- ✅ Train users on real data
- ✅ Demo to clients with realistic data
Step 1: Open Clone Dialog
- Open the environment you want to clone
- Click the ⋮ menu (three dots)
- Select Clone
Step 2: Configure the Clone
Basic Settings
- Name: Auto-generated, or customize it
- Type: Development, Staging, or Production
- Server: Same server or different one
Neutralize database
The clone dialog has a Neutralize database switch. It is on by default. Keep it on when you clone production.
Neutralize stops the copy from acting like production:
- Odoo 16 and later: runs Odoo's built-in
odoo neutralizecommand. It deactivates outgoing mail servers and scheduled actions, and runs each installed app's own neutralize step (for example, payment providers are disabled). - Odoo 13 to 15: disables outgoing mail servers, incoming mail fetching and all scheduled actions except the database cleanup job, and deletes outgoing email that was still waiting to be sent.
- Every version: points the web address (
web.base.url) at the new environment and clears cached web assets.
Turn it off only if you need the clone to behave exactly like production.
Attachments (filestore)
The dialog also shows an Include filestore option. It is on by default, and the clone copies the filestore (attachments and images) as well as the database.
Turn it off to copy the database only. No attachments are copied. If you clone into an existing environment with it off, that environment's own attachments are removed too.
Important: A clone is a full copy of your production data. Neutralize stops the copy from sending email or running scheduled jobs, but it does not anonymise personal data. If production holds personal data, plan your own anonymisation step before using the clone.
Step 3: Start the Clone
- Review your settings
- Click Clone Environment
- Wait for the clone to complete
Status shows 🔵 Cloning during the process.
While the clone runs, the target stays offline: it cannot be reached at its web address and its scheduled actions are off. It goes online only after neutralize has run (if selected) and after any cleanup SQL set up for your project.
Step 4: Access Your Clone
Once complete:
- Clone appears in your environment list
- Status shows 🟢 Running
- Click the URL to access
Clone has a new subdomain: project-dev-5678.apps.oec.sh
If the clone fails: A new environment created for the clone is removed. If you cloned into an existing environment and the clone failed before changing anything, that environment is left as it was. Otherwise the environment is kept, not deleted, but left stopped and offline with an error. If the clone had already started replacing its database, that database is removed, so partly copied data that was never neutralized cannot go online. Start and restart are blocked until you run the clone again or redeploy the environment.
What Gets Cloned?
| Included | Not Included |
|---|---|
| Database | Active user sessions |
| Filestore (attachments), if Include filestore is on | |
| Environment config | |
| Addons |
The database is copied as it is. Contact names, email addresses, phone numbers, user logins, passwords and API keys in Odoo all stay the same in the clone.
What Neutralize Does Not Change
Neutralize only switches things off. It does not:
- Anonymise contacts (names, emails, phone numbers, addresses)
- Change user logins or passwords
- Remove API keys or OAuth tokens stored in Odoo
- Reset sequences (invoice numbers and similar)
- Clear audit or chatter logs
If you need any of this, do it yourself in the clone after it is created, before anyone else uses it. oec.sh support can also set up cleanup SQL for your project, for example to anonymise contacts. It runs on every clone into that project, before the clone goes online.
Clone to Different Server
Want the clone on a different server?
- In clone settings, select Server
- Choose your target server
- Clone will be created on that server
Useful for:
- Geographic distribution
- Load balancing
- Different security zones
Clone Duration
Time depends on database size:
| Database Size | Approximate Time |
|---|---|
| < 1 GB | 2-5 minutes |
| 1-5 GB | 5-15 minutes |
| 5-20 GB | 15-45 minutes |
| > 20 GB | 45+ minutes |
Best Practices
For Testing
- Clone production to staging weekly
- Keep Neutralize database on
- Run your tests
- Delete when done
For Demos
- Clone with Neutralize database on
- Remove or anonymise real customer data, or use a fresh database with sample data instead
- Share URL with client
- Delete after demo
For Development
- Clone production monthly (or as needed)
- Keep Neutralize database on
- Keep development environments small
Troubleshooting
Clone stuck on "Cloning"
If stuck for more than expected time:
- Check server disk space
- Check network connectivity
- Contact support if over 2x expected time
Clone has permission errors
A clone keeps the same users and passwords as the source. If some users still cannot log in:
- Use the Odoo admin account to reset their passwords
- Check that the clone's filestore finished copying
Addons not working in clone
- Check addon dependencies
- Verify Git branch is accessible
- Reinstall addons if needed