<sect1 id="howto-copypartition">
	<title>How-To: Copying a Partition</title>

	<para>
		This how-to describes copying a partition. We will assume the intention is to copy a partition from one device to another and overwriting an existing target partition, but the general procedure would not be much different when copying to the same device or to some unallocated area.
	</para>

	<para>
		The following screenshot shows how the source device looks like:
	</para>

	<para>
		<screenshot>
			<mediaobject>
				<imageobject><imagedata fileref="copy_howto_1.png" format="PNG"/></imageobject>
				<textobject><phrase>Main window with source device</phrase></textobject>
			</mediaobject>
		</screenshot>
	</para>

	<para>
		The source partition in our example will be <quote>sdb1</quote> which is currently mounted, indicated by the lock-icon next to the mount point name in the screen shot. A mounted partition can not be copied, thus you first need to unmount it: Click on it then select <xref linkend="menu-partition-mount"/>.
	</para>

	<para>
		After unmounting the partition the lock icon has gone and it is now possible to select <xref linkend="menu-partition-copy"/>. This puts <quote>sdb1</quote> in &partman;'s clipboard; in other words: <quote>sdb1</quote> is now the partition that will be inserted when you select <xref linkend="menu-partition-paste"/>.
	</para>
	
	<para>
		The destination device for copying in this how-to is <quote>/dev/sdc</quote>. Click on it in the Devices panel. This is how the device looks like before copying:
	</para>
	
	<para>
		<screenshot>
			<mediaobject>
				<imageobject><imagedata fileref="copy_howto_2.png" format="PNG"/></imageobject>
				<textobject><phrase>Main window with destination device before copying</phrase></textobject>
			</mediaobject>
		</screenshot>
	</para>

	<para>
		The partition to overwrite is <quote>sdc5</quote>. To paste the copied partition into it, click on it and select <xref linkend="menu-partition-paste"/>. You will see the operation to copy the partition has been added to the list of pending operations. Note that there is no dialog box required to insert the partition as would be the case if you pasted into an unallocated area: Beginning and end of the pasted partition are determined by the overwritten partition.
	</para>

	<para>
		Now select <xref linkend="menu-edit-apply"/> and the partition will be copied. See the <link linkend="howto-resizepartition">how-to on resizing partitions</link> for details about applying operations.
	</para>
</sect1>

