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.

Back up existing docker?

Featured Replies

Is it possible to back up my existing docker before updating it? As it runs on btrfs, can I just snapshot it somehow?

Docker on unRAID has 3 components

 

1. Config file. Small.

2. The container. Large but disposable since you can get iot form the online repo again (assuming you dont use EDGE)

3. The data files under appdata

 

BTRFS snapshots dont cover all 3 of these.

 

T

I've made a vary basic script to backup/restore containers a while ago, but only tested it twice, so be careful with it.

 

#!/bin/bash
D="$(dirname "$(readlink -f ${BASH_SOURCE[0]})")"

if [[ -n $1 ]]; then
  backup_path=$1
else
  exit 1
fi

if [[ -f ${backup_path}/restore.sh ]]; then
  echo Please choose an empty directory
  exit 0
fi

running_containers=$(docker ps -q)
if [[ -n $running_containers ]]; then
  docker stop ${running_containers}
fi

echo -e "#!/bin/bash\n" > ${backup_path}/restore.sh
for container in $(docker ps -a -q); do
  image_name=$(docker inspect -f "{{.Config.Image}}" ${container});
  image_id=$(docker inspect -f "{{.Image}}" ${container})
  container_name=$(docker inspect -f "{{.Name}}" ${container} | grep -Po '/\K.*')
  container_cmd=$(${D}/docker_cmd.php ${container_name})
  eval "docker save ${image_id} > ${backup_path}/${container_name}.tar";
  echo "docker load < ${backup_path}/${container_name}.tar" >> ${backup_path}/restore.sh;
  echo "docker tag ${image_id} ${image_name}" >> ${backup_path}/restore.sh;
  echo "$container_cmd" >> ${backup_path}/restore.sh;
done

chmod +x ${backup_path}/restore.sh

if [[ -n $running_containers ]]; then
  docker start ${running_containers}
fi

  • Author

Thanks for the replies and info.

 

Since you responded, gfjardim, I am wanting to back up your btsync container before upgrading in case it upgrades to sync 2.0. Sync 2.0 is incompatible with the old 1.4 clients which all my other devices run.

 

Which version does it update to?

Thanks for the replies and info.

 

Since you responded, gfjardim, I am wanting to back up your btsync container before upgrading in case it upgrades to sync 2.0. Sync 2.0 is incompatible with the old 1.4 clients which all my other devices run.

 

Which version does it update to?

 

BTSync 2.0.82

Thanks for the replies and info.

 

Since you responded, gfjardim, I am wanting to back up your btsync container before upgrading in case it upgrades to sync 2.0. Sync 2.0 is incompatible with the old 1.4 clients which all my other devices run.

 

Which version does it update to?

 

And this is exactly why Dockers should be versioned and labeled and never auto update. They should always be exact snapshots in time. One never knows if an update will break everything or not. It's even worse with using developer branches of the application in question.

 

  • Author

Thanks for the replies and info.

 

Since you responded, gfjardim, I am wanting to back up your btsync container before upgrading in case it upgrades to sync 2.0. Sync 2.0 is incompatible with the old 1.4 clients which all my other devices run.

 

Which version does it update to?

 

BTSync 2.0.82

 

Crap ok, thanks for the answer ;)  Save me the trouble of updating to find out it doesn't work with anything anymore.

  • 2 weeks later...

Docker on unRAID has 3 components

 

1. Config file. Small.

2. The container. Large but disposable since you can get iot form the online repo again (assuming you dont use EDGE)

3. The data files under appdata

 

BTRFS snapshots dont cover all 3 of these.

 

T

 

What is the location of the config file? I would like to make a backup of just appdata and my container configuration (The volume mappings, port mappings and other variables). I know where the appdata is, but where is the container configuration stored?

 

Docker on unRAID has 3 components

 

1. Config file. Small.

2. The container. Large but disposable since you can get iot form the online repo again (assuming you dont use EDGE)

3. The data files under appdata

 

BTRFS snapshots dont cover all 3 of these.

 

T

 

What is the location of the config file? I would like to make a backup of just appdata and my container configuration (The volume mappings, port mappings and other variables). I know where the appdata is, but where is the container configuration stored?

Not entirely sure what is meant by config file, since it is typically in a mapped volume, probably part of appdata for most dockers.

 

Perhaps he meant the template settings. Those are in /boot/config/plugins/dockerMan/templates-user

 

 

Docker on unRAID has 3 components

 

1. Config file. Small.

2. The container. Large but disposable since you can get iot form the online repo again (assuming you dont use EDGE)

3. The data files under appdata

 

BTRFS snapshots dont cover all 3 of these.

 

T

 

What is the location of the config file? I would like to make a backup of just appdata and my container configuration (The volume mappings, port mappings and other variables). I know where the appdata is, but where is the container configuration stored?

Not entirely sure what is meant by config file, since it is typically in a mapped volume, probably part of appdata for most dockers.

 

Perhaps he meant the template settings. Those are in /boot/config/plugins/dockerMan/templates-user

 

Great, thank you. The contents of the templates-user directory was exactly what I was looking for!

Archived

This topic is now archived and is closed to further replies.

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.