Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Best way to copy all docker settings and configurations?

Featured Replies

Hi,

 

Due to unraids awesomeness and how easy it is to setup dockers i've started to migrate more and more of my own things into docker containers. This is fun and all but risky, if unraid would crash it would be a pure hell to reconfigure everything and i want to save myself the trouble.

 

How can i make sure to backup everything when it comes to the docker configuration and setup? I have already made a cronjob that automatically backs up everything in /mnt/cache/appdata/* but i dont think this is all the configuration. Each docker file inside unraid also has a template config, mapping of folders, paths, ip addresses etc.

 

What more do i need to save to make sure if unraid would crash i wont have a month of headache trying to figure out my old setup again? Thanks!

6 minutes ago, je82 said:

How can i make sure to backup everything when it comes to the docker configuration and setup?

There is a plugin called Backup/Restore Appdata.  I am guessing that would do the trick. 😁

 

Also, if something happens to mess up your docker.img, you can remove it, create another one and from the Previous Apps section in the App tab, reinstall all the docker containers you select.  This will reinstall them with the previous configuration settings as you did them.

  • Author
15 minutes ago, Hoopster said:

There is a plugin called Backup/Restore Appdata.  I am guessing that would do the trick. 😁

 

Also, if something happens to mess up your docker.img, you can remove it, create another one and from the Previous Apps section in the App tab, reinstall all the docker containers you select.  This will reinstall them with the previous configuration settings as you did them.

Thanks, ill check out the plugin!

  • Author

The plugin seems to be mostly focused on backuping the appdata folder which is something i am confident i am already doing.

Can someone give me an idea how the configuration files for the docker containers in unraid are stored? For me the configuration of paths, ip addresses, names is a lot of work to do as well considering the amount of dockers i am starting to use i want these templates stored somewhere.

 

I do not feel confident in relying on "Previous Apps" in the Apps tab as it already now doesn't even show half of the dockers i have installed so that wouldn't work for me.

 

Could someone please tell me how unraid stores its docker container configurations? And how i can focus on only backing these up, i already have the appdata folder under control.

  • Community Expert
1 minute ago, je82 said:

I do not feel confident in relying on "Previous Apps" in the Apps tab as it already now doesn't even show half of the dockers i have installed so that wouldn't work for me.

 

Could someone please tell me how unraid stores its docker container configurations? And how i can focus on only backing these up, i already have the appdata folder under control.

All containers installed via the Apps tab should show there.   Only ones installed via a different mechanism should be absent.

 

for every container installed via the Apps tab the settings are stored as a XML template on the flash drive under the community Applications plugin folder.  You should always have a backup of your flash drive, with particular emphasis on the config folder as that includes all settings used in Unraid.

 

  • Author
5 minutes ago, itimpi said:

All containers installed via the Apps tab should show there.   Only ones installed via a different mechanism should be absent.

 

for every container installed via the Apps tab the settings are stored as a XML template on the flash drive under the community Applications plugin folder.  You should always have a backup of your flash drive, with particular emphasis on the config folder as that includes all settings used in Unraid.

 

 

Thanks, from what i can tell its only the plugin configurations that are stored there. I have manually added a lot of docker containers that did not have pre-made templates, maybe that is why they are not showing up in the Previous Apps? I would want a way to save these configurations too.

Any container added via Docker -> Add Container has the configuration saved (/config/plugins/dockerMan/templates-user) 

 

If you've manually added the container (docker run or docker pull) then you need to make note of what you've done.

 

If the container is already installed, then it will not show up in Previous Apps.  If it isn't installed and you installed it via Add Container instead of bypassing the system and using the command line to install then PM me directly -> stuff like this is #1 priority for Apps (actually, any user reported bug means to me to drop everything that you're doing, tell the wife that the anniversary / birthday / valentine's day etc has to wait as there's a problem which has to be handled asap and just deal with it :) )

  • Author
1 minute ago, Squid said:

Any container added via Docker -> Add Container has the configuration saved (/config/plugins/dockerMan/templates-user) 

 

If you've manually added the container (docker run or docker pull) then you need to make note of what you've done.

 

If the container is already installed, then it will not show up in Previous Apps.  If it isn't installed and you installed it via Add Container instead of bypassing the system and using the command line to install then PM me directly -> stuff like this is #1 priority for Apps (actually, any user reported bug means to me to drop everything that you're doing, tell the wife that the anniversary / birthday / valentine's day etc has to wait as there's a problem which has to be handled asap and just deal with it :) )

 

Thank you!

  • 1 year later...
On 6/19/2022 at 8:41 PM, Hoopster said:

There is a plugin called Backup/Restore Appdata.  I am guessing that would do the trick. 😁

 

Also, if something happens to mess up your docker.img, you can remove it, create another one and from the Previous Apps section in the App tab, reinstall all the docker containers you select.  This will reinstall them with the previous configuration settings as you did them.

Well that only backups the data. If the image is corrupted or removed, that wont directly help.

Backing up the docker.img file should be possible I recon, and restoring all known (dozens) of docker configs should be possible also. Likewise removing old unused configs should be possible. There is lots of opportunity (low hanging fruit) for easy quality of life improvements to Unraid Docker support. They already did so many things so right.

  • Community Expert
Just now, Barry Staes said:

restoring all known (dozens) of docker configs should be possible also.

This is already possible via Apps->Previous Apps which is why backing up the docker.img file is not worth doing as you can simply reinstate the contents of the docker.img file.

So I accidentally removed my docker-xfs.img file, and now I'm surprised that of all things backed up, this is not included by any of the plugins that I use to backup docker. This is the easy one i'd guess. Or did I miss how / what plugin does this?

Edited by Barry Staes

  • Community Expert
Just now, Barry Staes said:

This is the easy one i'd guess. Or did I miss how / what plugin does this?

Why not simply create a new empty one and then restore the contents via Apps->Previous Apps.

Regarding restoring the dockers one-by-one by finding their config in the dropdown: In my case that dropdown is hundreds of items long. I used many dockers, replaced them by others with a similar name. Many old ones in there.

To be even be capable of "recreating dockers" i had manually this way, I first had to do research in what dockers did I use currently.
For this I used this command:

root@bTower:/boot/config/plugins/dockerMan/templates-user# ls -trloah

It shows the modified date per XML file, and sorts it. The backed up XML copies also lose this metadata, so that huge list was not helping me.

Edited by Barry Staes

Probably this new feature akin to "Add Container" could alleviate the problem for people like me:
 

On Docker page, at bottom a new button "Recreate Containers"
Shows a page that lists all existing XML configs (`/boot/config/plugins/dockerMan/templates-user/*.xml`) in a table:  

 

| [checkbox for selection] | XML name original | User provided name | XML Last modified date | XML Created date | Docker exists now Yes/No |


With a button "Select all dockers that do not exist now" and a button "Recreate all selected Containers".
And an explanation that this loads the files from that folder, and that "Add Container" allows doing the same.

 

This does not exist yet. I hope it gets added. I have had this problem many many times already, just to many containers to manually recreate. And just to many old ones spoiling my the list.

Edited by Barry Staes

  • 7 months later...

@Barry Staes

Looking for information on how to make a copy of all docker configurations (paths, vars, ports, etc.) I came to this thread and I now know that they are stored on a flash drive in ../dockerMan/templates-user. I'm going to make an automatic copy of this folder, because I make a full copy of the flash drive manually and too rarely. That's taken care of.
But right away the question came to me how to restore it in case of failure? And this feature you propose looks very interesting, I support!

 

3 backup solutions run via docker compose (compose manager, komo.do) so you can pick


You need the env file, and probably change the common settings and networks. Remove/change labels accordingly to your setup

My advice, use backrest, it's based on restic

 

###############################################################
# Backup
###############################################################

# Common settings #############################################

x-default: &config
  restart: always
  cpuset: 10,22,11,23,8,20,9,21
  security_opt:
    - no-new-privileges:true
x-dns: &dns
  dns: 
    - ${dns50}
x-labels: &labels
  com.centurylinklabs.watchtower.enable: "true"
  net.unraid.docker.managed: "composeman"
  net.unraid.docker.shell: "sh"

# Services ####################################################

services:

## Kopia ######################################################

  kopia:
    container_name: ${kopia_name}
    image: kopia/kopia:latest
    user: "0:0" #root
    command:
      - server
      - start
      - --disable-csrf-token-checks
      - --insecure
      - --address=${kopia_ip}:51515
      - --server-username=$kopia_webuser
      - --server-password=$kopia_webpass
    # - --htpasswd-file /app/config/.htpasswd
    <<: [*config, *dns]
    networks:
      eth1:
        ipv4_address: ${kopia_ip}
    ports:
      - 51515:51515
    volumes:
      # Mount local folders needed by kopia
      - ${dockerdir}/Kopia/config/:/app/config
      - ${dockerdir}/Kopia/cache:/app/cache
      - ${dockerdir}/Kopia/logs/cli-logs/:/app/logs
      # Mount path for browsing mounted snaphots
      - ${dockerdir}/Kopia/tmp:/tmp:shared
      # Mount local folders to snapshot
      - /mnt/services:/data/srv:ro
      - /boot:/data/os:ro
      # Mount repository location
      - /mnt/user/backup/Kopia:/repository
    environment:
      - TZ
      - KOPIA_PASSWORD    # Repository password
      - USER              # Repository user
    labels:
      <<: *labels
      net.unraid.docker.icon: "https://raw.githubusercontent.com/imagegenius/templates/main/unraid/img/kopia.png"
      net.unraid.docker.webui: "https://${kopia_name}.${mydomain}"
      traefik.enable: true
      traefik.docker.network: eth1
      traefik.http.routers.kopia.entrypoints: https443
      traefik.http.routers.kopia.service: kopia
      traefik.http.routers.kopia.rule: "Host(`${kopia_name}.${mydomain}`)"
      traefik.http.routers.kopia.tls: true
      traefik.http.routers.kopia.middlewares: local-ipwhitelist@file, rate-limit@file
      traefik.http.services.kopia.loadbalancer.server.port: 51515
      homepage.group: Backup
      homepage.name: ${kopia_name}
      homepage.icon: kopia.png # https://github.com/walkxcode/dashboard-icons/tree/main/png https://gethomepage.dev/configs/services/#icons
      homepage.href: https://${kopia_name}.${mydomain}
      homepage.description: Backup service
      homepage.weight: 1
      homepage.showStats: false
      homepage.widget.type: kopia
      homepage.widget.url: "https://${kopia_name}.${mydomain}"
      homepage.widget.username: ${kopia_webuser}
      homepage.widget.password: ${kopia_webpass}
      homepage.widget.snapshotHost: kopia
      homepage.widget.snapshotPath: /data/srv/docker

## Backrest - Restic ##########################################

  backrest:
    container_name: ${backrest_name}
    image: garethgeorge/backrest:latest
    <<: [*config, *dns]
    networks:
      eth1:
        ipv4_address: ${backrest_ip}
    ports:
      - 9898:9898
    volumes:
      - ${dockerdir}/Backrest/data:/data
      - ${dockerdir}/Backrest/config:/config
      - ${dockerdir}/Backrest/cache:/cache
      - /mnt/services:/userdata/services:ro # [optional] mount local paths to backup here.
      - /boot:/userdata/unraidos:ro # [optional] mount local paths to backup here.
      - /mnt/user/backup/Backrest:/repos  # [optional] mount repos if using local storage, not necessary for remotes e.g. B2, S3, etc.
    environment:
      - BACKREST_DATA=/data # path for backrest data. restic binary and the database are placed here.
      - BACKREST_CONFIG=/config/config.json # path for the backrest config file.
      - XDG_CACHE_HOME=/cache # path for the restic cache which greatly improves performance.
      - TZ
    labels:
      <<: *labels
      net.unraid.docker.icon: "https://raw.githubusercontent.com/alex-red/unraid-ca-templates/master/templates/images/backrest-icon.png"
      net.unraid.docker.webui: "https://${backrest_name}.${mydomain}"
      traefik.enable: true
      traefik.docker.network: eth1
      traefik.http.routers.backrest.entrypoints: https443
      traefik.http.routers.backrest.service: backrest
      traefik.http.routers.backrest.rule: "Host(`${backrest_name}.${mydomain}`)"
      traefik.http.routers.backrest.tls: true
      traefik.http.routers.backrest.middlewares: local-ipwhitelist@file, rate-limit@file
      traefik.http.services.backrest.loadbalancer.server.port: 9898
      homepage.group: Backup
      homepage.name: ${backrest_name}
      homepage.icon: backrest-light.png # https://github.com/walkxcode/dashboard-icons/tree/main/png https://gethomepage.dev/configs/services/#icons
      homepage.href: https://${backrest_name}.${mydomain}
      homepage.description: Backup service
      homepage.weight: 2
      homepage.showStats: false


## Duplicati ##################################################

  duplicati:
    container_name: ${duplicati_name}
    image: lscr.io/linuxserver/duplicati:latest
    <<: [*config, *dns]
    networks:
      eth1:
        ipv4_address: ${duplicati_ip}
    ports:
      - 8200:8200
    volumes:
      - ${dockerdir}/Duplicati:/config
      - /mnt/user/backup:/backups
      - /mnt:/source:ro
      - /boot:/UnraidOS:ro
    # - /mnt/user/backup/Duplicati/tmp:/tmp
    environment:
      - PUID=0
      - PGID=0
      - TZ
      - SETTINGS_ENCRYPTION_KEY=${duplicati_cryptsettings}
      - DUPLICATI__WEBSERVICE_PASSWORD=${duplicati_pass}
    # - CLI_ARGS= #optional
    labels:
      <<: *labels
      net.unraid.docker.icon: "https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/duplicati-icon.png"
      net.unraid.docker.webui: "https://${duplicati_name}.${mydomain}"
      traefik.enable: true
      traefik.docker.network: eth1
      traefik.http.routers.duplicati.entrypoints: https443
      traefik.http.routers.duplicati.service: duplicati
      traefik.http.routers.duplicati.rule: "Host(`${duplicati_name}.${mydomain}`)"
      traefik.http.routers.duplicati.tls: true
      traefik.http.routers.duplicati.middlewares: local-ipwhitelist@file, rate-limit@file
      traefik.http.services.duplicati.loadbalancer.server.port: 8200
      homepage.group: Backup
      homepage.name: ${duplicati_name}
      homepage.icon: duplicati.png # https://github.com/walkxcode/dashboard-icons/tree/main/png https://gethomepage.dev/configs/services/#icons
      homepage.href: https://${duplicati_name}.${mydomain}
      homepage.description: Backup service
      homepage.weight: 2
      homepage.showStats: false

# Networks ####################################################

networks:
  eth1:
    name: eth1
    external: true

 

Edited by L0rdRaiden

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.