Partclone

Partclone, like the well-known Partimage, can be used to back up and restore a partition while considering only used blocks.

Installation

Install the partclone package.

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, or experiment with other compression tools

To restore it:

# zcat ~/image_sda1.pcl.gz | partclone.ext4 -r -o /dev/sda1
gollark: You could read xattrs too.
gollark: I'm not exactly sure why, but in mine it is actually very hard to get a draw even if you're playing both sides manually constructing one.
gollark: Between optimal players it probably would. But I don't have one.
gollark: It never really ends in a draw though.
gollark: I don't have smart enough algorithms to "solve" this game, due to the large state space.
This article is issued from Archlinux. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.