How-To Move Docker Container to Another Host With their Data - Bind Mound method

Поделиться
HTML-код
  • Опубликовано: 6 сен 2024
  • How-To Move Docker Container to Another Host With their Data - Bind Mound method
    Commands needed to backup / snapshot a docker container and copy over to another host, deploy the snaphot docker image on new host and follow with manual data copy over to new host to maintain same data between the two hosts.
    ===========================
    Network Security courses on ElastiCourse/Udemy:
    Introduction to Fortigate Firewall
    www.elasticour...
    www.udemy.com/...
    Fortigate Advanced Configuration
    www.elasticour...
    www.udemy.com/...
    Introduction to FortiManager course
    www.elasticour...
    www.udemy.com/...
    ===========================
    AWS Web Application deployment and migration course
    www.elasticour...
    www.udemy.com/...

Комментарии • 49

  • @Vandy5000
    @Vandy5000 4 года назад +7

    This is the best video I found for me (a beginner) to understand.

  • @LoWangSmg
    @LoWangSmg Месяц назад

    Best explanation so far ! Thanks

  • @arex2006
    @arex2006 2 года назад +1

    great, greater, you are the greatest. With this video i was able to smoothly migrate my containers from old dell t7500 with a lot of power consumed to a brand new dell wyse 5070 running xpenology with only 10W TDP

  • @geetharaghuram8887
    @geetharaghuram8887 3 года назад +2

    This is life saver to me! I am beginner and creating a docker project. Created an nginx customized image and did not have idea on how to package along with the html. Thanks a zillion!!

  • @jamesT008
    @jamesT008 2 года назад

    Precise information...no hunky junky talk. Apreciated!

  • @killua_148
    @killua_148 9 месяцев назад

    Hi, why do you use docker commit instead of using the official image? Isn't just copying the bind mounts enough?

  • @bhaveshjoshi5028
    @bhaveshjoshi5028 3 года назад +1

    Was searching for a simple and to the point video - found it here ., Many Many Thanks - please make more videos..,!!

  • @philsipad
    @philsipad 3 года назад +2

    You left out the most important piece - moving the volumes and deal with the file access attributes aftermath. There is really no need to move the container as you can always pull a new container from the docker hub on the new host. The volumes are what hold the data that define the system.

    • @ElastiCourse
      @ElastiCourse  3 года назад

      Correct, volumes are important piece to move as well, but unfortunately there is no simple way to move them other than copying them over manually or using paid 3rd party services.

  • @andresantana9148
    @andresantana9148 2 года назад

    I wish I could like 1000x because this video was super useful.
    Thank you.

  • @pitwyman
    @pitwyman 6 месяцев назад

    I didn't know you could go from a container on Linux to a container on Windows ! thanks for the tips ;)

  • @ElastiCourse
    @ElastiCourse  4 года назад +2

    *Please note:*
    *docker save [image] > file.tar* followed by *docker load < file.tar*

    Might not work if the save and load are executed on a different OS.
    Always use:
    *docker save [image] -o file.tar* followed by *docker load -i file.tar*

  • @victorcandiani
    @victorcandiani Год назад

    Man, you're fucking awesome. Congrats.

  • @BrianThomas
    @BrianThomas Год назад

    Thank you for the video. Does it make a difference if I used Yacht to install the container? I have 1 container that has about 100G of data that I need to move to another machine so that I can nuc it and install a different OS on it. I was just looking for a simple way of doing it.

  • @mridulchoudhary3010
    @mridulchoudhary3010 3 года назад

    Thanks a ton !!! I just started learning Docker & was having this doubt
    about packaging the container along with data stored in corresponding volumes .
    It would be really helpful if you could create a full series on Docker , Docker-compose .

    • @ElastiCourse
      @ElastiCourse  3 года назад

      Sure. I have 4 videos on Docker so far, with more to come.

  • @jkdjdon
    @jkdjdon 3 года назад +1

    I'm not getting bind mounts on save! Like you got in dns folder. Is there anything I'm doing wrong?

    • @ElastiCourse
      @ElastiCourse  3 года назад

      Can you show me you docker run command to verify, you could be using wrong syntax in the -v command, which differs based on OS type (Windows, Mac. Linux)

  • @berizzian
    @berizzian 3 года назад

    Great video. Im thinking twice about using docker for some production applications its really concerning to see containers are not really self contained. They are still fun though :)

  • @aszuts
    @aszuts 2 года назад

    Very nice work! One key point for me: I have to copy the docker run parameters with my image. (all the port mappings, volume mappings etc.)
    Without run parameters it is only an image. I wonder why there is no option to export container start parameters. It would be easier to share containers with my colleagues.

    • @ElastiCourse
      @ElastiCourse  2 года назад +1

      you can save a container with all the custom ports and everything using Docker Compose, you just create a text file in YAML format with all that. Example on Pi-hole here github.com/pi-hole/docker-pi-hole

  • @Pranavdazzler
    @Pranavdazzler Год назад

    is there any another way,,,because i got question in interview

  • @fithawighide6589
    @fithawighide6589 2 года назад

    Thank you for making this video.

  • @shaunpx1
    @shaunpx1 Год назад

    Where did you copy the dns folder on windows? Did you zip and copy the files over? Did you unzip then on the desktop? The pwd shows etc-bin not bin?

  • @ariefilkom46
    @ariefilkom46 3 года назад +1

    now that the container in your windows env use the pieholebackup image, what do you do if you want to use the latest piehole (official) image then?

    • @ElastiCourse
      @ElastiCourse  3 года назад

      very good question. Follow the steps in this video first to migrate the container to another host, then follow this video to update to newer images when available ruclips.net/video/76Xctfb_qI8/видео.html

  • @umitkirtil
    @umitkirtil 2 года назад

    thank you so much. you are a life saver

  • @MAXimator70
    @MAXimator70 2 года назад

    thanx a lot for this awesome tutorial!

  • @swarnashissarkar4767
    @swarnashissarkar4767 3 года назад

    Excellent!!!

  • @premkumarmani1380
    @premkumarmani1380 2 года назад

    hope we can use the same steps if I migrate the base machine from centos to ubuntu?

    • @ElastiCourse
      @ElastiCourse  2 года назад

      Centos use different package manager and different shell commands, by SQL commands and docker commands should be exactly identical

  • @vladyslavliebiediev8057
    @vladyslavliebiediev8057 3 года назад

    Thank you.

  • @MrRuffythemonkey
    @MrRuffythemonkey 3 года назад

    who makes the backups of images that are always available. It would be more interesting how one can store containers variably.

    • @ElastiCourse
      @ElastiCourse  3 года назад

      Can you elaborate more on what you mean by storing containers variably? Container images and container data are independent.

    • @MrRuffythemonkey
      @MrRuffythemonkey 3 года назад

      @@ElastiCourse environment variables and networksettings etc. for example passwords Sql password etc.

    • @ElastiCourse
      @ElastiCourse  3 года назад

      The best solutions for storing sensitive information like SQL passwords would be:
      1. Docker Secrets (Requires Swarm services to be enabled)
      2. Kubernetes Secrets (Requires kubectl)
      3. HashiCorp Vault (3rd party, same company that makes Terraform)

  • @jai-yadav
    @jai-yadav 3 года назад

    Perfect! 👌🏻

  • @joshuasmith2814
    @joshuasmith2814 Год назад

    great video but man is docker a PITA to work with, there's got to be a better way to manage containers than this.

    • @ElastiCourse
      @ElastiCourse  Год назад +1

      There is a learning curve, but I must appreciate what Docker brings to the table from ultra speed to reliability and ease of use. For easier solutions to get used to it check my other video on using Docker easy GUI with templates ruclips.net/video/gQiIVzNc_go/видео.html

  • @tecint
    @tecint 2 года назад

    Where is the video content in files?

  • @larrybud
    @larrybud 3 года назад

    it's crazy there's not an import/export container function which saves all of the settings. What a PITA

    • @ElastiCourse
      @ElastiCourse  3 года назад

      I always thought the same. It's complicated for one script to be able to accommodate all different variables and settings one can add to a container run config, unless built by Docker directly. It gets even worse when said container is part of a stack (Docker Compose) or project name. If you can get used to writing a little bit more code you will really enjoy Docker.

  • @guyh3403
    @guyh3403 3 года назад

    For some reason I get an error when saving the .tar "no space left on device".
    I run Docker on a Synology 218+ with 10Gb ram. The Image is approx 1Gb.
    /dev/md0 is at 100% Odd huh?

    • @ElastiCourse
      @ElastiCourse  3 года назад

      I'm not sure about docker limitation on Synology devices. You should have no issues running that image on a windows, mac or linux with Docker Engine running.

    • @guyh3403
      @guyh3403 3 года назад

      @@ElastiCourse Got an easy fix for future reference.
      Save the file outside $pwd at /volume1/...

  • @honaga79
    @honaga79 3 года назад

    tuyệt vời

  • @dazoedave
    @dazoedave 3 года назад

    Title should be How-To Move Docker Container to Another Host With *Bind Mounts*