Upstream backups¶
What the Backups tab of a branch does, captured on 2026-10-14 on one project, from its staging branch, with a listing over SSH of its production build. The requests follow the common shape and the identifiers of the upstream reference. Values are scrubbed as there.
Creating a backup and preparing a download both change state on Odoo.sh. Listing does not.
List¶
POST /app/project/<technical_name>/backups, no params. Fixture: backups.json.
The request belongs to the project, not to a branch: opened from the staging branch, it answered
the backups of every stage. result is a flat list, newest first, of two shapes told apart by
type.
Kept on the production build (see below), manual and daily:
| Field | Type | Observed |
|---|---|---|
type |
str | manual, daily |
backup_datetime_utc |
str | The timestamp that names the backup in every later request |
name |
str | The name of the build it was taken from |
branch, stage |
str | The branch and stage it was taken from |
revision |
str | The build's commit |
odoo_branch, machine |
str | 19.0, ubuntu-24.04 |
installed_modules |
object | custom and standard, each a comma-separated string |
path |
str | A path on Odoo.sh's side, not the build's |
comment, upgrade |
null |
|
downloadable |
bool | true |
Off-site, remote:
| Field | Type | Observed |
|---|---|---|
type |
str | remote |
id |
int | Not stable: see below |
backup_datetime_utc, name, branch, revision |
str | As above |
project |
str | The technical_name |
size_sql_gz, size_container |
float | Bytes: the compressed SQL, and the whole backup |
downloadable |
bool | false |
- One
dailybackup was listed, the latest. Theremotelist held one a day for ten days, then two a week for four weeks. - The latest
remotebackup has the samebackup_datetime_utcas thedailyone: it is the same backup, kept off-site. - A
remoteid is not an identifier. Two answers 2 minutes apart gave most backups different ids. Name a backup by itsbackup_datetime_utc, as the download does. - Only a
remotebackup gives a size, and it cannot be downloaded as it is.
Seen twice, from the staging branch.
Create a manual backup¶
POST /app/build/<id>/dump, params {"backup_only": true, "comment": ""}, on the branch's
current build. Fixture: dump.json.
- The answer is 200 with no
result:{"jsonrpc": "2.0", "id": 73}. - The backup was listed with a
backup_datetime_utc58 seconds after the request. - 77 seconds after the request, the project gained a notification (
notif_typedump, nameManual Backup Ready): "Your backup is ready and will be kept for 3 days. Please note that manual backups are stored locally and do not follow the same replication and security policies as daily platform backups." Its button links to the branch's Backups tab. - Notifications are in
get_infoundernotifications.<project id>.items, withid,seen,create_date,notif_type,level,name,content(HTML) andbuttons.POST /app/project/<project id>/mark_notifications_seen, no params, answerstrue. get_info'sactive_repo.dump_in_progresswasfalseonce the backup was ready.- A download preparation sent as soon as a new backup was listed was refused with an error the
reference does not name.
dump_in_progressistruefor about 20 seconds after the backup is listed. - The page learnt of the notification without asking for it, so over the bus. Its frames were not captured.
Seen once, on a staging build.
Prepare a download¶
POST /app/build/<id>/dump, params {"test_dump": true, "filestore": true,
"backup_datetime_utc": "<timestamp>"}, on the build the backup was taken from, which was also
the branch's current build.
test_dumpis the dialog's choice between a neutralized database (true) and an exact one;filestorewhether the filestore is included.- The answer is the same empty one as the create's.
- It also worked on a build that was no longer its branch's newest, the one the backup was taken from.
- While it ran,
get_info'sactive_repo.dump_in_progresswastrue, and the download answered 404 at hop 3. - Hop 3 answered the file 21 seconds after the request, for a 7 MB zip. 28 seconds after the request, the
project gained a notification (
notif_typedump, nameDatabase dump ready): "Your database dump is ready. It will be available for 2 hours." Its one button hastypedownload,textnulland the page's link asurl, with the same three values.dump_in_progressturnedfalsea few seconds later.
Seen twice, with test_dump and filestore both true, once from the page and once from a
script that asked hop 3 and get_info every 5 seconds. The three other combinations were not
captured; that they send false is inferred from the shape.
Download¶
The page's link is on the worker of the build, with the same three values:
GET <worker_url>/paas/build/<id>/download/dump?backup_datetime_utc=<timestamp>&test_dump=1&filestore=1
| Hop | Request | Answer |
|---|---|---|
| 1 | The link, without authentication | 302 to www.odoo.sh/paas/build/<id>/token?redirect=<path and query of the link>&base_url=<worker_url>, and sets a session_id cookie on the worker |
| 2 | That URL, with the www.odoo.sh session |
302 to the link with a token parameter first |
| 3 | The link with token, and the worker's cookie |
200, the file |
- The link itself grants nothing: without a
www.odoo.shsession, hop 2 has none to hand over. Thetokengrants the file. It is 32 letters and digits, appears in no other answer, and is not the project'saccess_token. - The worker is the build's
worker_url, a host such aseupd00.odoo.com, not the build's own address. - Hop 2 hands over a
tokenbefore the file is ready too: hop 3 then answers 404 with an HTML page. A second hop 2 once the file was ready gave atokenthat worked as well. - The page sent the cookie set at hop 1 to hop 3, but the
tokenalone is enough: without hop 1 and without any cookie, hop 3 answered the file. - The file came with
Content-LengthandContent-Disposition: attachment; filename*=UTF-8''<build name>_<YYYY-MM-DD_HHMMSS>_test_fs.zip, asapplication/octet-stream. The zip helddump.sqlfirst. - The worker's cookie lasts 7 days.
Seen twice, on a staging build.
On the production build¶
Over SSH, the production build's ~/backup.daily held three entries per manual and daily
backup: <name>_<type>.sql.gz, <name>_<type>.json and a directory
<name>_<type>. A manual entry is prefixed <YYYY-MM-DD_HHMMSS>-.
- It held the latest
dailybackup of production and themanualbackup taken on staging, so backups of every stage live on the production build. - The files were mode
644, the directories755, owned byodoo. - The
.sql.gzwas the size theremoteentry gives assize_sql_gz.
Seen once, on 2026-10-14. The JSON file and the directory were not read.
On 2026-10-17, rsync copied the daily file and a manual one of production by these names:
<name> is the backup's name, and a manual prefix is its backup_datetime_utc.
Not seen¶
- A manual backup on production, a second request while one runs, and a refused stage.
- Whether a development branch has the tab.
- The bus frames for both notifications.
- How a
remotebackup is made downloadable. - How long a
tokenlasts, and whether a prepared file is gone after the 2 hours its notification gives.