Upload a backup file and restore it
POST
/apps/{slug}/backups/upload-restore
const url = 'https://your-server.example/api/apps/example/backups/upload-restore';const form = new FormData();form.append('file', 'file');form.append('strategy', 'example');form.append('container', 'example');
const options = {method: 'POST', headers: {cookie: 'session=<session>'}};
options.body = form;
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://your-server.example/api/apps/example/backups/upload-restore \ --header 'Content-Type: multipart/form-data' \ --cookie session=<session> \ --form file=@file \ --form strategy=example \ --form container=exampleAuthorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”slug
required
string
App slug (lowercase, dash-separated).
Request Bodyrequired
Section titled “Request Bodyrequired”Media typemultipart/form-data
object
file
required
string format: binary
strategy
required
Strategy id (e.g. postgres, mysql, volume).
string
container
Compose service name (e.g. db), container name, or container ID prefix (12+ characters); only this app’s containers match. May be empty for single-container apps; required when the app has several containers (the error lists the service names).
string
Responses
Section titled “Responses”Restore accepted.
Too many restores in progress; try again later.
Media typetext/plain
string