007revad / Synology_Docker_Export

Export Synology Container Manager or Docker containers' settings as json files
MIT License
13 stars 1 forks source link
container-manager docker-compose synology synology-docker

Synology Docker Export

Donate committers.top badge

Description

Export all Synology Container Manager or Docker containers' settings as json files to your docker shared folder

The exported json files can later be imported in Synology's Container Manager ui or Docker ui.

The advantage of the exported json files is they are truly portable as each container's mapped volumes are not hard coded to a specific volume. DSM knows what volume each shared folder is located on.

Download the script

  1. Download the latest version Source code (zip) from https://github.com/007revad/Synology_Docker_Export/releases
  2. Save the download zip file to a folder on the Synology.
  3. Unzip the zip file.

Options

There are 2 options you can set in the script:

# Delete json exports older than X days
DeleteOlder=7

# Specify containers to ignore if you don't want to export their settings
# For example:
# IgnoredContainers=(jitsi_jicofo jitsi_jvb jitsi_prosody jitsi_web synology_docviewer_2)
IgnoredContainers=

To run the script via task scheduler

See How to run from task scheduler

To run the script via SSH

How to enable SSH and login to DSM via SSH

sudo -s /volume1/scripts/syno_docker_export.sh

Note: Replace /volume1/scripts/ with the path to where the script is located.

Troubleshooting

If the script won't run check the following:

  1. Make sure you download the zip file and unzipped it to a folder on your Synology (not on your computer).
  2. If the path to the script contains any spaces you need to enclose the path/scriptname in double quotes:
    sudo -s "/volume1/my scripts/syno_docker_export.sh"
  3. Make sure you unpacked the zip or rar file that you downloaded and are trying to run the syno_docker_export.sh file.
  4. Set the script file as executable:
    sudo chmod +x "/volume1/scripts/syno_docker_export.sh"

Screenshots


Importing

Importing the exported json files in Synology's Container Manager ui or Docker ui



              Back to Description