Jump to content
Sign in to follow this  
BLKMGK

Help backing up Container data please List the running ones to a file and then feed that to a start command?

8 posts in this topic Last Reply

Recommended Posts

I'd like to backup my data created by my Containers and I'd like to backup the Docker.img file if possible. I already backup to a cloud service using rclone but the myriad of tiny files for things like Emby and Plex bring rclone to its knees. I'd like to instead tar up my files to another directory and send the larger file to the cloud. So far I've been able to build a script that lists the directories individually but would prefer an iterative script. The larger problem though is that the containers are all still running, the docker.img changes as a result and it's possible other files may change too. How best to stop the running containers and then restart them? Since I don't run all containers all the time just stopping them all and starting them all is not the way to go, maybe just start the ones marked for autostart?

 

Has anyone done this or have something I could start from? I was just going to run it via user scripts as I do rclone now.

Share this post


Link to post
2 hours ago, BLKMGK said:

I'd like to backup the Docker.img file if possible.

Rethink this. If there is anything that needs to be backed up inside the docker.img, you need to change how you set up that docker. Currently the way to fix a number of different docker issues is to delete the docker image and let it rebuild from scratch. Doesn't take more than a few minutes, and if everything is set up correctly no data is lost.

Share this post


Link to post

CA appdata backup will stop your containers (if desired), and backup the appdata to a tar. As already pointed out it is basically pointless to backup the actual image and not worth the bandwidth or time when it ban recreated in a matter of minutes and you're back up and running like nothing ever happened

Sent from my SM-T560NU using Tapatalk

Share this post


Link to post
23 hours ago, Squid said:

CA appdata backup will stop your containers (if desired), and backup the appdata to a tar. As already pointed out it is basically pointless to backup the actual image and not worth the bandwidth or time when it ban recreated in a matter of minutes and you're back up and running like nothing ever happened

Sent from my SM-T560NU using Tapatalk
 

I'll take a look at this. Perhaps I've assumed there's too much in my image file? Some of my containers have added paths in their config and whatnot, my assumption was that this was stored there - no?

Share this post


Link to post

Normally the only thing stored within a container are the binaries required for it to run.    If a container is properly configured all variable data is stored externally to the container.  The container template mapping information is stored on the Unraid boot device.

Share this post


Link to post

Wow, so far this is looking like EXACTLY what I needed and way simpler than a script I'd build! Much appreciated! I'm still confused on where the various build scripts and whatnot are stored if not in the docker.img. Not sure how some of this works under the covers and when I try to describe this to people I know who understand containers they scratch their heads lol :)

Share this post


Link to post
6 minutes ago, itimpi said:

Normally the only thing stored within a container are the binaries required for it to run.    If a container is properly configured all variable data is stored externally to the container.  The container template mapping information is stored on the Unraid boot device.

I guess I need to poke around a bit more and find this? The "docker way" is to keep things external to the container obviously but I've never been able to figure out where the build scripts and whatnot are stored - important to me since I need to mod one 😮

 

Edit: Ah ha? \\SERVER\flash\config\plugins\dockerMan\templates-user

Edited by BLKMGK
new info

Share this post


Link to post

Personally I backup everything in /system/appdata/

 

However if I ever need to reload a Docker I just re-install it from the Apps tab and use the previously installed apps function which I'm guessing might be that path you listed with the saved settings. I never honestly looked for it since I have my USB back'd up offline. 

Share this post


Link to post

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...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this