HiveBrain v1.2.0
Get Started
← Back to all entries
snippetbashTip

partclone — Copy and restore partitions to and from an image while disregarding empty blocks. More information:

Submitted by: @import:tldr-pages··
0
Viewed 0 times
commandcopyandclirestorepartitionspartclone
linux

Problem

How to use the partclone command: Copy and restore partitions to and from an image while disregarding empty blocks. More information: <https://manned.org/partclone>.

Solution

partclone — Copy and restore partitions to and from an image while disregarding empty blocks. More information: <https://manned.org/partclone>.

Copy a partition into an image:
sudo partclone.{{ext4|btrfs|fat32|xfs|...}} {{[-c|--clone]}} {{[-s|--source]}} {{/dev/sdXY}} {{[-o|--output]}} {{path/to/backup.img}}


Restore a partition from an image:
sudo partclone.{{ext4|btrfs|fat32|xfs|...}} {{[-c|--clone]}} {{[-s|--source]}} {{path/to/backup.img}} {{[-o|--output]}} {{/dev/sdXY}}


Display help:
partclone.{{ext4|btrfs|fat32|xfs|...}} {{[-h|--help]}}

Code Snippets

Copy a partition into an image

sudo partclone.{{ext4|btrfs|fat32|xfs|...}} {{[-c|--clone]}} {{[-s|--source]}} {{/dev/sdXY}} {{[-o|--output]}} {{path/to/backup.img}}

Restore a partition from an image

sudo partclone.{{ext4|btrfs|fat32|xfs|...}} {{[-c|--clone]}} {{[-s|--source]}} {{path/to/backup.img}} {{[-o|--output]}} {{/dev/sdXY}}

Display help

partclone.{{ext4|btrfs|fat32|xfs|...}} {{[-h|--help]}}

Context

tldr-pages: linux/partclone

Revisions (0)

No revisions yet.