lxc-clone(1)

NAME

   lxc-clone - clone a new container from an existing one.

SYNOPSIS

   lxc-clone [-s ] [-K ] [-M ] [-H ] [-B backingstore] [-L fssize] [-p
             lxcpath] [-P newlxcpath] [-R ] {-o orig} {-n new} [-- hook
             arguments]
   lxc-clone [-s ] [-K ] [-M ] [-H ] [-B backingstore] [-L fssize] [-p
             lxcpath] [-P newlxcpath] [-R ] {orig} {new} [-- hook
             arguments]

DESCRIPTION

   lxc-clone  Creates a new container as a clone of an existing container.
   Two types of clones are supported: copy  and  snapshot.  A  copy  clone
   copies  the  root  filessytem from the original container to the new. A
   snapshot filesystem uses the backing store's snapshot functionality  to
   create  a  very small copy-on-write snapshot of the original container.
   Snapshot clones require the new  container  backing  store  to  support
   snapshotting.  Currently this includes only aufs, btrfs, lvm, overlayfs
   and zfs. LVM devices do not support snapshots of snapshots.

   The backing store of the new container will be the  same  type  as  the
   original  container,  with one exception, overlay containers.  aufs and
   overlayfs snapshots can be created of directory backed containers. This
   can be requested by using (for overlayfs) the -B overlayfs arguments.

   The  names  of  the  original  and  new container can be given (in that
   order) after all options, or can  be  specified  with  the  -o  and  -n
   options, respectively.

OPTIONS

   -s, --snapshot
          The  new  container's rootfs will be a snapshot of the original.
          This option can be specified when  the  backing  store  is  LVM,
          btrfs  or  zfs,  and must be specified when you want to snapshot
          using aufs or overlayfs.

   -K, --keepname
          Do not change  the  hostname  of  the  container  (in  the  root
          filesystem).

   -M, --keepmac
          Use  the same MAC address as the original container, rather than
          generating a new random one.

   -H, --copyhooks
          Copy all mount hooks into the  new  container's  directory,  and
          update any lxcpaths and container names as needed.

   -L, --fssize fssize
          In  the  case of a block device backed container, a size for the
          new block device. By default, the new device will  be  made  the
          same size as the original.

   -p, --lxcpath lxcpath
          The  lxcpath  of  the original container. By default, the system
          wide configured lxcpath will be used.

   -P, --newpath newlxcpath
          The lxcpath for the new container. By default the  same  lxcpath
          as  the  original  will be used. Note that with btrfs snapshots,
          changing lxcpaths may not be possible,  as  subvolume  snapshots
          must be in the same btrfs filesystem.

   -B, --backingstore backingstore
          Select  a  different  backing  store  for  the new container. By
          default the same as the original container's is used. Note  that
          currently  changing  the backingstore is only supported for aufs
          and overlayfs snapshots of directory  backed  containers.  Valid
          backing  stores  include dir (directory), aufs, btrfs, lvm, zfs,
          loop and overlayfs.

   -R, --rename
          Rename an existing container.  orig is renamed new.

   -o, --orig orig
          The name of the original container to clone.

   -n, --new new
          The name of the new container to create.

CLONE HOOK

   If the container being cloned 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
   lxc-clone 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.

NOTES

   lxc-clone is deprecated in favor of lxc-copy.

SEE ALSO

   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)

AUTHOR

   Serge Hallyn <[email protected]>

                              2017-01-04                      lxc-clone(1)



Opportunity


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


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.


Free Books


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.


Education


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.