Difference between revisions of "Partclone"

From ArchWiki
Jump to: navigation, search
m
(I disagree with stub classification; basic usage example is adequate for this type of resource)
Line 1: Line 1:
[[Category:File systems (English)]][[Category:HOWTOs (English)]]
+
[[Category:File systems (English)]]
{{stub}}
+
[[Category:HOWTOs (English)]]
==Introduction==
+
[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. In Arch Linux, Partclone can deal with the following file systems: ext2, ext3, ext4, reiserfs, hfs+, fat and ntfs.
 
+
[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. In Arch Linux Partclone can deal with the following file systems: ext2, ext3, ext4, reiserfs, hfs+, fat and ntfs.
+
  
 
==Installation==
 
==Installation==
  
Partclone is available in the [[AUR]] as {{Package AUR|partclone}} and {{Package AUR|partclone-svn}}
+
Partclone is available in the [[AUR]] as {{Package AUR|partclone}} and {{Package AUR|partclone-svn}}.
  
 
==Using Partclone with an ext4-formatted partition==
 
==Using Partclone with an ext4-formatted partition==
Line 13: Line 11:
 
===Without compression===
 
===Without compression===
  
To backup without compression:
+
To backup ''without'' compression:
 
  $ partclone.ext4 -c -s /dev/sda1 -o ~/image_sda1.pcl
 
  $ partclone.ext4 -c -s /dev/sda1 -o ~/image_sda1.pcl
  
Line 21: Line 19:
 
===With compression===
 
===With compression===
  
This time, backup ''with'' compression:
+
To backup ''with'' compression:
 
  $ partclone.ext4 -c -s /dev/sda1 | gzip -c > ~/image_sda1.pcl.gz
 
  $ partclone.ext4 -c -s /dev/sda1 | gzip -c > ~/image_sda1.pcl.gz
 +
 
{{Note|For maximum compression use "gzip -c9"}}
 
{{Note|For maximum compression use "gzip -c9"}}
  
Restore it:
+
To restore it:
 
  zcat ~/image_sda1.pcl.gz | partclone.ext4 -r -o /dev/sda1
 
  zcat ~/image_sda1.pcl.gz | partclone.ext4 -r -o /dev/sda1
 +
 
<!-- vim: set ft=Wikipedia: -->
 
<!-- vim: set ft=Wikipedia: -->

Revision as of 05:14, 24 November 2009

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

Without compression

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

With compression

To backup with compression:

$ partclone.ext4 -c -s /dev/sda1 | gzip -c > ~/image_sda1.pcl.gz
Note: For maximum compression use "gzip -c9"

To restore it:

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