lxc-copy - copy an existing container.
lxc-copy {-n, --name name} [-P, --lxcpath path] {-N, --newname newname} [-p, --newpath newpath] [-B, --backingstorage backingstorage] [-s, --snapshot] [-K, --keepdata] [-M, --keepmac] [-L, --fssize size [unit]] [-- hook arguments] lxc-copy {-n, --name name} [-P, --lxcpath path] [-N, --newname newname] [-p, --newpath newpath] {-e, --ephemeral} [-B, --backingstorage backingstorage] [-s, --snapshot] [-K, --keepdata] [-M, --keepmac] [-L, --fssize size [unit]] [-- hook arguments] lxc-copy {-n, --name name} [-P, --lxcpath path] {-N, --newname newname} [-p, --newpath newpath] {-R, --rename}
lxc-copy creates and optionally starts (ephemeral or non-ephemeral) copies of existing containers. It replaces lxc-clone and lxc-start- ephemeral. lxc-copy creates copies of existing containers. Copies can be complete clones of the original container. In this case the whole root filesystem of the container is simply copied to the new container. Or they can be snapshots, i.e. small copy-on-write copies of the original container. In this case the specified backing storage for the copy must support snapshots. This currently includes aufs, btrfs, lvm (lvm devices do not support snapshots of snapshots.), overlay, and zfs. The copy's backing storage will be of the same type as the original container. aufs or overlayfs snapshots of directory backed containers are exempted from this rule. When the -e flag is specified an ephemeral snapshot of the original container is created and started. Ephemeral containers will have lxc.ephemeral = 1 set in their config file and will be destroyed on shutdown. When -e is used in combination with -D a non-ephemeral snapshot of the original container is created and started. When -e is specified and no newname is given via -N a random name for the snapshot will be chosen. Containers created and started with -e can have custom mounts. These are specified with the -m flag. Currently three types of mounts are supported: aufs, bind, and overlay. Mount types are specified as suboptions to the -m flag and can be specified multiple times separated by commas. aufs and overlay mounts are currently specified in the format -m overlay=/src:/dest. When no destination dest is specified dest will be identical to src. Read-only bind mounts are specified -m bind=/src:/dest:ro and read-write bind mounts -m bind=/src:/dest:rw. Read-write bind mounts are the default and rw can be missing when a read-write mount is wanted. When dest is missing dest will be identical to src. An example for multiple mounts would be -m bind=/src1:/dest1:ro,bind=/src2:ro,overlay=/src3:/dest3. The mounts, their options, and formats supported via the -m flag are subject to change.
-N,--newname newname The name for the copy. -p,--newpath newpath The path for the copy. -R,--rename Rename the original container. -s,--snapshot Create a snapshot of the original container. The backing storage for the copy must support snapshots. This currently includes aufs, btrfs, lvm, overlay, and zfs. -F,--foreground Run the snapshot in the foreground. The snapshots console will be attached to the current tty. (This option can only be specified in conjunction with -e.) -d, --daemon Run the snapshot as a daemon (This is the default mode for ephemeral containers.). As the container has no more tty, if an error occurs nothing will be displayed, the log file can be used to check the error. (This option can only be specified in conjunction with -e.) -m, --mount mounttype Specify a mount for a snapshot The opts argument for the mount type can by of type {aufs, bind, overlay}. For example -m bind=/src:/dest:ro,overlay=/src:/dest (This option can currently only be specified in conjunction with -e.). -B, --backingstorage backingstorage Specify the backing storage type to be used for the copy where 'backingstorage' is of type 'aufs', 'btrfs', 'dir', 'lvm', 'loop', 'overlay', or 'zfs'. -L, --fssize size [unit] Specify the size for an 'lvm' filesystem. -D, --keepdata When this option is specified with -e a non-ephemeral container is created and started. -K, --keepname When this option is specified the hostname of the original container will be kept for the copy. -M, --keepmac When this option is specified the MAC address of the original container will be kept for the copy.
If the container being copied has one or more lxc.hook.clone specified, then the specified hooks will be called for the new container. The first 3 arguments passed to the clone hook will be the container name, a section ('lxc'), and the hook type ('clone'). Extra arguments passed to lxc-copy will be passed to the hook program starting at argument 4. The LXC_ROOTFS_MOUNT environment variable gives the path under which the container's root filesystem is mounted. The configuration file pathname is stored in LXC_CONFIG_FILE, the new container name in LXC_NAME, the old container name in LXC_SRC_NAME, and the path or device on which the rootfs is located is in LXC_ROOTFS_PATH.
These options are common to most of lxc commands. -?, -h, --help Print a longer usage message than normal. --usage Give the usage message -q, --quiet mute on -P, --lxcpath=PATH Use an alternate container path. The default is /var/lib/lxc. -o, --logfile=FILE Output to an alternate log FILE. The default is no log. -l, --logpriority=LEVEL Set log priority to LEVEL. The default log priority is ERROR. Possible values are : FATAL, CRIT, WARN, ERROR, NOTICE, INFO, DEBUG. Note that this option is setting the priority of the events log in the alternate log file. It do not have effect on the ERROR events log on stderr. -n, --name=NAME Use container identifier NAME. The container identifier format is an alphanumeric string. --rcfile=FILE Specify the configuration file to configure the virtualization and isolation functionalities for the container. This configuration file if present will be used even if there is already a configuration file present in the previously created container (via lxc-create). --version Show the version number.
lxc(7), lxc-create(1), lxc-copy(1), lxc-destroy(1), lxc-start(1), lxc- stop(1), lxc-execute(1), lxc-console(1), lxc-monitor(1), lxc-wait(1), lxc-cgroup(1), lxc-ls(1), lxc-info(1), lxc-freeze(1), lxc-unfreeze(1), lxc-attach(1), lxc.conf(5)
Christian Brauner <[email protected]> 2017-01-04 lxc-copy(1)
Personal Opportunity - Free software gives you access to billions of dollars of software at no cost. Use this software for your business, personal use or to develop a profitable skill. Access to source code provides access to a level of capabilities/information that companies protect though copyrights. Open source is a core component of the Internet and it is available to you. Leverage the billions of dollars in resources and capabilities to build a career, establish a business or change the world. The potential is endless for those who understand the opportunity.
Business Opportunity - Goldman Sachs, IBM and countless large corporations are leveraging open source to reduce costs, develop products and increase their bottom lines. Learn what these companies know about open source and how open source can give you the advantage.
Free Software provides computer programs and capabilities at no cost but more importantly, it provides the freedom to run, edit, contribute to, and share the software. The importance of free software is a matter of access, not price. Software at no cost is a benefit but ownership rights to the software and source code is far more significant.
Free Office Software - The Libre Office suite provides top desktop productivity tools for free. This includes, a word processor, spreadsheet, presentation engine, drawing and flowcharting, database and math applications. Libre Office is available for Linux or Windows.
The Free Books Library is a collection of thousands of the most popular public domain books in an online readable format. The collection includes great classical literature and more recent works where the U.S. copyright has expired. These books are yours to read and use without restrictions.
Source Code - Want to change a program or know how it works? Open Source provides the source code for its programs so that anyone can use, modify or learn how to write those programs themselves. Visit the GNU source code repositories to download the source.
Study at Harvard, Stanford or MIT - Open edX provides free online courses from Harvard, MIT, Columbia, UC Berkeley and other top Universities. Hundreds of courses for almost all major subjects and course levels. Open edx also offers some paid courses and selected certifications.
Linux Manual Pages - A man or manual page is a form of software documentation found on Linux/Unix operating systems. Topics covered include computer programs (including library and system calls), formal standards and conventions, and even abstract concepts.