Skip to content

Instantly share code, notes, and snippets.

@djo
Last active December 22, 2015 05:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save djo/6424275 to your computer and use it in GitHub Desktop.
Save djo/6424275 to your computer and use it in GitHub Desktop.
Dump a partition with fsarchiver
# http://www.fsarchiver.org/QuickStart
sudo apt-get install fsarchiver
# Find out what partition is used for the current folder and choose another partition for the dump
df -h .
df -h
# Re-mount /dev/md2 partition to read only mode
sudo mount -o remount,ro /dev/md2
sudo fsarchiver savefs ./ubuntu-md2.fsa /dev/md2
# Force dump in case you can't set read-only mode
sudo fsarchiver -A savefs ./ubuntu-md2.fsa /dev/md2
# Restore the dump
fsarchiver restfs ./ubuntu-md2.fsa id=0,dest=/dev/md2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment