Jump to content
Read the Funtoo Newsletter: Summer 2023 ×

palica

Members
  • Posts

    294
  • Joined

  • Last visited

  • Days Won

    11

Posts posted by palica

  1. lxd import
    Description:
      Import existing containers
    
      This command is mostly used for disaster recovery. It lets you attempt
      to recreate all database entries for containers that LXD no longer knows
      about.
    
      To do so, you must first mount your container storage at the expected
      path inside the storage-pools directory. Once that's in place,
      `lxd import` can be called for each individual container.
    
    Usage:
      lxd import <container name> [flags]
    
    Flags:
      -f, --force   Force the import (override existing data or partial restore)
    
    Global Flags:
      -d, --debug     Show all debug messages
      -h, --help      Print help
          --logfile   Path to the log file
          --trace     Log tracing targets
      -v, --verbose   Show all information messages
          --version   Print version number

     

  2. note:

    there is also lxd-p2c tool:

    lxd-p2c -h
    Description:
      Physical to container migration tool
    
      This tool lets you turn any Linux filesystem (including your current one)
      into a LXD container on a remote LXD host.
    
      It will setup a clean mount tree made of the root filesystem and any
      additional mount you list, then transfer this through LXD's migration
      API to create a new container from it.
    
      The same set of options as `lxc launch` are also supported.
    
    Usage:
      lxd-p2c <target URL> <container name> <filesystem root> [<filesystem mounts>...] [flags]
    
    Flags:
      -c, --config        Configuration key and value to set on the container
      -h, --help          Print help
      -n, --network       Network to use for the container
          --no-profiles   Create the container with no profiles applied
      -p, --profile       Profile to apply to the container
          --rsync-args    Extra arguments to pass to rsync
      -s, --storage       Storage pool to use for the container
      -t, --type          Instance type to use for the container
          --version       Print version number

     

×
×
  • Create New...