Difference between revisions of "Partclone"

From ArchWiki
Jump to: navigation, search
m
Line 1: Line 1:
 +
[[Category:File systems (English)]][[Category:HOWTOs (English)]]
 +
{{stub}}
 
==Introduction==
 
==Introduction==
  
Line 5: Line 7:
 
==Installation==
 
==Installation==
  
Partclone is available on the [http://aur.archlinux.org/ AUR] (partclone or partclone-svn).
+
Partclone is available in the [[AUR]] as {{Package AUR|partclone}} and {{Package AUR|partclone-svn}}
  
==How to use Partclone with an ext4-formatted partition==
+
==Using Partclone with an ext4-formatted partition==
  
===Without Compression===
+
To backup without compression:
 +
partclone.ext4 -c -s /dev/sda1 -o ~/image_sda1.pcl
  
====back up====
+
To restore it:
<pre>
+
partclone.ext4 -r -s ~/image_sda1.pcl -o /dev/sda1
partclone.ext4 -c -s /dev/sda1 -o ~/image_sda1.pcl
+
</pre>
+
  
====restore====
+
This time, backup ''with'' compression:
<pre>
+
partclone.ext4 -c -s /dev/sda1 | gzip -c > ~/image_sda1.pcl.gz <br>
partclone.ext4 -r -s ~/image_sda1.pcl -o /dev/sda1
+
<small>(for maximum compression use "gzip -c9")</small>
</pre>
+
  
{{Note|Adjust source and target to your needs.}}
+
Restore it:
 +
zcat ~/image_sda1.pcl.gz | partclone.ext4 -r -o /dev/sda1
  
===With Compression===
+
<!-- vim: set ft=Wikipedia: -->
 
+
====back up====
+
<pre>
+
partclone.ext4 -c -s /dev/sda1 | gzip -c > ~/image_sda1.pcl.gz
+
</pre>
+
(for maximum compression use "gzip -c9")
+
 
+
====restore====
+
<pre>
+
zcat ~/image_sda1.pcl.gz | partclone.ext4 -r -o /dev/sda1
+
</pre>
+
 
+
{{Note|Adjust source and target to your needs.}}
+
 
+
[[Category:Software (English)]]
+

Revision as of 22:30, 19 October 2009

Tango-document-new.pngThis article is a stub.Tango-document-new.png

Notes: please use the first argument of the template to provide more detailed indications. (Discuss in Talk:Partclone#)

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 in the AUR as Template:Package AUR and Template:Package AUR

Using Partclone with an ext4-formatted partition

To backup without compression:

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

To restore it:

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

This time, backup with compression:

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

(for maximum compression use "gzip -c9")

Restore it:

zcat ~/image_sda1.pcl.gz | partclone.ext4 -r -o /dev/sda1