Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save WisdomSky/e4e82366be7278a9d217e9c4ecd78ef5 to your computer and use it in GitHub Desktop.
Save WisdomSky/e4e82366be7278a9d217e9c4ecd78ef5 to your computer and use it in GitHub Desktop.
How to Back-up the docker-compose.yaml file of a CasaOS app via SSH or CLI

Generating the docker-compose.yaml file:

  1. Retrieve the app id of the target CasaOS app you wanted to back-up the docker-compose.yaml:

You can do this by opening the app settings of the target app, and at the top of the settings window, it should show the app's id:

image

In the sample screenshot above, the app id of the app I want to backup is linuxserver-plex.

2.) You can then run the following command to generate the docker-compose.yaml file of that app including every settings:

casaos-cli app-management show local <app_id> --yaml > /target/output/path/docker-compose.yml

Replace the <app_id> with the corresponding app id.

For example:

casaos-cli app-management show local linuxserver-plex --yaml > /target/output/path/docker-compose.yml

This should create a docker-compose.yaml at the target path, in this example it's /target/output/path/. It's completely up to you where you want to save the file.


Re-installing the docker-compose.yaml file:

You can restore the app using this docker-compose.yaml file, by installing it via the CasaOS UI or using the following command:

casaos-cli app-management install -f /target/output/path/docker-compose.yaml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment