Difference between revisions of "Partclone"

From ArchWiki
Jump to: navigation, search
m
m
Line 12: Line 12:
  
 
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
  
 
To restore it:
 
To restore it:
  partclone.ext4 -r -s ~/image_sda1.pcl -o /dev/sda1
+
  $ partclone.ext4 -r -s ~/image_sda1.pcl -o /dev/sda1
  
 
This time, backup ''with'' compression:
 
This time, backup ''with'' compression:
  partclone.ext4 -c -s /dev/sda1 | gzip -c > ~/image_sda1.pcl.gz <br>
+
  $ partclone.ext4 -c -s /dev/sda1 | gzip -c > ~/image_sda1.pcl.gz
 
<small>(for maximum compression use "gzip -c9")</small>
 
<small>(for maximum compression use "gzip -c9")</small>
  
 
Restore it:
 
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 22:31, 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