HOWTO: Using cpio to Copy a Partition in Linux

Using cpio to copy everything from one partition to another in Linux, maintaining all file permissions, symlinks, and timestamps.

# File: copy_partition.notes
# Auth: burly
# Date: 03/20/05
# Desc: A method of copying everything from one 
#      partition to another

# Change directories to the top level of the 
# partition you want to copy
cd /part

# Use find to locate all objects and cpio to copy them
find . -mount -print0 | cpio -0dump /path/to/new/part

Comments

One response to “HOWTO: Using cpio to Copy a Partition in Linux”

  1. Raid Systeme und Raid Controller…

    […]HOWTO: Using cpio to Copy a Partition in Linux | Zach Burlingame[…]…

Leave a Reply

Your email address will not be published. Required fields are marked *

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.