Sync Databases
1. Overview
The Sync Databases feature connects to a remote DBFilter server, retrieves its database list, and creates Sadeem subscriptions for any databases that are not already tracked.
This is useful when you have existing Odoo databases running on a DBFilter server that were created outside of Sadeem and you want to bring them under subscription management.
2. How to Use
- Open the DBFilter Server form for the target server.
- Click Sync Databases button.
- The system calls
/web/database/liston the remote server (JSON-RPC). - A wizard opens listing only databases that do not already have a matching subscription.
- Each row shows the Database name and a Sync checkbox (checked by default).
- Uncheck any databases you do not want to import, then click Sync.
Result
A sadeem.subscription record is created for each selected database, pre-populated with the server's connection settings (IP, ports, domain, Cloudflare, Nginx). The subscriptions are created in Draft state.
3. What Gets Copied from the Server
When subscriptions are created via sync, the following fields are inherited from the DBFilter server:
| Field | Source |
|---|---|
| Subscription Type | dbfilter |
| DB Filter Server | Current server |
| Server IP | server.ip |
| HTTP Port | server.odoo_http_port |
| WebSocket Port | server.odoo_websocket_port |
| Main Domain | server.domain_for_new_sub |
| Domain Start | server.subdomain_start |
| Cloudflare Account | server.cloudflare_account_id |
| Cloudflare Zone ID | server.cloudflare_domain_zone_id |
| Cloudflare Create Record | server.cloudflare_create_record |
| Cloudflare Proxied | server.cloudflare_proxied_record |
| Nginx Server | server.nginx_proxy_server_id |
| Nginx Default Cert | server.nginx_default_cert_id |
| Domain | Database name (used as-is) |
Partner
The subscription partner_id is set to the currently logged-in user's partner. You can update it on each subscription after creation.
4. Deduplication
The wizard only shows databases that are not already assigned to a subscription on this server. A database is considered already tracked if a sadeem.subscription record exists with:
dbfilter_server = this serversaas_subscription_type = dbfilterdomain = database_name
5. Error Handling
Connection Errors
If the remote server is unreachable or returns an unexpected response, a clear error message is shown. No subscriptions are created.
Empty Server
If the remote server has no databases, or all databases are already synced, an error is shown and the wizard does not open.