I have 27 containers running with rancher on windows. Long story short, I’m tired of the resource use and stress on my machine by running the VM. My data folders are split up by duty (admin, utility, media, virtualization) each duty has its own folder, containing the services’ folder with data/config directories and one compose.yaml file for those services. All the compose files are connected to a master compose file in the parent directory that starts all of them. My compose files have references to the media hdds that are defined with an .env file next to the master compose.

I need to clone my docker setup to a Debian install I’ve been working on on its own ssd. I’ve been screwing with Linux unsuccessfully for almost 20 years, so my cli is weak. I’m looking for a tool that will clone my volumes and containers.

What do you use?

  • Botzo@lemmy.world
    link
    fedilink
    English
    arrow-up
    12
    ·
    26 days ago

    rsync

    Built-in, picks up where it left off if you accidentally cancel it by running the same command again, and dead simple.

    Permissions for the files will probably be a little broken moving to Linux, but chmod is also easy to use and can work at the directory level.

    • Botzo@lemmy.world
      link
      fedilink
      English
      arrow-up
      4
      ·
      26 days ago

      If you need to change the references in the compose or env files:

      • use sed to replace text in .env
      • use variables and interpolation in compose
  • carrylex@lemmy.world
    link
    fedilink
    English
    arrow-up
    4
    ·
    24 days ago

    I’m looking for a tool that will clone my volumes and containers

    ???

    Assuming you’re using docker compose because not doing that when running 27 containers would be insane:

    • docker compose down
    • Copy all stuff over
    • docker compose up
  • horus_son_of_isis@lemmy.worldOP
    link
    fedilink
    English
    arrow-up
    1
    ·
    21 days ago

    Thank you all for your input. ultimately I discovered that the volumes that had been stored inside docker’s directory (on WSL) were actually not the ones I was worried about losing.

    My container directory where my compose files are categorized and stored turned out to have everything I really needed. It did take reducing the hashed docker internal volumes to tar.gz to figure that out.

    Anyway, I just stopped (not “down”) docker and copied the directory onto one of my extra SSDs. Then I shut down the host, took out the Windows nvme, booted from my Debian SSD, made and mounted a new master container directory, and copied the files over. I had to update the compose and config files to use the new file paths, but once that was done, I did a compose up and everything took off pretty much without a hitch.