Last active
December 22, 2015 05:29
-
-
Save djo/6424275 to your computer and use it in GitHub Desktop.
Dump a partition with fsarchiver
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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