Difference between revisions of "Partclone"

From ArchWiki
Jump to: navigation, search
Line 1: Line 1:
 
==Introduction==
 
==Introduction==
  
[http://partclone.nchc.org.tw/ Partclone] provides utilities to back up and restore only the used blocks of a partition. Therefore,  
+
[http://partclone.nchc.org.tw/ Partclone], like the well known [http://www.partimage.org/Main_Page Partimage], can be used to back up and restore a partition while considering only used blocks. Partclone can deal with the following file systems: ext2, ext3, ext4, reiserfs, hfs+, fat and ntfs.
Partclone produces smaller image files then [http://www.gnu.org/software/coreutils/manual/html_node/dd-invocation.html dd] does.  
+
 
 +
==Installation==
  
 
Partclone is available on the [http://aur.archlinux.org/ AUR] (partclone-svn).
 
Partclone is available on the [http://aur.archlinux.org/ AUR] (partclone-svn).
  
==Usage==
+
==How to use Partclone with an ext4-formatted partition==
  
 
===Without Compression===
 
===Without Compression===
  
back up
+
====back up====
 
<pre>
 
<pre>
partclone.extfs -c -s /dev/sda1 -o ~/image_sda1.pcl
+
partclone.ext4 -c -s /dev/sda1 -o ~/image_sda1.pcl
 
</pre>
 
</pre>
  
restore
+
====restore====
 
<pre>
 
<pre>
partclone.extfs -r -s ~/image_sda1.pcl -o /dev/sda1
+
partclone.ext4 -r -s ~/image_sda1.pcl -o /dev/sda1
 
</pre>
 
</pre>
  
Line 24: Line 25:
 
===With Compression===  
 
===With Compression===  
  
back up (for maximum compression use "gzip -c9")
+
====back up====
 
<pre>
 
<pre>
partclone.extfs -c -s /dev/sda1 | gzip -c > ~/image_sda1.pcl.gz
+
partclone.ext4 -c -s /dev/sda1 | gzip -c > ~/image_sda1.pcl.gz
 
</pre>
 
</pre>
 +
(for maximum compression use "gzip -c9")
  
restore
+
====restore====
 
<pre>
 
<pre>
zcat ~/image_sda1.pcl.gz | partclone.extfs -r -o /dev/sda1
+
zcat ~/image_sda1.pcl.gz | partclone.ext4 -r -o /dev/sda1
 
</pre>
 
</pre>
  

Revision as of 20:06, 5 May 2009

Introduction

Partclone, like the well known Partimage, can be used to back up and restore a partition while considering only used blocks. 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.