PartClone Backups with Compression

Show you how to use partclone with compression from the command line

 

Here is a example of how to to backup a partition. Don’t forget that you can’t backup a mounted partition. You must boot from a live CD and then backup your partition. If you have more then one OS on your box then boot into one of your other distros and then backup from a command line.

 

Example of a Backup:

You want to always check your drives for any errors first, so preform this command. Don’t forget to change the sda1 to what every partition your backing up.
sudo e2fsck -f -y -v /dev/sda1
Then (again, don’t forget to change your Partition (sda1) to the one your backing up. Also change your location to where your saving the backup file)
sudo partclone.ext4 -c -d -s /dev/sda1 | gzip -c5 > /data3/Backup-Linux/Mint-Cinnamon/mint17-Cinn_64-bit-07-12-14_root-sda1-SSD.img.gz
Change | gzip -c > to | gzip -c9 > for max compression!

 

Example of a Restore:

Note: PartClone needs to be run as root (sudo) so when you run the disk check it puts you into root the restore command will work)
You want to always check your drives for any errors first, so preform this command. Don’t forget to change the sda1 to what every partition your restoring.
sudo e2fsck -f -y -v /dev/sda1
Then (again, don’t forget to change your Partition (sda1) to the one your restoring. Also change your location to where your restoring the backup file from)
zcat /data3/Backup-Linux/Mint-Cinnamon/mint17-Cinn_64-bit-07-12-14_root-sda1-SSD.img.gz | sudo partclone.ext4 -r -o /dev/sda1

Have Fun

Leave a Comment

You must be logged in to post a comment.