Backup and Restore ext4 filesystem using fsarchiver

Important Note: Until the time of writing this article, “partimage” DOESN’T SUPPORT EXT4, it detects ext4 as ext3 and then displays an error message saying “can’t read bitmap block 0 from image“, so if you use something like the bootable disk “systemrescuecd” for backup and you’re using an ext4 filesystem, you’d better use another alternative such as “fsarchiver” as in the following steps:

  1. Create a mountpoint to save the image to, e.g. “/root/backup”
  2. fsarchiver savefs /root/backup/backup.fsa /dev/sda1” where sda1 is the partition you wish to backup.

fsarchiver uses gzip compression by default and it will display a summary once it finishes, make sure the summary doesn’t contain any errors. To restore the image:

  1. fsarhiver restfs /root/backup/backup.fsa id=0,dest=/dev/sda1” where “/dev/sda1” is the partition you wish to restore and “id=0” is used to indicate that it’s the first partition in the list of paritions – if any – inside the “backup.fsa” file.

For more information, visit http://www.fsarchiver.org/QuickStart

About SoCRaT

Systems Engineer, OSS & Linux Geek
This entry was posted in Uncategorized and tagged , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s