Upgrade¶
Data Structures¶
Attribute |
Type |
Required |
Description |
|---|---|---|---|
|
string |
The version provided by the upgrade package. Read-only. |
|
|
number |
Upgrade package size, in bytes. Read-only. |
|
|
string { |
yes |
Status of the upgrade check. Read-only. |
|
number |
Estimated upgrade time in seconds. Available after successful upgrade check. Read-only. |
|
|
boolean |
yes |
Indicates whether an upgrade snapshot is available. Read-only. |
|
boolean |
yes |
True if an upgrade is in progress. Read-only. |
Retrieve Available Attributes of the UpgradeModel¶
Request
Method |
|
Path |
|
GET /api/v2/objspec/upgrade_info
Example Request
curl -s -k -X GET \
-H 'Authorization: sgfeea6jsaz4mum9su8w6' \
'https://10.0.214.98/api/v2/objspec/upgrade_info'
Upload the Upgrade File¶
Request
Method |
|
Path |
|
Headers |
|
Body |
File uploaded using the |
POST /api/v2/upgrade/upload
Example Request
curl -s -k -X POST \
-H 'Authorization: sgfeea6jsaz4mum9su8w6' \
-F 'file=@/path/to/fudo-5.6.0.upg' \
'https://10.0.214.98/api/v2/upgrade/upload'
Response
Get Uploaded Upgrade Information¶
Request
Method |
|
Path |
|
GET /api/v2/upgrade
Example Request
curl -s -k -X GET \
-H 'Authorization: sgfeea6jsaz4mum9su8w6' \
'https://10.0.214.98/api/v2/upgrade'
Response
{
"upgrade": {
"version": "5.6.3",
"size": 857056256,
"upgrade_check_status": "success",
"estimated_upgrade_time": 300,
"has_upgrade_snapshot": false,
"upgrade_running": false
},
"result": "success"
}
Run the Upgrade Check¶
Request
Method |
|
Path |
|
POST /api/v2/upgrade/check/run
Example Request
curl -s -k -X POST \
-H 'Authorization: sgfeea6jsaz4mum9su8w6' \
'https://10.0.214.98/api/v2/upgrade/check/run'
Response
{
"result": "success"
}
Cancel the Upgrade Check¶
Request
Method |
|
Path |
|
POST /api/v2/upgrade/check/cancel
Example Request
curl -s -k -X POST \
-H 'Authorization: sgfeea6jsaz4mum9su8w6' \
'https://10.0.214.98/api/v2/upgrade/check/cancel'
Response
{
"result": "success"
}
Get the Upgrade Check Log¶
Request
Method |
|
Path |
|
GET /api/v2/upgrade/check/log
Example Request
curl -s -k -X GET \
-H 'Authorization: sgfeea6jsaz4mum9su8w6' \
'https://10.0.214.98/api/v2/upgrade/check/log'
Response
Starting upgrade check.
waiting for server to start....2025-05-13 18:45:37.590 CEST (pid=97795) (user=) (app=) LOG: redirecting log output to logging collector process
2025-05-13 18:45:37.590 CEST (pid=97795) (user=) (app=) HINT: Future log output will appear in directory "pg_log".
done
server started
New upgrade script: UPG000754.
Upgrade UPG000754 started at 2025-05-13 09:45:42.
Upgrade UPG000754 completed successfully at 2025-05-13 09:45:43.
New upgrade script: UPG000756.
Upgrade UPG000756 started at 2025-05-13 09:45:43.
Upgrade UPG000756 completed successfully at 2025-05-13 09:45:43.
2025-05-13 18:45:37.590 CEST (pid=97795) (user=) (app=) LOG: starting PostgreSQL 16.2 on amd64-portbld-freebsd12.3, compiled by FreeBSD clang version 10.0.1 (git@github.com:llvm/llvm-project.git llvmorg-10.0.1-0-gef32c611aa2), 64-bit
2025-05-13 18:45:37.591 CEST (pid=97795) (user=) (app=) LOG: listening on Unix socket "/data/local/upgcheck/run/.s.PGSQL.5432"
2025-05-13 18:45:37.603 CEST (pid=97868) (user=) (app=) LOG: database system was interrupted; last known up at 2025-05-13 18:39:28 CEST
2025-05-13 18:45:37.652 CEST (pid=97868) (user=) (app=) LOG: database system was not properly shut down; automatic recovery in progress
2025-05-13 18:45:37.654 CEST (pid=97868) (user=) (app=) LOG: redo starts at 0/3B429E8
2025-05-13 18:45:37.663 CEST (pid=97868) (user=) (app=) LOG: invalid record length at 0/3BCE9B0: expected at least 24, got 0
2025-05-13 18:45:37.663 CEST (pid=97868) (user=) (app=) LOG: redo done at 0/3BCE978 system usage: CPU: user: 0.00 s, system: 0.00 s, elapsed: 0.00 s
2025-05-13 18:45:37.665 CEST (pid=97847) (user=) (app=) LOG: checkpoint starting: end-of-recovery immediate wait
2025-05-13 18:45:37.673 CEST (pid=97847) (user=) (app=) LOG: checkpoint complete: wrote 116 buffers (0.7%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.007 s, sync=0.001 s, total=0.008 s; sync files=72, longest=0.001 s, average=0.001 s; distance=559 kB, estimate=559 kB; lsn=0/3BCE9B0, redo lsn=0/3BCE9B0
2025-05-13 18:45:37.688 CEST (pid=97795) (user=) (app=) LOG: database system is ready to accept connections
Upgrade check finished successfully. Duration 1 seconds.
Run the Upgrade¶
Request
Method |
|
Path |
|
POST /api/v2/upgrade/run
Example Request
curl -s -k -X POST \
-H 'Authorization: sgfeea6jsaz4mum9su8w6' \
'https://10.0.214.98/api/v2/upgrade/run'
Response
{
"result": "success"
}
Note
After running the upgrade/run request, the operation may take some time to complete. Please wait patiently while the upgrade is being processed.
Delete Upgrade¶
Request
Method |
|
Path |
|
DELETE /api/v2/upgrade
Example Request
curl -s -k -X DELETE \
-H 'Authorization: sgfeea6jsaz4mum9su8w6' \
'https://10.31.135.179/api/v2/upgrade'
Response
{
"result": "success"
}
Delete Upgrade Snapshot¶
Request
Method |
|
Path |
|
DELETE /api/v2/upgrade/snapshot
Example Request
curl -s -k -X DELETE \
-H 'Authorization: sgfeea6jsaz4mum9su8w6' \
'https://10.31.135.179/api/v2/upgrade/snapshot'
Response
{
"result": "success"
}