Partclone

From ArchWiki
Revision as of 20:32, 5 May 2009 by Franzb (Talk | contribs) (Introduction)

Jump to: navigation, search

Introduction

Partclone, like the well known Partimage, can be used to back up and restore a partition while considering only used blocks. In Arch Linux Partclone can deal with the following file systems: ext2, ext3, ext4, reiserfs, hfs+, fat and ntfs.

Installation

Partclone is available on the AUR (partclone-svn).

How to use Partclone with an ext4-formatted partition

Without Compression

back up

partclone.ext4 -c -s /dev/sda1 -o ~/image_sda1.pcl

restore

partclone.ext4 -r -s ~/image_sda1.pcl -o /dev/sda1
Note: Adjust source and target to your needs.

With Compression

back up

partclone.ext4 -c -s /dev/sda1 | gzip -c > ~/image_sda1.pcl.gz

(for maximum compression use "gzip -c9")

restore

zcat ~/image_sda1.pcl.gz | partclone.ext4 -r -o /dev/sda1
Note: Adjust source and target to your needs.